Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 1 | pipeline { |
2 | agent { | ||||
3 | kubernetes { | ||||
4 | yaml """ | ||||
5 | apiVersion: v1 | ||||
6 | kind: Pod | ||||
7 | spec: | ||||
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 Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 36 | stages { |
Saheer Babu | dbbf857 | 2025-08-15 12:40:21 +0100 | [diff] [blame] | 37 | stage('Build and Push Multiple Images') { |
Saheer Babu | 1a0c5a2 | 2025-08-15 12:41:43 +0100 | [diff] [blame] | 38 | steps { |
39 | container('buildah') { | ||||
40 | checkout scm | ||||
Saheer Babu | 39531ba | 2025-08-15 14:49:24 +0100 | [diff] [blame] | 41 | |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame^] | 42 | |
43 | sh ''' | ||||
Saheer Babu | 79299ce | 2025-08-15 14:32:49 +0100 | [diff] [blame] | 44 | env |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame^] | 45 | PROJECT="dockerfiles" |
46 | git clone https://$GERRIT_HOST/${GERRIT_PROJECT} $PROJECT | ||||
47 | cd ${PROJECT} | ||||
Saheer Babu | 3d2ac25 | 2025-08-15 13:13:35 +0100 | [diff] [blame] | 48 | git fetch origin ${env.GERRIT_REFSPEC} |
Saheer Babu | 9b82b91 | 2025-08-15 13:08:29 +0100 | [diff] [blame] | 49 | git checkout FETCH_HEAD |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame^] | 50 | ''' |
Saheer Babu | 9b82b91 | 2025-08-15 13:08:29 +0100 | [diff] [blame] | 51 | |
Saheer Babu | 1a0c5a2 | 2025-08-15 12:41:43 +0100 | [diff] [blame] | 52 | sh "env" |
53 | sh "ci-dockerfiles-deployment/build-version.sh" | ||||
54 | sh "ci-dockerfiles-deployment/builders.sh" | ||||
55 | sh "ci-dockerfiles-deployment/report.sh" | ||||
56 | } | ||||
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 57 | } |
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 58 | } |
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 59 | } |
Saheer Babu | dbbf857 | 2025-08-15 12:40:21 +0100 | [diff] [blame] | 60 | } |
61 | |||||
62 | |||||
63 |