From 32408d0ab0b182125df980353bfb2e70a795e16e Mon Sep 17 00:00:00 2001 From: dmitri Date: Sat, 15 Aug 2020 13:51:44 +0200 Subject: [PATCH] Cherry-pick changes from https://github.com/gravitational/gravity/pull/1982 to fix builds. Otherwise, builds are subject to environment changes regarding the tele login state. --- Jenkinsfile | 21 +++++++++------------ Makefile | 2 +- e | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fd3fb8a916..f6eaf1a19f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -59,13 +59,9 @@ timestamps { } stage('build-gravity') { withCredentials([ - [$class: 'SSHUserPrivateKeyBinding', credentialsId: '08267d86-0b3a-4101-841e-0036bf780b11', keyFileVariable: 'GITHUB_SSH_KEY'], - [ - $class: 'UsernamePasswordMultiBinding', - credentialsId: 'jenkins-aws-s3', - usernameVariable: 'AWS_ACCESS_KEY_ID', - passwordVariable: 'AWS_SECRET_ACCESS_KEY', - ], + sshUserPrivateKey(credentialsId: '08267d86-0b3a-4101-841e-0036bf780b11', keyFileVariable: 'GITHUB_SSH_KEY'), + usernamePassword(credentialsId: 'jenkins-aws-s3', usernameVariable: 'AWS_ACCESS_KEY_ID', passwordVariable: 'AWS_SECRET_ACCESS_KEY'), + string(credentialsId:'GET_GRAVITATIONAL_IO_APIKEY', variable: 'GET_GRAVITATIONAL_IO_APIKEY'), ]) { sh 'make -C e production telekube-intermediate-upgrade opscenter' } @@ -77,17 +73,18 @@ timestamps { parallel ( build : { withCredentials([ - [$class: 'SSHUserPrivateKeyBinding', credentialsId: '08267d86-0b3a-4101-841e-0036bf780b11', keyFileVariable: 'GITHUB_SSH_KEY']]) { + sshUserPrivateKey(credentialsId: '08267d86-0b3a-4101-841e-0036bf780b11', keyFileVariable: 'GITHUB_SSH_KEY') + ]) { sh 'make test && make -C e test' } }, robotest : { if (env.RUN_ROBOTEST == 'run') { withCredentials([ - [$class: 'StringBinding', credentialsId: 'GET_GRAVITATIONAL_IO_APIKEY', variable: 'GET_GRAVITATIONAL_IO_APIKEY'], - [$class: 'FileBinding', credentialsId:'ROBOTEST_LOG_GOOGLE_APPLICATION_CREDENTIALS', variable: 'GOOGLE_APPLICATION_CREDENTIALS'], - [$class: 'FileBinding', credentialsId:'OPS_SSH_KEY', variable: 'SSH_KEY'], - [$class: 'FileBinding', credentialsId:'OPS_SSH_PUB', variable: 'SSH_PUB'], + string(credentialsId: 'GET_GRAVITATIONAL_IO_APIKEY', variable: 'GET_GRAVITATIONAL_IO_APIKEY'), + file(credentialsId:'ROBOTEST_LOG_GOOGLE_APPLICATION_CREDENTIALS', variable: 'GOOGLE_APPLICATION_CREDENTIALS'), + file(credentialsId:'OPS_SSH_KEY', variable: 'SSH_KEY'), + file(credentialsId:'OPS_SSH_PUB', variable: 'SSH_PUB'), ]) { sh 'make -C e robotest-run-suite' } diff --git a/Makefile b/Makefile index 34849d7b2f..3dc694a543 100644 --- a/Makefile +++ b/Makefile @@ -526,7 +526,7 @@ telekube: $(GRAVITY_BUILDDIR)/telekube.tar .PHONY: telekube-intermediate-upgrade telekube-intermediate-upgrade: GRAVITY=$(GRAVITY_OUT) --state-dir=$(PACKAGES_DIR) -telekube-intermediate-upgrade: GRAVITY_INSTALLER_OPTIONS=--upgrade-via=$(GRAVITY_INTERMEDIATE_RELEASE) +telekube-intermediate-upgrade: GRAVITY_INSTALLER_OPTIONS:=$(GRAVITY_INSTALLER_OPTIONS) --upgrade-via=$(GRAVITY_INTERMEDIATE_RELEASE) telekube-intermediate-upgrade: $(GRAVITY_BUILDDIR)/telekube.tar $(GRAVITY_BUILDDIR)/telekube.tar: packages diff --git a/e b/e index 4599aa0ae6..e8b2e2d6fe 160000 --- a/e +++ b/e @@ -1 +1 @@ -Subproject commit 4599aa0ae6dfcec2311539aa8c37596a0485d29d +Subproject commit e8b2e2d6fec103429ef79dbe575b11826eeedfdc