Skip to content

Commit

Permalink
Build csb-docproxy image with new builder image feature
Browse files Browse the repository at this point in the history
Full motivation for the builder image here: cloud-gov/product#3216 (comment)
  • Loading branch information
jameshochadel committed Dec 11, 2024
1 parent 39dcf01 commit c3c80e1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 6 deletions.
3 changes: 3 additions & 0 deletions ci/container/internal/base_vars.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
base-image: ubuntu-hardened
base-image-tag: latest
# Some Dockerfiles may wish to specify a separate builder image for a multi-stage build. Set these vars to do so. By default, it is the same as base-image to avoid pulling additional layers.
builder-image: ubuntu-hardened
builder-image-tag: latest
oci-build-params: {}
common-pipelines-trigger: false
dockerfile-path: []
Expand Down
5 changes: 5 additions & 0 deletions ci/container/internal/csb-docproxy/vars.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
builder-image: general-task
builder-image-tag: latest
image-repository: csb-docproxy
src-repo: cloud-gov/csb
src-branch: brokerpak-topic
1 change: 1 addition & 0 deletions ci/container/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
- legacy-domain-certificate-renewer-testing
- opensearch-testing
- opensearch-dashboards-testing
- csb-docproxy

do:
- set_pipeline: ((.:name))
Expand Down
15 changes: 9 additions & 6 deletions container/oci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ image_resource:
tag: latest

caches:
- path: cache
- path: cache

inputs:
- name: src
- name: base-image
- name: common-pipelines
- name: common-dockerfiles
- name: src
- name: base-image
- name: builder-image
- name: common-pipelines
- name: common-dockerfiles

outputs:
- name: image
- name: image

run:
path: build
Expand All @@ -38,3 +39,5 @@ params:
CONTEXT: src
# Load the base image tarball from the base-image input into an OCI image reference.
IMAGE_ARG_base_image: base-image/image.tar
# Load the builder image in the same manner.
IMAGE_ARG_builder_image: builder-image/image.tar
9 changes: 9 additions & 0 deletions container/pipeline-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ resources:
tag: ((base-image-tag))
aws_region: us-gov-west-1

- name: builder-image
type: registry-image
source:
aws_access_key_id: ((ecr_aws_key))
aws_secret_access_key: ((ecr_aws_secret))
repository: ((builder-image))
tag: ((builder-image-tag))
aws_region: us-gov-west-1

- name: common-pipelines
type: git
source:
Expand Down

0 comments on commit c3c80e1

Please sign in to comment.