fix(blog-ci): pass CDN settings as Pipeline parameters
Remove CDN ConfigMaps and forward CDN_URL_PREFIX, CDN_BASE_URL, CDN_S3_BUCKET_NAME, and AWS_REGION through build and publication tasks.
This commit is contained in:
1 parent
87a1d04da1
commit
ccf2190592
5 files changed
+90
-52
No files matched your search
@@ -7,6 +7,18 @@ spec:
|
||||
params:
|
||||
- name: git-revision
|
||||
type: string
|
||||
- name: CDN_URL_PREFIX
|
||||
type: string
|
||||
default: blog-staging
|
||||
- name: CDN_BASE_URL
|
||||
type: string
|
||||
default: https://cdn.rabbitmaus.com
|
||||
- name: CDN_S3_BUCKET_NAME
|
||||
type: string
|
||||
default: rabbitmaus
|
||||
- name: AWS_REGION
|
||||
type: string
|
||||
default: ap-southeast-2
|
||||
results:
|
||||
- name: image-digest
|
||||
value: $(tasks.build-arm64.results.image-digest)
|
||||
@@ -59,6 +71,14 @@ spec:
|
||||
value: registry.dahyeon.us/dahyeon/blog:sha-$(params.git-revision)-$(context.pipelineRun.uid)
|
||||
- name: pipeline-run-uid
|
||||
value: $(context.pipelineRun.uid)
|
||||
- name: CDN_URL_PREFIX
|
||||
value: $(params.CDN_URL_PREFIX)
|
||||
- name: CDN_BASE_URL
|
||||
value: $(params.CDN_BASE_URL)
|
||||
- name: CDN_S3_BUCKET_NAME
|
||||
value: $(params.CDN_S3_BUCKET_NAME)
|
||||
- name: AWS_REGION
|
||||
value: $(params.AWS_REGION)
|
||||
- name: environment
|
||||
value: staging
|
||||
workspaces:
|
||||
@@ -82,6 +102,8 @@ spec:
|
||||
value: $(tasks.build-arm64.results.cdn-release-id)
|
||||
- name: cdn-manifest-key
|
||||
value: $(tasks.build-arm64.results.cdn-manifest-key)
|
||||
- name: CDN_URL_PREFIX
|
||||
value: $(params.CDN_URL_PREFIX)
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: source
|
||||
@@ -97,6 +119,18 @@ spec:
|
||||
params:
|
||||
- name: git-revision
|
||||
type: string
|
||||
- name: CDN_URL_PREFIX
|
||||
type: string
|
||||
default: blog
|
||||
- name: CDN_BASE_URL
|
||||
type: string
|
||||
default: https://cdn.rabbitmaus.com
|
||||
- name: CDN_S3_BUCKET_NAME
|
||||
type: string
|
||||
default: rabbitmaus
|
||||
- name: AWS_REGION
|
||||
type: string
|
||||
default: ap-southeast-2
|
||||
results:
|
||||
- name: image-digest
|
||||
value: $(tasks.build-arm64.results.image-digest)
|
||||
@@ -149,6 +183,14 @@ spec:
|
||||
value: registry.dahyeon.us/dahyeon/blog:sha-$(params.git-revision)-$(context.pipelineRun.uid)
|
||||
- name: pipeline-run-uid
|
||||
value: $(context.pipelineRun.uid)
|
||||
- name: CDN_URL_PREFIX
|
||||
value: $(params.CDN_URL_PREFIX)
|
||||
- name: CDN_BASE_URL
|
||||
value: $(params.CDN_BASE_URL)
|
||||
- name: CDN_S3_BUCKET_NAME
|
||||
value: $(params.CDN_S3_BUCKET_NAME)
|
||||
- name: AWS_REGION
|
||||
value: $(params.AWS_REGION)
|
||||
- name: environment
|
||||
value: prod
|
||||
workspaces:
|
||||
@@ -172,6 +214,8 @@ spec:
|
||||
value: $(tasks.build-arm64.results.cdn-release-id)
|
||||
- name: cdn-manifest-key
|
||||
value: $(tasks.build-arm64.results.cdn-manifest-key)
|
||||
- name: CDN_URL_PREFIX
|
||||
value: $(params.CDN_URL_PREFIX)
|
||||
workspaces:
|
||||
- name: source
|
||||
workspace: source
|
||||
|
||||
Reference in new issue
Block a user