Skip to content

Commit

Permalink
Adding GKE credential to jenkinsfile
Browse files Browse the repository at this point in the history
Signed-off-by: Isabela Guimaraes <[email protected]>
  • Loading branch information
IsaSih committed Jan 14, 2025
1 parent 805be95 commit 04e22b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cypress/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ node {
string(credentialsId: 'AWS_SECRET_ACCESS_KEY', variable: 'AWS_SECRET_ACCESS_KEY'),
string(credentialsId: 'AZURE_AKS_SUBSCRIPTION_ID', variable: 'AZURE_AKS_SUBSCRIPTION_ID'),
string(credentialsId: 'AZURE_CLIENT_ID', variable: 'AZURE_CLIENT_ID'),
string(credentialsId: 'AZURE_CLIENT_SECRET', variable: 'AZURE_CLIENT_SECRET')]) {
string(credentialsId: 'AZURE_CLIENT_SECRET', variable: 'AZURE_CLIENT_SECRET'),
string(credentialsId: 'GKE_SERVICE_ACCOUNT', variable: 'GKE_SERVICE_ACCOUNT')
]) {
withEnv(paramsMap) {
stage('Checkout') {
deleteDir()
Expand Down
3 changes: 2 additions & 1 deletion cypress/jenkins/cypress.config.jenkins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export default defineConfig({
azureClientId: process.env.AZURE_CLIENT_ID,
azureClientSecret: process.env.AZURE_CLIENT_SECRET,
customNodeIp: process.env.CUSTOM_NODE_IP,
customNodeKey: process.env.CUSTOM_NODE_KEY
customNodeKey: process.env.CUSTOM_NODE_KEY,
gkeServiceAccount: process.env.GKE_SERVICE_ACCOUNT
},
// Jenkins reporters configuration jUnit and HTML
reporter: 'cypress-multi-reporters',
Expand Down
1 change: 1 addition & 0 deletions cypress/jenkins/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ corral config vars set azure_subscription_id "${AZURE_AKS_SUBSCRIPTION_ID}"
corral config vars set azure_client_id "${AZURE_CLIENT_ID}"
corral config vars set azure_client_secret "${AZURE_CLIENT_SECRET}"
corral config vars set create_initial_clusters "${CREATE_INITIAL_CLUSTERS}"
corral config vars set gke_service_account "${GKE_SERVICE_ACCOUNT}"

create_initial_clusters() {
shopt -u nocasematch
Expand Down

0 comments on commit 04e22b6

Please sign in to comment.