steps: build-frontend: name: Build & Push Frontend image: woodpeckerci/plugin-kaniko when: event: [ push, pull_request, tag, manual ] path: include: [ frontend/** ] settings: registry: harbor.dvirlabs.com repo: my-apps/labmap-frontend dockerfile: frontend/Dockerfile context: frontend tags: - latest - ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:7} username: from_secret: DOCKER_USERNAME password: from_secret: DOCKER_PASSWORD build-backend: name: Build & Push Backend image: woodpeckerci/plugin-kaniko when: event: [ push, pull_request, tag, manual ] path: include: [ backend/** ] settings: registry: harbor.dvirlabs.com repo: my-apps/labmap-backend dockerfile: backend/Dockerfile context: backend tags: - latest - ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:7} username: from_secret: DOCKER_USERNAME password: from_secret: DOCKER_PASSWORD patch-my-apps: name: Patch Helm Values image: alpine:3.19 when: event: [ push ] environment: GIT_USERNAME: from_secret: GIT_USERNAME GIT_TOKEN: from_secret: GIT_TOKEN IMAGE_TAG: ${CI_COMMIT_BRANCH}-${CI_COMMIT_SHA:0:7} commands: - apk add --no-cache git curl yq - git config --global user.name "Woodpecker Bot" - git config --global user.email "ci@dvirlabs.com" - echo "${GIT_USERNAME:0:3}***" - git clone https://${GIT_USERNAME}:${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/my-apps.git - cd my-apps/manifests/labmap - yq -i ".image.tag = \"${IMAGE_TAG}\"" values.yaml - git add values.yaml - git commit -m "Update labmap image tag to ${IMAGE_TAG}" || echo "Nothing to commit" - git push origin master