Skip to content

Commit 63dc0cb

Browse files
dwasingeDerek Wasinger
andauthored
Tagging for Releases/Latest/Master (#50)
* updated repo * changing tag from latest to master * keep sha add master * release tags for version and latest * pointing to fork * corrected image name * reverting back to rht-labs from fork * job name and more testing * reverted from fork, removed debugging * fork changed on * reverted from branch * removed latest from templates * image name fix and always have trigger Co-authored-by: Derek Wasinger <[email protected]>
1 parent 0f2eb05 commit 63dc0cb

File tree

4 files changed

+33
-9
lines changed

4 files changed

+33
-9
lines changed

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ jobs:
3636
image_push_registry: quay.io
3737
image_push_username: ${{ secrets.QUAY_USERNAME }}
3838
image_push_password: ${{ secrets.QUAY_PASSWORD }}
39+
image_tags: master

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Add Tags to Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: get the release version
13+
id: get_version
14+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
15+
- name: tag with release version
16+
uses: tinact/[email protected]
17+
with:
18+
image_name: rht-labs/omp-git-api
19+
image_old_tag: ${{ github.sha }}
20+
image_new_tag: ${{ steps.get_version.outputs.VERSION }}
21+
registry: quay.io
22+
registry_username: ${{ secrets.QUAY_USERNAME }}
23+
registry_password: ${{ secrets.QUAY_PASSWORD }}
24+
- name: tag with latest
25+
uses: tinact/[email protected]
26+
with:
27+
image_name: rht-labs/omp-git-api
28+
image_old_tag: ${{ github.sha }}
29+
registry: quay.io
30+
registry_username: ${{ secrets.QUAY_USERNAME }}
31+
registry_password: ${{ secrets.QUAY_PASSWORD }}

deployment/templates/deploymentconfig.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ spec:
3030
- envFrom:
3131
- secretRef:
3232
name: omp-gitlab-configuration
33-
{{- if eq .Values.imageTag "latest" }}
3433
image: {{ .Values.name }}:{{ .Values.imageTag }}
35-
{{- else }}
36-
image: {{ .Values.imageName }}:{{ .Values.imageTag }}
37-
{{- end }}
3834
imagePullPolicy: Always
3935
name: {{ .Values.name }}
4036
ports:
@@ -51,7 +47,6 @@ spec:
5147
test: false
5248
triggers:
5349
- type: ConfigChange
54-
{{- if or (.Values.development) (eq .Values.imageTag "latest") }}
5550
- type: ImageChange
5651
imageChangeParams:
5752
automatic: true
@@ -60,4 +55,3 @@ spec:
6055
name: {{ .Values.name }}:{{ .Values.imageTag }}
6156
containerNames:
6257
- {{ .Values.name }}
63-
{{- end }}

deployment/templates/imagestream.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
{{- if eq .Values.imageTag "latest" }}
21
---
32
apiVersion: image.openshift.io/v1
43
kind: ImageStream
@@ -20,5 +19,4 @@ spec:
2019
name: {{ .Values.imageTag }}
2120
referencePolicy:
2221
type: Source
23-
{{- end }}
24-
{{- end }}
22+
{{- end }}

0 commit comments

Comments
 (0)