2020-05-23 08:02:39 +00:00
|
|
|
# Publishes veloren-server-cli to the gitlab container registry
|
|
|
|
# https://gitlab.com/veloren/veloren/container_registry
|
2020-06-12 11:09:56 +00:00
|
|
|
.publish:
|
2020-05-14 16:12:22 +00:00
|
|
|
stage: publish
|
2020-06-12 11:09:56 +00:00
|
|
|
rules:
|
2021-04-01 07:33:05 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
|
2021-07-22 10:05:30 +00:00
|
|
|
when: on_success
|
2021-04-01 07:33:05 +00:00
|
|
|
- when: never
|
|
|
|
|
|
|
|
.publish-nightly:
|
|
|
|
stage: publish
|
|
|
|
rules:
|
2021-06-28 19:22:59 +00:00
|
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
|
2021-07-22 10:05:30 +00:00
|
|
|
when: on_success
|
2020-06-17 08:41:05 +00:00
|
|
|
- when: never
|
2020-06-12 11:09:56 +00:00
|
|
|
|
|
|
|
docker:
|
|
|
|
extends: .publish
|
2020-05-14 16:12:22 +00:00
|
|
|
image:
|
|
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
|
|
entrypoint: [""]
|
|
|
|
dependencies:
|
|
|
|
- linux
|
|
|
|
before_script:
|
|
|
|
- ls "$CI_PROJECT_DIR/server-cli/"
|
|
|
|
script:
|
2021-07-19 11:33:19 +00:00
|
|
|
# Help kaniko identify that it is running in a container.
|
|
|
|
# avoids this issue: https://github.com/GoogleContainerTools/kaniko/issues/1542
|
|
|
|
- export container=docker
|
2020-05-14 16:12:22 +00:00
|
|
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
2021-04-01 07:33:05 +00:00
|
|
|
- /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:
|
2021-06-04 07:24:57 +00:00
|
|
|
- air-linux
|
2021-04-01 07:33:05 +00:00
|
|
|
before_script:
|
|
|
|
- ls "$CI_PROJECT_DIR/server-cli/"
|
|
|
|
script:
|
2021-07-19 11:33:19 +00:00
|
|
|
# Help kaniko identify that it is running in a container.
|
|
|
|
# avoids this issue: https://github.com/GoogleContainerTools/kaniko/issues/1542
|
|
|
|
- export container=docker
|
2021-04-01 07:33:05 +00:00
|
|
|
- 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"
|
2020-06-11 13:24:07 +00:00
|
|
|
|
2021-07-20 21:03:10 +00:00
|
|
|
tag-nightly:
|
|
|
|
extends: .publish-nightly
|
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
|
|
|
tags:
|
|
|
|
- veloren-benchmark
|
|
|
|
script:
|
|
|
|
- git config --global user.email "gitlab-veloren-bot@veloren.net"
|
|
|
|
- git config --global user.name "veloren-bot"
|
|
|
|
- git config --global http.postBuffer 52428800
|
|
|
|
- git remote set-url origin https://veloren-bot:${GITLAB_TOKEN_WRITE}@${CI_PROJECT_URL:8}
|
|
|
|
- git tag -a "nightly" -m '' -f
|
|
|
|
- git push origin nightly -f
|
|
|
|
|
2020-06-11 13:24:07 +00:00
|
|
|
pages:
|
2020-06-12 11:09:56 +00:00
|
|
|
extends: .publish
|
2021-06-01 20:26:41 +00:00
|
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
2020-06-11 13:24:07 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2020-06-19 07:39:53 +00:00
|
|
|
- public
|
2020-06-11 13:24:07 +00:00
|
|
|
script:
|
|
|
|
- rm -rf public
|
|
|
|
- mkdir -p public
|
2020-09-17 10:03:50 +00:00
|
|
|
- cargo doc --no-deps --document-private-items
|
2021-07-20 21:03:10 +00:00
|
|
|
- mv target/doc/* public
|