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 | ||||
Saheer Babu | e6b2c0b | 2025-08-15 16:12:07 +0100 | [diff] [blame^] | 25 | resources: |
26 | limits: | ||||
27 | ephemeral-storage: "80Gi" | ||||
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 28 | 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 Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 39 | stages { |
Saheer Babu | dbbf857 | 2025-08-15 12:40:21 +0100 | [diff] [blame] | 40 | stage('Build and Push Multiple Images') { |
Saheer Babu | 1a0c5a2 | 2025-08-15 12:41:43 +0100 | [diff] [blame] | 41 | steps { |
42 | container('buildah') { | ||||
43 | checkout scm | ||||
Saheer Babu | 39531ba | 2025-08-15 14:49:24 +0100 | [diff] [blame] | 44 | |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame] | 45 | |
46 | sh ''' | ||||
Saheer Babu | 79299ce | 2025-08-15 14:32:49 +0100 | [diff] [blame] | 47 | env |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame] | 48 | PROJECT="dockerfiles" |
Saheer Babu | 27dd8bb | 2025-08-15 15:05:50 +0100 | [diff] [blame] | 49 | git clone https://${GERRIT_HOST}/${GERRIT_PROJECT} ${PROJECT} |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame] | 50 | cd ${PROJECT} |
Saheer Babu | 27dd8bb | 2025-08-15 15:05:50 +0100 | [diff] [blame] | 51 | git fetch origin ${GERRIT_REFSPEC} |
Saheer Babu | 9b82b91 | 2025-08-15 13:08:29 +0100 | [diff] [blame] | 52 | git checkout FETCH_HEAD |
Saheer Babu | 8a3a6ea | 2025-08-15 14:55:06 +0100 | [diff] [blame] | 53 | ''' |
Saheer Babu | 9b82b91 | 2025-08-15 13:08:29 +0100 | [diff] [blame] | 54 | |
Saheer Babu | 1a0c5a2 | 2025-08-15 12:41:43 +0100 | [diff] [blame] | 55 | 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 Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 60 | } |
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 61 | } |
Saheer Babu | c87147b | 2025-08-15 12:27:32 +0100 | [diff] [blame] | 62 | } |
Saheer Babu | dbbf857 | 2025-08-15 12:40:21 +0100 | [diff] [blame] | 63 | } |
64 | |||||
65 | |||||
66 |