2020-10-23 15:39:45 +00:00
|
|
|
---
|
|
|
|
- job:
|
|
|
|
name: build-images
|
2021-02-25 08:23:57 +00:00
|
|
|
description: Build container images from the devel branch.
|
2020-10-23 15:39:45 +00:00
|
|
|
project-type: pipeline
|
|
|
|
concurrent: false
|
|
|
|
properties:
|
|
|
|
- github:
|
|
|
|
url: https://github.com/ceph/ceph-csi
|
|
|
|
- build-discarder:
|
|
|
|
days-to-keep: 7
|
|
|
|
artifact-days-to-keep: 7
|
|
|
|
# yamllint disable rule:line-length
|
|
|
|
dsl: |
|
|
|
|
def GIT_REPO = 'http://github.com/ceph/ceph-csi'
|
2021-02-25 08:23:57 +00:00
|
|
|
def GIT_BRANCH = 'devel'
|
2020-10-23 15:39:45 +00:00
|
|
|
node {
|
|
|
|
stage('checkout repository') {
|
|
|
|
git url: "${GIT_REPO}", branch: "${GIT_BRANCH}", changelog: false
|
|
|
|
}
|
|
|
|
stage('build images') {
|
2020-11-03 08:23:15 +00:00
|
|
|
def base_image = sh(script: 'source ${WORKSPACE}/build.env && echo ${BASE_IMAGE}',
|
|
|
|
returnStdout: true).trim()
|
2020-10-23 15:39:45 +00:00
|
|
|
parallel canary: {
|
2020-11-03 08:23:15 +00:00
|
|
|
sh "oc start-build --follow \
|
|
|
|
--build-arg=BASE_IMAGE='${base_image}' \
|
|
|
|
--build-arg=GO_ARCH=amd64 \
|
|
|
|
ceph-csi-canary"
|
2020-10-23 15:39:45 +00:00
|
|
|
},
|
|
|
|
test: {
|
2022-02-03 08:53:40 +00:00
|
|
|
sh 'oc start-build --follow \
|
|
|
|
--build-arg=GOARCH=amd64 \
|
|
|
|
ceph-csi-test'
|
2020-10-23 15:39:45 +00:00
|
|
|
},
|
|
|
|
devel: {
|
2020-11-03 08:23:15 +00:00
|
|
|
sh "oc start-build --follow \
|
|
|
|
--build-arg=BASE_IMAGE='${base_image}' \
|
2022-02-03 08:53:40 +00:00
|
|
|
--build-arg=GOARCH=amd64 \
|
2020-11-03 08:23:15 +00:00
|
|
|
ceph-csi-devel"
|
2020-10-23 15:39:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
# yamllint enable rule:line-length
|
|
|
|
scm:
|
|
|
|
- git:
|
|
|
|
name: origin
|
|
|
|
url: https://github.com/ceph/ceph-csi
|
|
|
|
branches:
|
2021-02-25 08:23:57 +00:00
|
|
|
- devel
|
2020-10-23 15:39:45 +00:00
|
|
|
triggers:
|
|
|
|
- pollscm:
|
|
|
|
cron: "H/5 * * * *"
|