Skip to content

Commit

Permalink
Enable CI
Browse files Browse the repository at this point in the history
  • Loading branch information
AshwinHIBM committed Feb 4, 2025
1 parent 3073c3d commit e2f8d34
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 9 deletions.
25 changes: 25 additions & 0 deletions setup-pj-trigger.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

echo "Triggering the next prow job using git commit"

TRACKING_REPO=${REPO_OWNER}/${REPO_NAME}
while getopts ":r:" option; do
case "${option}" in
r)
TRACKING_REPO=${OPTARG}
;;
esac
done
shift $((OPTIND-1))

TRACKING_BRANCH=prow-job-tracking
FILE_TO_PUSH=job/${JOB_NAME}

./trigger-prow-job-from-git.sh -r ${TRACKING_REPO} \
-b ${TRACKING_BRANCH} -s ${PWD}/env/date.list -d ${FILE_TO_PUSH}

if [ $? -ne 0 ]
then
echo "Failed to add the git commit to trigger the next job"
exit 3
fi
2 changes: 1 addition & 1 deletion trigger-prow-job-from-git.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set -eu
display_usage() {
echo "Usage: -r <TRACKING_REPO> -b <TRACKING_BRANCH> -s <SRC_FILE> -d <DEST_FILE>"
echo "Example:"
echo " trigger-prow-job-from-git.sh -r alunsin/docker-ce-build" \
echo " trigger-prow-job-from-git.sh -r ppc64le-cloud/docker-ce-build" \
"-b prow-job-tracking -s $PWD/env/date.list -d job/postsubmit-build-docker"
exit 2
}
Expand Down
3 changes: 2 additions & 1 deletion upstream-master-ci/info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ rm -f ${DIR_LOGS_COS}/info.log && touch ${DIR_LOGS_COS}/info.log
docker version 2>&1 | tee -a "${DIR_LOGS_COS}/info.log"
docker info 2>&1 | tee -a "${DIR_LOGS_COS}/info.log"
curl -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"
set -o pipefail
bash ${PWD}/check-config.sh 2>&1 | tee -a "${DIR_LOGS_COS}/info.log" || true
exit 0
exit $?
2 changes: 0 additions & 2 deletions upstream-master-ci/prow-build-dev-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ echo "${PATH_CI}"
export PATH_CI

echo "Prow Job to run CI tests on the Docker packages"
echo "Skip Build Dev image"
exit 0
# Go to the workdir
echo "* Starting dockerd and waiting for it *"
${PWD}/dockerctl.sh start
Expand Down
17 changes: 16 additions & 1 deletion upstream-master-ci/prow-info-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -u
# Path to the scripts
PATH_CI="${PWD}/upstream-master-ci"
export PATH_CI
DATE=`date +%d%m%y-%H%M`

REPO_OWNER="ppc64le-cloud"
REPO_NAME="docker-ce-build"
PATH_SCRIPTS="/home/prow/go/src/github.com/${REPO_OWNER}/${REPO_NAME}"
echo DATE=\"${DATE}\" 2>&1 | tee ${PATH_SCRIPTS}/env/date.list

echo "Prow Job to run CI tests on the Docker packages"

Expand All @@ -14,4 +20,13 @@ echo "** Set up (env files) **"
chmod ug+x ${PATH_CI}/get-env-ci.sh && ${PATH_CI}/get-env-ci.sh

echo "*** Check Config ***"
chmod ug+x ${PATH_CI}/info.sh && ${PATH_CI}/info.sh
chmod ug+x ${PATH_CI}/info.sh
${PATH_CI}/info.sh

if [[ $? == 0 ]]; then
chmod ug+x ./setup-pj-trigger.sh
./setup-pj-trigger.sh -r ppc64le-cloud/docker-ce-build
else
echo "The kernel is not suitable to run Docker."
exit 1
fi
2 changes: 0 additions & 2 deletions upstream-master-ci/prow-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ set -u
begin=$SECONDS

echo "Prow Job to run integration tests on the Docker packages"
echo "Skip integration tests"
exit 0
${PWD}/dockerctl.sh start

set -o allexport
Expand Down
2 changes: 0 additions & 2 deletions upstream-master-ci/prow-unit-test-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ begin=$SECONDS
PATH_CI="${PWD}/upstream-master-ci"
export PATH_CI
echo "Prow Job to run CI tests on the Docker packages"
echo "Skip unit tests"
exit 0
if [[ -z ${ARTIFACTS} ]]; then
ARTIFACTS=/logs/artifacts
echo "Setting ARTIFACTS to ${ARTIFACTS}"
Expand Down

0 comments on commit e2f8d34

Please sign in to comment.