Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 57e9c1f

Browse files
committed
Mount version from helm chart version instead of at build time
1 parent de35084 commit 57e9c1f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,12 @@ jobs:
6363
cd operator/
6464
go fmt ./...
6565
go vet ./...
66-
- name: Parse Tag
67-
id: parse-tag
68-
run: echo ::set-output name=version::${GITHUB_REF#refs/*/}
6966
- name: "Build'n Push Operator"
7067
uses: docker/build-push-action@v1
7168
with:
7269
username: ${{ secrets.DOCKER_USERNAME }}
7370
password: ${{ secrets.DOCKER_PASSWORD }}
7471
repository: scbexperimental/operator
75-
build_args: VERSION=`${{ steps.parse-tag.outputs.version }}
7672
tag_with_ref: true
7773
tag_with_sha: true
7874
path: ./operator/

operator/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager
2323
# Refer to https://github.com/GoogleContainerTools/distroless for more details
2424
FROM gcr.io/distroless/static:nonroot
2525

26-
ARG VERSION=unkown
27-
ENV VERSION ENV ${BRANCH}
26+
ENV VERSION=unkown
2827
ENV TELEMETRY_ENABLED "true"
2928

3029
WORKDIR /

operator/templates/manager/manager.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ spec:
3434
{{- if .Values.minio.enabled }}
3535
- name: S3_USE_SSL
3636
value: 'false'
37+
- name: VERSION
38+
value: {{ .Chart.Version | quote }}
3739
- name: S3_ENDPOINT
3840
value: "{{ .Release.Name }}-minio.{{ .Release.Namespace }}.svc.cluster.local"
3941
- name: S3_PORT

0 commit comments

Comments
 (0)