Skip to content
Snippets Groups Projects
Commit 14789342 authored by Lukas Malte Monnerjahn's avatar Lukas Malte Monnerjahn
Browse files

OZG-7377 Push Tags to GitOps Repo

parent 0b017f74
No related branches found
No related tags found
No related merge requests found
Pipeline #1515 passed
...@@ -21,6 +21,7 @@ stages: ...@@ -21,6 +21,7 @@ stages:
- build - build
- test - test
- publish - publish
- gitops
build: build:
stage: build stage: build
...@@ -88,6 +89,28 @@ push-snapshot-image-nexus: ...@@ -88,6 +89,28 @@ push-snapshot-image-nexus:
only: only:
- main - main
gitops-snapshot:
stage: gitops
variables:
GITOPS_ENVIRONMENT: dev
VALUES_FILE_NAME: afm-adapter-values.yaml
VALUES_FILE: ${GITOPS_ENVIRONMENT}/application/values/${VALUES_FILE_NAME}
before_script:
- apk add --no-cache git yq # yq-go in newer versions of alpine (from 3.20 on)
- git config --global user.name "${GITEA_USER}"
- git config --global user.email "${GITEA_USER_EMAIL}"
- !reference [.get-version, before_script]
script:
- git clone https://${GITEA_USER}:${GITEA_TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git
- cd gitops
- yq -i ".afm_adapter.image.tag = \"${SNAPSHOT_TAG}-${CI_COMMIT_SHORT_SHA}\"" ${VALUES_FILE}
- yq -i ".afm_adapter.helm.version = \"${PROJECT_VERSION}-main-${CI_COMMIT_SHORT_SHA}\"" ${VALUES_FILE}
- git add ${VALUES_FILE}
- git commit -m "code-sh GitLab CI rollout ${environment} ${PROJECT_ARTIFACTID} version ${SNAPSHOT_TAG}-${CI_COMMIT_SHORT_SHA}"
- git push https://${GITEA_USER}:${GITEA_TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git
only:
- main
# Release jobs # Release jobs
push-release-image-gitlab: push-release-image-gitlab:
stage: publish stage: publish
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment