Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit f39d24f

Browse files
committed
Jenkinsfile: set repo and branch, to assist validate_diff()
This is a continuation of 2a08f33166247da9d4c09d4c6c72cbb8119bf8df; When running CI in other repositories (e.g. Docker's downstream docker/engine repository), or other branches, the validation scripts were calculating the list of changes based on the wrong information. This lead to weird failures in CI in a branch where these values were not updated ':-) (CI on a pull request failed because it detected that new tests were added to the deprecated `integration-cli` test-suite, but the pull request did not actually make changes in that area). This patch uses environment variables set by Jenkins to sets the correct target repository (and branch) to compare to. Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 7019b60d0d6f3d69e6ccf481ca0a912905a9c1d7) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: abbc956ac87e7a0ba319402c765462985c545adc Component: engine
1 parent 9d949ac commit f39d24f

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

components/engine/Jenkinsfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ pipeline {
8787
-e DOCKER_EXPERIMENTAL \
8888
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
8989
-e DOCKER_GRAPHDRIVER \
90+
-e VALIDATE_REPO=${GIT_URL} \
91+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
9092
docker:${GIT_COMMIT} \
9193
hack/validate/default
9294
'''
@@ -101,6 +103,8 @@ pipeline {
101103
-e DOCKER_EXPERIMENTAL \
102104
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
103105
-e DOCKER_GRAPHDRIVER \
106+
-e VALIDATE_REPO=${GIT_URL} \
107+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
104108
docker:${GIT_COMMIT} \
105109
hack/make.sh \
106110
dynbinary-daemon \
@@ -169,6 +173,8 @@ pipeline {
169173
-e DOCKER_EXPERIMENTAL \
170174
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
171175
-e DOCKER_GRAPHDRIVER \
176+
-e VALIDATE_REPO=${GIT_URL} \
177+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
172178
docker:${GIT_COMMIT} \
173179
hack/test/unit
174180
'''
@@ -188,6 +194,8 @@ pipeline {
188194
-e DOCKER_EXPERIMENTAL \
189195
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
190196
-e DOCKER_GRAPHDRIVER \
197+
-e VALIDATE_REPO=${GIT_URL} \
198+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
191199
docker:${GIT_COMMIT} \
192200
hack/validate/vendor
193201
'''
@@ -281,6 +289,8 @@ pipeline {
281289
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
282290
-e DOCKER_GRAPHDRIVER \
283291
-e TIMEOUT \
292+
-e VALIDATE_REPO=${GIT_URL} \
293+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
284294
docker:${GIT_COMMIT} \
285295
hack/make.sh \
286296
"$1" \
@@ -395,6 +405,8 @@ pipeline {
395405
-e DOCKER_EXPERIMENTAL \
396406
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
397407
-e DOCKER_GRAPHDRIVER \
408+
-e VALIDATE_REPO=${GIT_URL} \
409+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
398410
docker:${GIT_COMMIT} \
399411
hack/test/unit
400412
'''
@@ -418,6 +430,8 @@ pipeline {
418430
-e TESTDEBUG \
419431
-e TEST_SKIP_INTEGRATION_CLI \
420432
-e TIMEOUT \
433+
-e VALIDATE_REPO=${GIT_URL} \
434+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
421435
docker:${GIT_COMMIT} \
422436
hack/make.sh \
423437
dynbinary \
@@ -501,6 +515,8 @@ pipeline {
501515
-e DOCKER_GRAPHDRIVER \
502516
-e TEST_SKIP_INTEGRATION \
503517
-e TIMEOUT \
518+
-e VALIDATE_REPO=${GIT_URL} \
519+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
504520
docker:${GIT_COMMIT} \
505521
hack/make.sh \
506522
dynbinary \
@@ -579,6 +595,8 @@ pipeline {
579595
-e DOCKER_EXPERIMENTAL \
580596
-e DOCKER_GITCOMMIT=${GIT_COMMIT} \
581597
-e DOCKER_GRAPHDRIVER \
598+
-e VALIDATE_REPO=${GIT_URL} \
599+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
582600
docker:${GIT_COMMIT} \
583601
hack/test/unit
584602
'''
@@ -602,6 +620,8 @@ pipeline {
602620
-e TESTDEBUG \
603621
-e TEST_SKIP_INTEGRATION_CLI \
604622
-e TIMEOUT \
623+
-e VALIDATE_REPO=${GIT_URL} \
624+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
605625
docker:${GIT_COMMIT} \
606626
hack/make.sh \
607627
dynbinary \
@@ -683,6 +703,8 @@ pipeline {
683703
-e DOCKER_GRAPHDRIVER \
684704
-e TEST_SKIP_INTEGRATION \
685705
-e TIMEOUT \
706+
-e VALIDATE_REPO=${GIT_URL} \
707+
-e VALIDATE_BRANCH=${CHANGE_TARGET} \
686708
docker:${GIT_COMMIT} \
687709
hack/make.sh \
688710
dynbinary \

0 commit comments

Comments
 (0)