mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
# Publishes veloren-server-cli to the gitlab container registry
|
|
# https://gitlab.com/veloren/veloren/container_registry
|
|
.publish:
|
|
stage: publish
|
|
tags:
|
|
- veloren-docker
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
|
|
when: always
|
|
- when: never
|
|
|
|
docker:
|
|
extends: .publish
|
|
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}:${CI_COMMIT_REF_NAME}-server"
|
|
|
|
pages:
|
|
extends: .publish
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
script:
|
|
- rm -rf public
|
|
- mkdir -p public
|
|
- cargo doc --no-deps --document-private-items
|
|
- mv target/doc/* public
|
|
|
|
tag-release:
|
|
extends: .publish
|
|
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]+/ )
|
|
# when: always
|
|
# - when: never
|
|
script:
|
|
- git config --global user.email "gitlab@veloren.net"
|
|
- git config --global user.name "Veloren Admin"
|
|
- git remote remove api-origin || echo "api-origin remote did not already exist"
|
|
- git remote add api-origin https://oauth2:${TAGTOKEN}@gitlab.com/veloren/veloren.git
|
|
- git tag -f airshipper
|
|
- git push api-origin --tags -f |