This repository has been archived by the owner on Jul 4, 2024. It is now read-only.
forked from tmforum-oda/oda-canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configure prerelease version in values.yaml also for building
dockerfile.
- Loading branch information
1 parent
9be7251
commit f17f7b5
Showing
5 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Build SecretsManagement-Operator Dockerimage | ||
run-name: Build SecretsManagement-Operator Dockerimage | ||
on: | ||
push: | ||
branches: | ||
- odaa-* | ||
#paths: | ||
#- source/operators/secretsmanagementOperator-hc/docker/**/* | ||
jobs: | ||
build-secrets-management-operator-dockerfile-job: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: read versionnumber of secretsmanagement-operator from values.yaml | ||
id: get_smanop_version | ||
uses: mikefarah/yq@master | ||
with: | ||
cmd: yq '[.secretsmanagement-operator.version, .secretsmanagement-operator.prereleaseSuffix] | filter(.!=null and .!="") | join("-")' charts/canvas-oda/values.yaml | ||
|
||
- name: Check Version | ||
id: check-tag | ||
run: | | ||
echo | ||
if [[ ${{ steps.get_smanop_version.outputs.result }} =~ ^[0-9]+\.[0-9]+\.[0-9]+-.*$ ]]; then | ||
echo "Version ${{ steps.get_smanop_version.outputs.result }} matches featurebranch format <n>.<n>.<n>-<prerelease>" | ||
else | ||
echo "::error::Version ${{ steps.get_smanop_version.outputs.result }} does not matche featurebranch format <n>.<n>.<n>-<prerelease>" && exit 1 | ||
fi | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Get Git commit timestamps | ||
run: echo "TIMESTAMP=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV | ||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: source/operators/secretsmanagementOperator-hc/docker | ||
# arm64 has problems building cffi python wheel | ||
#platforms: linux/amd64,linux/arm64 | ||
platforms: linux/amd64 | ||
push: true | ||
tags: | | ||
ocfork/secretsmanagement-operator:latest | ||
ocfork/secretsmanagement-operator:${{ steps.get_smanop_version.outputs.result }} | ||
env: | ||
SOURCE_DATE_EPOCH: ${{ env.TIMESTAMP }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{/* | ||
build the full docker image name from image + version + prereleaseSuffix | ||
*/}} | ||
{{- define "secretsmanagementoperator.dockerimage" -}} | ||
{{- .Values.image -}}:{{- .Values.version -}} | ||
{{- if .Values.prereleaseSuffix -}}-{{- .Values.prereleaseSuffix -}}{{- end -}} | ||
{{- end -}} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters