Adding support in cache package to check if Artifact Cache service is enabled or not (#1028)
* Added support to check if Artifact cache service is enabled or not. * enablingForGHES * added ACTIONS_CACHE_URL in fixtures * Fix CI * CI fix * changed function name * Function rename * Updated release * added test case * Update RELEASES.md * Lint errors * lint * linting * lint * update name to actions service * Update packages/cache/src/internal/cacheUtils.ts Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com> * review comments * linting * linting * push to start CI * Update RELEASES.md * remove extra spaces * reverting version update * Revert "reverting version update" This reverts commit af84eba61ef8c119458dc0ce1da85b01d61b9d13. * Update RELEASES.md Co-authored-by: Brian Cristante <33549821+brcrista@users.noreply.github.com>
This commit is contained in:
1 parent
f5cad4d990
commit
646eb713fa
7 files changed
+33
-11
No files matched your search
@@ -31,12 +31,7 @@ import {
|
||||
const versionSalt = '1.0'
|
||||
|
||||
function getCacheApiUrl(resource: string): string {
|
||||
// Ideally we just use ACTIONS_CACHE_URL
|
||||
const baseUrl: string = (
|
||||
process.env['ACTIONS_CACHE_URL'] ||
|
||||
process.env['ACTIONS_RUNTIME_URL'] ||
|
||||
''
|
||||
).replace('pipelines', 'artifactcache')
|
||||
const baseUrl: string = process.env['ACTIONS_CACHE_URL'] || ''
|
||||
if (!baseUrl) {
|
||||
throw new Error('Cache Service Url not found, unable to restore cache.')
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user