Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Docker CI #517

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions config/jobs/periodic/docker/periodic-ci-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
periodics:
AshwinHIBM marked this conversation as resolved.
Show resolved Hide resolved
- name: periodic-config-docker
cluster: k8s-ppc64le-cluster
labels:
preset-build-docker: "true"
cron: 0 0 * * *
decorate: true
extra_refs:
- base_ref: main
org: ppc64le-cloud
repo: docker-ce-build
reporter_config:
slack:
channel: 'prow-job-notifications'
job_states_to_report:
- failure
- error
report_template: 'Job {{.Spec.Job}} of type {{.Spec.Type}} ended with state {{.Status.State}}. <!subteam^S02N6DWBX0F> <{{.Status.URL}}|View logs>'
spec:
containers:
- image: quay.io/powercloud/docker-ce-build@sha256:b1e2679b9a5aabe15a94ae3130f5b02ce67441cf361fda7dc7a41929bb50ba87
resources:
requests:
cpu: "4000m"
limits:
cpu: "4000m"
command:
- /bin/bash
args:
- -c
- |
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

# Set the SSH key for git from the secret 'git-ssh-docker-ce-build'
echo "* Set up the ssh key for git *"
mkdir -p ~/.ssh
cp /etc/ssh-key/ssh-privatekey ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts

echo "* Start prow-info-docker *"
chmod ug+x $PWD/upstream-master-ci/prow-info-docker.sh
$PWD/upstream-master-ci/prow-info-docker.sh
AshwinHIBM marked this conversation as resolved.
Show resolved Hide resolved
rc=$?
[ $rc != 0 ] && echo "ERROR: prow-info-docker exited with code:$rc"
exit $rc
securityContext:
privileged: true
volumeMounts:
- name: boot
mountPath: /boot
- name: ssh-key
readOnly: true
mountPath: /etc/ssh-key
volumes:
- name: boot
hostpath:
path: /boot/
volumes:
- name: ssh-key
secret:
secretName: git-ssh-docker-ce-build

- name: periodic-build-dev-image-docker
cluster: k8s-ppc64le-cluster
labels:
preset-build-docker: "true"
cron: 10 0 * * *
decorate: true
extra_refs:
- base_ref: main
org: ppc64le-cloud
repo: docker-ce-build
reporter_config:
slack:
channel: 'prow-job-notifications'
job_states_to_report:
- failure
- error
report_template: 'Job {{.Spec.Job}} of type {{.Spec.Type}} ended with state {{.Status.State}}. <!subteam^S02N6DWBX0F> <{{.Status.URL}}|View logs>'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the slack_reporter_config for these jobs can be defined in a common location, such as presets or slack_reporter_configs. Could you please take a look if you have some bandwidth?

Copy link
Contributor Author

@AshwinHIBM AshwinHIBM Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One approach to address this by moving reporter_config to config.yaml
doesn't work.

spec:
containers:
- image: quay.io/powercloud/docker-ce-build@sha256:b1e2679b9a5aabe15a94ae3130f5b02ce67441cf361fda7dc7a41929bb50ba87
resources:
requests:
cpu: "4000m"
limits:
cpu: "4000m"
command:
- /bin/bash
args:
- -c
- |
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
echo "* Start prow-build-dev-image *"
chmod ug+x $PWD/upstream-master-ci/prow-build-dev-image.sh
$PWD/upstream-master-ci/prow-build-dev-image.sh
rc=$?
[ $rc != 0 ] && echo "ERROR: prow-build-dev-image exited with code:$rc"
exit $rc
securityContext:
Rajalakshmi-Girish marked this conversation as resolved.
Show resolved Hide resolved
privileged: true
161 changes: 161 additions & 0 deletions config/jobs/ppc64le-cloud/build-docker/postsubmit-ci-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
postsubmits:
ppc64le-cloud/docker-ce-build:
- name: postsubmit-unit-test-docker
cluster: k8s-ppc64le-cluster
labels:
preset-build-docker: "true"
decorate: true
decoration_config:
timeout: 2h
run_if_changed: 'job/periodic-config-docker'
reporter_config:
slack:
channel: 'prow-job-notifications'
job_states_to_report:
- failure
- error
report_template: 'Job {{.Spec.Job}} of type {{.Spec.Type}} ended with state {{.Status.State}}. <!subteam^S02N6DWBX0F> <{{.Status.URL}}|View logs>'
branches:
- prow-job-tracking
spec:
containers:
- image: quay.io/powercloud/docker-ce-build@sha256:b1e2679b9a5aabe15a94ae3130f5b02ce67441cf361fda7dc7a41929bb50ba87
resources:
requests:
cpu: "4000m"
limits:
cpu: "4000m"
command:
- /bin/bash
args:
- -c
- |
##
# This job is populated with the files from the 'prow-job-tracking' branch.
# We switch to the 'main' branch, as it contains the scripts used by this job.
###

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

#Set this to your dev branch for testing
WORK_BRANCH=main
git fetch https://github.com/${REPO_OWNER}/${REPO_NAME} ${WORK_BRANCH}
git checkout ${WORK_BRANCH}
echo "* Start prow-unit-test-docker *"
chmod ug+x $PWD/upstream-master-ci/prow-unit-test-docker.sh
$PWD/upstream-master-ci/prow-unit-test-docker.sh
rc=$?
[ $rc != 0 ] && echo "ERROR: prow-unit-test-docker exited with code:$rc"
exit $rc

securityContext:
privileged: true
- name: postsubmit-integration-cli-docker
cluster: k8s-ppc64le-cluster
labels:
preset-build-docker: "true"
decorate: true
decoration_config:
timeout: 2h
run_if_changed: 'job/periodic-config-docker'
reporter_config:
slack:
channel: 'prow-job-notifications'
job_states_to_report:
- failure
- error
report_template: 'Job {{.Spec.Job}} of type {{.Spec.Type}} ended with state {{.Status.State}}. <!subteam^S02N6DWBX0F> <{{.Status.URL}}|View logs>'
branches:
- prow-job-tracking
spec:
containers:
- image: quay.io/powercloud/docker-ce-build@sha256:b1e2679b9a5aabe15a94ae3130f5b02ce67441cf361fda7dc7a41929bb50ba87
resources:
requests:
cpu: "4000m"
limits:
cpu: "4000m"
command:
- /bin/bash
args:
- -c
- |
##
# This job is populated with the files from the 'prow-job-tracking' branch.
# We switch to the 'main' branch, as it contains the scripts used by this job.
###

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

#Set this to your dev branch for testing
WORK_BRANCH=main
git fetch https://github.com/${REPO_OWNER}/${REPO_NAME} ${WORK_BRANCH}
git checkout ${WORK_BRANCH}
echo "* Start prow-integration-cli-docker *"
chmod ug+x $PWD/upstream-master-ci/prow-integration-cli.sh
$PWD/upstream-master-ci/prow-integration-cli.sh
rc=$?
[ $rc != 0 ] && echo "ERROR: prow-integration-cli-docker exited with code:$rc"
exit $rc

securityContext:
privileged: true
- name: postsubmit-integration-test-docker
cluster: k8s-ppc64le-cluster
labels:
preset-build-docker: "true"
decorate: true
decoration_config:
timeout: 2h
run_if_changed: 'job/periodic-config-docker'
reporter_config:
slack:
channel: 'prow-job-notifications'
job_states_to_report:
- failure
- error
report_template: 'Job {{.Spec.Job}} of type {{.Spec.Type}} ended with state {{.Status.State}}. <!subteam^S02N6DWBX0F> <{{.Status.URL}}|View logs>'
branches:
- prow-job-tracking
spec:
containers:
- image: quay.io/powercloud/docker-ce-build@sha256:b1e2679b9a5aabe15a94ae3130f5b02ce67441cf361fda7dc7a41929bb50ba87
resources:
requests:
cpu: "4000m"
limits:
cpu: "4000m"
command:
- /bin/bash
args:
- -c
- |
##
# This job is populated with the files from the 'prow-job-tracking' branch.
# We switch to the 'main' branch, as it contains the scripts used by this job.
###

set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

#Set this to your dev branch for testing
WORK_BRANCH=main
git fetch https://github.com/${REPO_OWNER}/${REPO_NAME} ${WORK_BRANCH}
git checkout ${WORK_BRANCH}
echo "* Start prow-integration-test-docker *"
chmod ug+x $PWD/upstream-master-ci/prow-integration-tests.sh
$PWD/upstream-master-ci/prow-integration-tests.sh
rc=$?
[ $rc != 0 ] && echo "ERROR: prow-integration-test-docker exited with code:$rc"
exit $rc

securityContext:
privileged: true