diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 22758f39b5e2e305be7483ad9c9d04e34ef7f9fa..bb4a26e2b6aec3185e55be3291f525be06042fe1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -198,3 +198,30 @@ deploy-theodolite: - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" when: manual allow_failure: true + + +# Theodolite Random Scheduler + +deploy-random-scheduler: + stage: deploy + extends: + - .dind + script: + - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') + - docker build --pull -t theodolite-random-scheduler` execution/infrastructure/random-scheduler + - "[ ! $CI_COMMIT_TAG ] && docker tag theodolite-random-scheduler` $CR_HOST/$CR_ORG/theodolite-random-scheduler`:${DOCKER_TAG_NAME}latest" + - "[ $CI_COMMIT_TAG ] && docker tag theodolite-random-scheduler` $CR_HOST/$CR_ORG/theodolite-random-scheduler`:$CI_COMMIT_TAG" + - echo $CR_PW | docker login $CR_HOST -u $CR_USER --password-stdin + - docker push $CR_HOST/$CR_ORG/theodolite-random-scheduler` + - docker logout + rules: + - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_COMMIT_TAG" + when: always + - changes: + - execution/infrastructure/random-scheduler/**/* + if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" + when: always + - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" + when: manual + allow_failure: true + \ No newline at end of file diff --git a/execution/infrastructure/random-scheduler/README.md b/execution/infrastructure/random-scheduler/README.md index 2d8da30a30923ccdf2c0d42afa9dd8dd1b5e475b..59b9acb0aefd48a5afe581ebb96d871370760b10 100644 --- a/execution/infrastructure/random-scheduler/README.md +++ b/execution/infrastructure/random-scheduler/README.md @@ -9,4 +9,4 @@ Run the following commands - `docker push <user>/theodolite-random-scheduler` ## Deployment -Deploy the `deployment.yaml` file into Kubernetes. Note, that the `TARGET_NAMESPACE` environment variable specifies the operating namespace of the random scheduler. \ No newline at end of file +Deploy the `deployment.yaml` file into Kubernetes. Note, that the `TARGET_NAMESPACE` environment variable specifies the operating namespace of the random scheduler. diff --git a/execution/infrastructure/random-scheduler/deployment.yaml b/execution/infrastructure/random-scheduler/deployment.yaml index 84e2c25933f3315256afd634ceeb7af6a1e405d9..3c8c0ed5a8657146c1e9aba3e6715ec9c6456651 100644 --- a/execution/infrastructure/random-scheduler/deployment.yaml +++ b/execution/infrastructure/random-scheduler/deployment.yaml @@ -18,7 +18,7 @@ spec: serviceAccount: random-scheduler containers: - name: random-scheduler - image: theodolite/random-scheduler:latest + image: ghcr.io/cau-se/theodolite-random-scheduler:latest imagePullPolicy: Always env: - name: TARGET_NAMESPACE