Skip to content

Commit 81a2f7b

Browse files
KauzClayaramprice
authored andcommitted
ci: normalize base image consumption
* extract yaml anchors to make future updates easier Signed-off-by: Aram Price <[email protected]>
1 parent 3a140a5 commit 81a2f7b

File tree

4 files changed

+19
-12
lines changed

4 files changed

+19
-12
lines changed

ci/dockerfiles/integration/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ghcr.io/cloudfoundry/bosh/integration:main
2-
ARG BASE_IMAGE=ubuntu:jammy
2+
ARG BASE_IMAGE
33
FROM $BASE_IMAGE
44

55
ARG BOSH_CLI_URL

ci/dockerfiles/main-mysql/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG BRANCH
2-
FROM bosh/integration:${BRANCH}
1+
ARG BASE_IMAGE
2+
FROM $BASE_IMAGE
33

44
# Install Dependencies
55
RUN echo 'mysql-server mysql-server/root_password password password' | debconf-set-selections

ci/dockerfiles/main-postgres/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG BRANCH
2-
FROM bosh/integration:${BRANCH}
1+
ARG BASE_IMAGE
2+
FROM $BASE_IMAGE
33

44
ARG DB_VERSION
55

ci/pipeline.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
2+
anchors:
3+
- &integration_image ghcr.io/cloudfoundry/bosh/integration:noble
4+
- &ubuntu_base_noble ubuntu:noble
5+
- &ubuntu_base_jammy ubuntu:jammy
6+
27
groups:
38
- name: bosh
49
jobs:
@@ -1109,7 +1114,7 @@ jobs:
11091114
params:
11101115
bump: patch
11111116

1112-
- name: build-integration
1117+
- name: build-integration-jammy
11131118
public: true
11141119
serial: true
11151120
plan:
@@ -1140,6 +1145,8 @@ jobs:
11401145
params:
11411146
build: .
11421147
build_args_file: docker-build-args/docker-build-args.json
1148+
build_args:
1149+
BASE_IMAGE: *ubuntu_base_jammy
11431150
dockerfile: bosh-ci-dockerfiles/ci/dockerfiles/integration/Dockerfile
11441151
tag_as_latest: true
11451152
get_params:
@@ -1171,7 +1178,7 @@ jobs:
11711178
build: .
11721179
build_args_file: docker-build-args/docker-build-args.json
11731180
build_args:
1174-
BASE_IMAGE: ubuntu:noble
1181+
BASE_IMAGE: *ubuntu_base_noble
11751182
dockerfile: bosh-ci-dockerfiles/ci/dockerfiles/integration/Dockerfile
11761183
tag_as_latest: false
11771184
get_params:
@@ -1191,7 +1198,7 @@ jobs:
11911198
build: "bosh-ci-dockerfiles/ci/dockerfiles/main-postgres"
11921199
build_args:
11931200
DB_VERSION: "13"
1194-
BRANCH: ((branch_name))
1201+
BASE_IMAGE: *integration_image
11951202
get_params:
11961203
skip_download: true
11971204

@@ -1209,7 +1216,7 @@ jobs:
12091216
build: "bosh-ci-dockerfiles/ci/dockerfiles/main-postgres"
12101217
build_args:
12111218
DB_VERSION: "15"
1212-
BRANCH: ((branch_name))
1219+
BASE_IMAGE: *integration_image
12131220
get_params:
12141221
skip_download: true
12151222

@@ -1226,7 +1233,7 @@ jobs:
12261233
tag_as_latest: true
12271234
build: "bosh-ci-dockerfiles/ci/dockerfiles/main-mysql"
12281235
build_args:
1229-
BRANCH: ((branch_name))
1236+
BASE_IMAGE: *integration_image
12301237
get_params:
12311238
skip_download: true
12321239

@@ -1273,7 +1280,7 @@ jobs:
12731280
params:
12741281
build: docker-build-context
12751282
build_args:
1276-
BASE_IMAGE: bosh/integration:noble
1283+
BASE_IMAGE: *integration_image
12771284
tag_as_latest: false
12781285
get_params:
12791286
skip_download: true
@@ -1321,7 +1328,7 @@ jobs:
13211328
params:
13221329
build: docker-build-context
13231330
build_args:
1324-
BASE_IMAGE: bosh/integration:noble
1331+
BASE_IMAGE: *integration_image
13251332
tag_as_latest: true
13261333
get_params:
13271334
skip_download: true

0 commit comments

Comments
 (0)