File tree Expand file tree Collapse file tree 7 files changed +56
-11
lines changed
Expand file tree Collapse file tree 7 files changed +56
-11
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+
4+ TRACKING_REPO=${REPO_OWNER} /${REPO_NAME}
5+ while getopts " :r:s:" option; do
6+ case " ${option} " in
7+ r)
8+ TRACKING_REPO=${OPTARG}
9+ ;;
10+ s)
11+ SRC_FILE=${OPTARG}
12+ ;;
13+ esac
14+ done
15+ shift $(( OPTIND- 1 ))
16+
17+ TRACKING_BRANCH=prow-job-tracking
18+ FILE_TO_PUSH=job/${JOB_NAME}
19+
20+ echo " Triggering the next prow job by adding a git commit to the \
21+ ${FILE_TO_PUSH} file on the ${TRACKING_BRANCH} branch of the \
22+ ${TRACKING_REPO} repository."
23+
24+ ./trigger-prow-job-from-git.sh -r ${TRACKING_REPO} \
25+ -b ${TRACKING_BRANCH} -s ${SRC_FILE} -d ${FILE_TO_PUSH}
26+
27+ if [ $? -ne 0 ]
28+ then
29+ echo " Failed to add the git commit to trigger the next job"
30+ exit 3
31+ fi
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ set -eu
1212display_usage () {
1313 echo " Usage: -r <TRACKING_REPO> -b <TRACKING_BRANCH> -s <SRC_FILE> -d <DEST_FILE>"
1414 echo " Example:"
15- echo " trigger-prow-job-from-git.sh -r alunsin /docker-ce-build" \
15+ echo " trigger-prow-job-from-git.sh -r ppc64le-cloud /docker-ce-build" \
1616 " -b prow-job-tracking -s $PWD /env/date.list -d job/postsubmit-build-docker"
1717 exit 2
1818}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ checkDirectory() {
99 echo " Could not create $1 , exiting."
1010 mkdir $1
1111 if [[ $? -ne 0 ]]; then
12- exit 1
12+ exit 2
1313 fi
1414 echo " $1 created"
1515 else
@@ -24,5 +24,6 @@ rm -f ${DIR_LOGS_COS}/info.log && touch ${DIR_LOGS_COS}/info.log
2424docker version 2>&1 | tee -a " ${DIR_LOGS_COS} /info.log"
2525docker info 2>&1 | tee -a " ${DIR_LOGS_COS} /info.log"
2626curl -fsSL -o ${PWD} /check-config.sh " https://raw.githubusercontent.com/moby/moby/master/contrib/check-config.sh" 2>&1 | tee -a " ${DIR_LOGS_COS} /info.log"
27+ set -o pipefail
2728bash ${PWD} /check-config.sh 2>&1 | tee -a " ${DIR_LOGS_COS} /info.log" || true
28- exit 0
29+ exit $?
Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ echo "${PATH_CI}"
66export PATH_CI
77
88echo " Prow Job to run CI tests on the Docker packages"
9- echo " Skip Build Dev image"
10- exit 0
119# Go to the workdir
1210echo " * Starting dockerd and waiting for it *"
1311${PWD} /dockerctl.sh start
Original file line number Diff line number Diff line change 44# Path to the scripts
55PATH_CI=" ${PWD} /upstream-master-ci"
66export PATH_CI
7+ DATE=` date +%d%m%y-%H%M`
8+
9+ REPO_OWNER=" ppc64le-cloud"
10+ REPO_NAME=" docker-ce-build"
11+ PATH_SCRIPTS=" /home/prow/go/src/github.com/${REPO_OWNER} /${REPO_NAME} "
12+ echo DATE=\" ${DATE} \" 2>&1 | tee ${PATH_SCRIPTS} /env/date.list
713
814echo " Prow Job to run CI tests on the Docker packages"
915
@@ -13,5 +19,18 @@ ${PWD}/dockerctl.sh start
1319echo " ** Set up (env files) **"
1420chmod ug+x ${PATH_CI} /get-env-ci.sh && ${PATH_CI} /get-env-ci.sh
1521
16- echo " *** Check Config ***"
17- chmod ug+x ${PATH_CI} /info.sh && ${PATH_CI} /info.sh
22+ echo " *** Check Kernel Config ***"
23+ chmod ug+x ${PATH_CI} /info.sh
24+ ${PATH_CI} /info.sh
25+
26+ if [[ $? == 0 ]]; then
27+ chmod ug+x ./setup-pj-trigger.sh
28+ ./setup-pj-trigger.sh -r ppc64le-cloud/docker-ce-build
29+ else
30+ if [[ $? == 1 ]]; then
31+ echo " Error checking the kernel configuration"
32+ else
33+ echo " Could not create a logging directory for storing the job logs"
34+ fi
35+ exit 1
36+ fi
Original file line number Diff line number Diff line change 44begin=$SECONDS
55
66echo " Prow Job to run integration tests on the Docker packages"
7- echo " Skip integration tests"
8- exit 0
97${PWD} /dockerctl.sh start
108
119set -o allexport
Original file line number Diff line number Diff line change @@ -7,8 +7,6 @@ begin=$SECONDS
77PATH_CI=" ${PWD} /upstream-master-ci"
88export PATH_CI
99echo " Prow Job to run CI tests on the Docker packages"
10- echo " Skip unit tests"
11- exit 0
1210if [[ -z ${ARTIFACTS} ]]; then
1311 ARTIFACTS=/logs/artifacts
1412 echo " Setting ARTIFACTS to ${ARTIFACTS} "
You can’t perform that action at this time.
0 commit comments