Skip to content

Commit

Permalink
fix: pulling images from ghcr directly
Browse files Browse the repository at this point in the history
  • Loading branch information
ytqsl committed Mar 27, 2024
1 parent 8d5b523 commit 8baa1a5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tools/helm/tools/templates/dev-release-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
- name: dev-registry-portal
params:
- name: sourceImage
value: artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/ecc-ecer/registry-portal
value: ghcr.io/bcgov/ecc-ecer/registry-portal
- name: sourceTag
value: latest
- name: destinationImage
Expand All @@ -24,7 +24,7 @@ spec:
- name: dev-api
params:
- name: sourceImage
value: artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/ecc-ecer/api
value: ghcr.io/bcgov/ecc-ecer/api
- name: sourceTag
value: latest
- name: destinationImage
Expand All @@ -35,4 +35,4 @@ spec:
value: true
taskRef:
kind: Task
name: tag-image-task
name: tag-image-task
7 changes: 5 additions & 2 deletions tools/helm/tools/templates/promote-image-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ spec:
type: string
- name: toTag
type: string
- name: referencePolicy
type: string
default: source
steps:
- name: backup
image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest
Expand All @@ -27,7 +30,7 @@ spec:
echo old image: $old
if [ ! -z "$old" -a "$new" != "$old" ];
then
oc tag $(params.imageName):$(params.toTag) $(params.imageName):$(params.toTag)-backup
oc tag $(params.imageName):$(params.toTag) $(params.imageName):$(params.toTag)-backup --reference-policy=$(params.referencePolicy)
fi
- name: promote
image: image-registry.openshift-image-registry.svc:5000/openshift/cli:latest
Expand All @@ -39,4 +42,4 @@ spec:
cpu: 5m
memory: 32Mi
script: |
oc tag $(params.imageName):$(params.fromTag) $(params.imageName):$(params.toTag)
oc tag $(params.imageName):$(params.fromTag) $(params.imageName):$(params.toTag) --reference-policy=$(params.referencePolicy)
5 changes: 4 additions & 1 deletion tools/helm/tools/templates/tag-image-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ spec:
- name: scheduled
type: string
default: false
- name: referencePolicy
type: string
default: source
steps:
- name: tag
image: 'image-registry.openshift-image-registry.svc:5000/openshift/cli:latest'
Expand All @@ -26,4 +29,4 @@ spec:
cpu: 5m
memory: 32Mi
script: |
oc tag $(params.sourceImage):$(params.sourceTag) $(params.destinationImage):$(params.destinationTag) --scheduled=$(params.scheduled)
oc tag $(params.sourceImage):$(params.sourceTag) $(params.destinationImage):$(params.destinationTag) --scheduled=$(params.scheduled) --reference-policy=$(params.referencePolicy)
4 changes: 2 additions & 2 deletions tools/helm/tools/values.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
images:
registry-portal:
image: artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/ecc-ecer/registry-portal
image: ghcr.io/bcgov/ecc-ecer/registry-portal
tags:
dev: latest
api:
image: artifacts.developer.gov.bc.ca/github-docker-remote/bcgov/ecc-ecer/api
image: ghcr.io/bcgov/ecc-ecer/api
tags:
dev: latest

0 comments on commit 8baa1a5

Please sign in to comment.