blob: 969bb340d74f6c2b0736f929ae04e7f4c651231b [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
25 env:
26 - name: STORAGE_DRIVER
27 value: vfs
28 volumeMounts:
29 - name: docker-auth
30 mountPath: /root/.docker
31"""
32 defaultContainer 'buildah'
33 }
34 }
35
Saheer Babuc87147b2025-08-15 12:27:32 +010036 stages {
Saheer Babudbbf8572025-08-15 12:40:21 +010037 stage('Build and Push Multiple Images') {
Saheer Babu1a0c5a22025-08-15 12:41:43 +010038 steps {
39 container('buildah') {
40 checkout scm
Saheer Babu9b82b912025-08-15 13:08:29 +010041 sh """
42 PROJECT="dockerfiles"
Saheer Babubb417602025-08-15 13:17:32 +010043 git clone https://${env.GERRIT_HOST}/${env.GERRIT_PROJECT} ${env.PROJECT}
44 cd ${env.PROJECT}
Saheer Babu3d2ac252025-08-15 13:13:35 +010045 git fetch origin ${env.GERRIT_REFSPEC}
Saheer Babu9b82b912025-08-15 13:08:29 +010046 git checkout FETCH_HEAD
47 """
48
Saheer Babu1a0c5a22025-08-15 12:41:43 +010049 sh "env"
50 sh "ci-dockerfiles-deployment/build-version.sh"
51 sh "ci-dockerfiles-deployment/builders.sh"
52 sh "ci-dockerfiles-deployment/report.sh"
53 }
Saheer Babuc87147b2025-08-15 12:27:32 +010054 }
Saheer Babuc87147b2025-08-15 12:27:32 +010055 }
Saheer Babuc87147b2025-08-15 12:27:32 +010056 }
Saheer Babudbbf8572025-08-15 12:40:21 +010057}
58
59
60