veloren/.gitlab/CI/publish.gitlab-ci.yml

54 lines
1.7 KiB
YAML
Raw Normal View History

# Publishes veloren-server-cli to the gitlab container registry
# https://gitlab.com/veloren/veloren/container_registry
.publish:
stage: publish
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
when: always
- when: never
.publish-nightly:
stage: publish
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
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}/server-cli:${CI_COMMIT_REF_NAME}"
docker-nightly:
extends: .publish-nightly
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
dependencies:
- air-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
2021-06-01 20:26:41 +00:00
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
artifacts:
paths:
- public
script:
- rm -rf public
- mkdir -p public
2020-09-17 10:03:50 +00:00
- cargo doc --no-deps --document-private-items
- mv target/doc/* public