Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.4 KiB
Newer Older
Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
stages:
Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
  - build
  image: alpine/git
  stage: clone
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.opencode.de/opencode-analyzer/occmd
Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
.base:
  image:
    name: gcr.io/kaniko-project/executor:debug
    entrypoint: [""]
  cache: {}
Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
  tags:
    - "opencode-high"
  before_script:
    - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json

Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
  extends: .base
  stage: build
Jan-Niclas Strüwer's avatar
Jan-Niclas Strüwer committed
  script:
    - /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHORT_SHA}"
    - 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 -

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.