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

pipeline deploys to gitops/test on commit_tag

parent d466a09f
No related branches found
No related tags found
No related merge requests found
Pipeline #2290 canceled
...@@ -165,7 +165,7 @@ gitops-snapshot: ...@@ -165,7 +165,7 @@ gitops-snapshot:
- yq -i ".afm_adapter.helm.version = \"${PROJECT_VERSION}-main-${CI_COMMIT_SHORT_SHA}\"" ${VALUES_FILE} - yq -i ".afm_adapter.helm.version = \"${PROJECT_VERSION}-main-${CI_COMMIT_SHORT_SHA}\"" ${VALUES_FILE}
- yq -i ".fs_adapter.helm.version = \"${PROJECT_VERSION}-main-${CI_COMMIT_SHORT_SHA}\"" ${FS_VALUES_FILE} - yq -i ".fs_adapter.helm.version = \"${PROJECT_VERSION}-main-${CI_COMMIT_SHORT_SHA}\"" ${FS_VALUES_FILE}
- git add ${VALUES_FILE} ${FS_VALUES_FILE} - git add ${VALUES_FILE} ${FS_VALUES_FILE}
- git commit -m "code-sh GitLab CI rollout ${environment} ${PROJECT_ARTIFACTID} version ${SNAPSHOT_TAG}-${CI_COMMIT_SHORT_SHA}" - git commit -m "code-sh GitLab CI rollout ${GITOPS_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 - git push https://${GITEA_USER}:${GITEA_TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git
only: only:
- main - main
...@@ -208,3 +208,28 @@ push-release-helm-nexus: ...@@ -208,3 +208,28 @@ push-release-helm-nexus:
artifacts: artifacts:
paths: paths:
- "*.tgz" - "*.tgz"
gitops-release:
stage: gitops
variables:
GITOPS_ENVIRONMENT: test
VALUES_FILE_NAME: afm-adapter-values.yaml
FORMSOLUTIONS_VALUES_FILE_NAME: fs-adapter-values.yaml
VALUES_FILE: ${GITOPS_ENVIRONMENT}/application/values/${VALUES_FILE_NAME}
FS_VALUES_FILE: ${GITOPS_ENVIRONMENT}/application/values/${FORMSOLUTIONS_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 = \"${CI_COMMIT_TAG}\"" ${VALUES_FILE}
- yq -i ".afm_adapter.helm.version = \"${CI_COMMIT_TAG}\"" ${VALUES_FILE}
- yq -i ".fs_adapter.helm.version = \"${CI_COMMIT_TAG}\"" ${FS_VALUES_FILE}
- git add ${VALUES_FILE} ${FS_VALUES_FILE}
- git commit -m "code-sh GitLab CI rollout ${GITOPS_ENVIRONMENT} ${PROJECT_ARTIFACTID} version ${CI_COMMIT_TAG}"
- git push https://${GITEA_USER}:${GITEA_TOKEN}@git.ozg-sh.de/ozgcloud-devops/gitops.git
rules:
- if: $CI_COMMIT_TAG
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment