diff --git a/lib/compute/env-config.ts b/lib/compute/env-config.ts index d9818b55..dde5ec1b 100644 --- a/lib/compute/env-config.ts +++ b/lib/compute/env-config.ts @@ -25,7 +25,7 @@ export class EnvConfig { const envFile: string = readFileSync(envVarsFilePath, 'utf-8'); const c = envFile.split('\n'); c.forEach((item) => { - const e = item.split(':'); + const e = item.split(/:(.*)/s).map((element) => element.trim()); envArray.push(new Env(e[0], e[1])); }); diff --git a/test/compute/env-config.test.ts b/test/compute/env-config.test.ts index 45c39b3b..597ab750 100644 --- a/test/compute/env-config.test.ts +++ b/test/compute/env-config.test.ts @@ -29,6 +29,9 @@ describe('Env Config', () => { { key: 's3Bucket', value: 'artifactBucket' }, { key: 'account', value: '1234' }, { key: 'isStaging', value: 'true' }, + { key: 'url', value: 'https://url.com' }, + { key: 'nospace', value: 'dummy' }, + { key: 'multiplespace', value: 'spaces' }, ], }, }; diff --git a/test/data/env.txt b/test/data/env.txt index c0a78f59..3c02d45a 100644 --- a/test/data/env.txt +++ b/test/data/env.txt @@ -1,3 +1,6 @@ -s3Bucket:artifactBucket -account:1234 -isStaging:true \ No newline at end of file +s3Bucket: artifactBucket +account: 1234 +isStaging: true +url: https://url.com +nospace:dummy +multiplespace: spaces \ No newline at end of file diff --git a/test/data/test_env.yaml b/test/data/test_env.yaml index 4b7bb69d..cf34693f 100644 --- a/test/data/test_env.yaml +++ b/test/data/test_env.yaml @@ -8,7 +8,9 @@ jenkins: disableRememberMe: false labelAtoms: - name: built-in - markupFormatter: plainText + markupFormatter: + rawHtml: + disableSyntaxHighlighting: true mode: NORMAL myViewsTabBar: standard numExecutors: 2 @@ -48,6 +50,12 @@ jenkins: value: '1234' - key: isStaging value: 'true' + - key: url + value: https://url.com + - key: nospace + value: dummy + - key: multiplespace + value: spaces globalCredentialsConfiguration: configuration: providerFilter: none @@ -68,6 +76,10 @@ unclassified: logBuildCause: true pattern: >- .*/(?:configSubmit|doDelete|postBuildResult|enable|disable|cancelQueue|stop|toggleLogKeep|doWipeOutWorkspace|createItem|createView|toggleOffline|cancelQuietDown|quietDown|restart|exit|safeExit)/?.* + awsCredentialsProvider: + cache: false + client: + credentialsProvider: default buildDiscarders: configuredBuildDiscarders: - jobBuildDiscarder