Newer
Older

Tobias Petrasch
committed
only:
- main
- git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.opencode.de/opencode-analyzer/occmd

Jan-Niclas Strüwer
committed
artifacts:
paths:
- occmd/
.base:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
cache: {}
tags:
- "opencode-high"
before_script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"

Jan-Niclas Strüwer
committed
dependencies:
- clone_occmd
build_latest:
extends: .base
stage: build
only:
- main
script:
- /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:latest"
dependencies:
- clone_occmd
deploy:
image: bitnami/kubectl
before_script:
- export KUBECONFIG=$KUBECONFIG_FILE
stage: deploy
only:
- main
script:
- kubectl set image -f ./kubernetes/deployment.yaml b-dev-container=registry.opencode.de/opencode-analyzer/data-provider:${CI_COMMIT_SHORT_SHA} --namespace=fraunhofer --local -o yaml | kubectl apply --namespace=fraunhofer -f -