use different docker tags for master and nightly runs,

This allow us to decouple our test-ci from the release-ci and is necessary for multiple release channels in the future.
E.g. we can run a master build without it directly beeing pushed to watchtower and airshipper (config setting requiered on airshipper)
Adjust Tags for server-cli
This commit is contained in:
Marcel 2021-04-01 07:33:05 +00:00 committed by Marcel Märtens
parent 8d664ded1a
commit ea16fa10ab
3 changed files with 29 additions and 7 deletions

View File

@ -5,7 +5,16 @@
tags:
- veloren-docker
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
when: always
- when: never
.publish-nightly:
stage: publish
tags:
- veloren-docker
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- when: never
@ -20,7 +29,20 @@ docker:
- ls "$CI_PROJECT_DIR/server-cli/"
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/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-server"
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}/server-cli:${CI_COMMIT_REF_NAME}"
docker-nightly:
extends: .publish-nightly
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
dependencies:
- linux
before_script:
- ls "$CI_PROJECT_DIR/server-cli/"
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/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}/server-cli:nightly"
pages:
extends: .publish

View File

@ -9,12 +9,12 @@
- when: manual
allow_failure: true
# Template to only run if pushes to master or a tag happened and it being triggered by a schedule
# Template to only run if pushes to master or a tag happened
.release:
stage: build
tags:
- veloren-docker
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && ( $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/ )
- if: $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/
when: always
- when: never

View File

@ -2,7 +2,7 @@ version: "3.5"
services:
game-server:
image: registry.gitlab.com/veloren/veloren:master-server
image: registry.gitlab.com/veloren/veloren/server-cli:nightly
container_name: veloren-game-server-master
ports:
- "14004:14004"