|
1 | 1 | // Jenkinsfile for gh-pr-and-build template |
2 | 2 | // See: https://www.jenkins.io/doc/book/pipeline/jenkinsfile/ |
3 | 3 |
|
| 4 | +def secrets = [ |
| 5 | + [path: params.VAULT_PATH_SVC_ACCOUNT_EPHEMERAL, engineVersion: 1, secretValues: [ |
| 6 | + [envVar: 'OC_LOGIN_TOKEN_DEV', vaultKey: 'oc-login-token-dev'], |
| 7 | + [envVar: 'OC_LOGIN_SERVER_DEV', vaultKey: 'oc-login-server-dev']]], |
| 8 | + [path: params.VAULT_PATH_QUAY_PUSH, engineVersion: 1, secretValues: [ |
| 9 | + [envVar: 'QUAY_USER', vaultKey: 'user'], |
| 10 | + [envVar: 'QUAY_TOKEN', vaultKey: 'token']]], |
| 11 | + [path: params.VAULT_PATH_RHR_PULL, engineVersion: 1, secretValues: [ |
| 12 | + [envVar: 'RH_REGISTRY_USER', vaultKey: 'user'], |
| 13 | + [envVar: 'RH_REGISTRY_TOKEN', vaultKey: 'token']]] |
| 14 | +] |
| 15 | + |
| 16 | +def configuration = [vaultUrl: params.VAULT_ADDRESS, vaultCredentialId: params.VAULT_CREDS_ID, engineVersion: 1] |
| 17 | + |
4 | 18 | pipeline { |
5 | 19 | // Agent configuration - defines where the pipeline runs |
6 | 20 | agent { |
@@ -44,11 +58,7 @@ pipeline { |
44 | 58 | [ |
45 | 59 | // Vault path containing the secrets |
46 | 60 | path: 'app-sre/quay/app-sre-push', |
47 | | - secretValues: [ |
48 | | - // Map Vault keys to environment variables |
49 | | - [envVar: 'QUAY_USER', vaultKey: 'user'], |
50 | | - [envVar: 'QUAY_TOKEN', vaultKey: 'token'] |
51 | | - ] |
| 61 | + secretValues: secrets |
52 | 62 | ] |
53 | 63 | ] |
54 | 64 | ]) { |
|
0 commit comments