blob: 25434bb422e65f7433855a91a8ad2a110e2da623 [file] [log] [blame]
Saheer Babuc87147b2025-08-15 12:27:32 +01001pipeline {
2 agent {
3 kubernetes {
4 yaml """
5apiVersion: v1
6kind: Pod
7spec:
8 volumes:
9 - name: docker-auth
10 emptyDir: {}
11
12 containers:
13 - name: awscli
14 image: amazon/aws-cli
15 command: ['cat']
16 tty: true
17 volumeMounts:
18 - name: docker-auth
19 mountPath: /root/.docker
20
21 - name: buildah
22 image: quay.io/buildah/stable
23 command: ['cat']
24 tty: true
Saheer Babue6b2c0b2025-08-15 16:12:07 +010025 resources:
26 limits:
27 ephemeral-storage: "80Gi"
Saheer Babuc87147b2025-08-15 12:27:32 +010028 env:
29 - name: STORAGE_DRIVER
30 value: vfs
31 volumeMounts:
32 - name: docker-auth
33 mountPath: /root/.docker
34"""
35 defaultContainer 'buildah'
36 }
37 }
38
Saheer Babuc87147b2025-08-15 12:27:32 +010039 stages {
Saheer Babudbbf8572025-08-15 12:40:21 +010040 stage('Build and Push Multiple Images') {
Saheer Babu1a0c5a22025-08-15 12:41:43 +010041 steps {
42 container('buildah') {
43 checkout scm
Saheer Babu39531ba2025-08-15 14:49:24 +010044
Saheer Babu8a3a6ea2025-08-15 14:55:06 +010045
46 sh '''
Saheer Babu79299ce2025-08-15 14:32:49 +010047 env
Saheer Babu8a3a6ea2025-08-15 14:55:06 +010048 PROJECT="dockerfiles"
Saheer Babu27dd8bb2025-08-15 15:05:50 +010049 git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} ${PROJECT}
Saheer Babu8a3a6ea2025-08-15 14:55:06 +010050 cd ${PROJECT}
Saheer Babu27dd8bb2025-08-15 15:05:50 +010051 git fetch origin ${GERRIT_REFSPEC}
Saheer Babu9b82b912025-08-15 13:08:29 +010052 git checkout FETCH_HEAD
Saheer Babu8a3a6ea2025-08-15 14:55:06 +010053 '''
Saheer Babu9b82b912025-08-15 13:08:29 +010054
Saheer Babu1a0c5a22025-08-15 12:41:43 +010055 sh "env"
56 sh "ci-dockerfiles-deployment/build-version.sh"
57 sh "ci-dockerfiles-deployment/builders.sh"
58 sh "ci-dockerfiles-deployment/report.sh"
59 }
Saheer Babuc87147b2025-08-15 12:27:32 +010060 }
Saheer Babuc87147b2025-08-15 12:27:32 +010061 }
Saheer Babuc87147b2025-08-15 12:27:32 +010062 }
Saheer Babudbbf8572025-08-15 12:40:21 +010063}
64
65
66