mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
13188b49e1
$ if [[ ! "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then # collapsed multi-line command warning: redirecting to https://gitlab.com/veloren/veloren.git/ Locking support detected on remote "origin". Consider enabling it with: $ git config lfs.https://veloren-bot:[MASKED]@gitlab.com/veloren/veloren.git/info/lfs.locksverify true ref weekly:: Error in git rev-list --stdin --objects --not --remotes=origin --: exit status 128 fatal: bad object 11bc48033cf4e6528268f2acd97324e16e118bce error: failed to push some refs to 'https://veloren-bot:[MASKED]@gitlab.com/veloren/veloren' There seems to be a fix proposed here: https://github.com/git-lfs/git-lfs/issues/3977 by running git fetch first. lets try it out. Maybe we need to give it some commandline parameters to optimize in the future
66 lines
2.3 KiB
YAML
66 lines
2.3 KiB
YAML
# 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
|
|
when: on_success
|
|
- when: never
|
|
|
|
docker:
|
|
extends: .publish
|
|
image:
|
|
name: gcr.io/kaniko-project/executor:debug
|
|
entrypoint: [""]
|
|
tags: ["veloren/veloren", "publish", "trusted"]
|
|
dependencies:
|
|
- linux-x86_64
|
|
before_script:
|
|
- ls "$CI_PROJECT_DIR/server-cli/"
|
|
script:
|
|
# Help kaniko identify that it is running in a container.
|
|
# avoids this issue: https://github.com/GoogleContainerTools/kaniko/issues/1542
|
|
- export container=docker
|
|
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
|
|
- |
|
|
source "$CI_PROJECT_DIR/.gitlab/scripts/util.sh";
|
|
publishdockertag;
|
|
if [ "${PUBLISH_DOCKER_TAG}" != "" ]; then
|
|
/kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/server-cli/Dockerfile --destination "${CI_REGISTRY_IMAGE}/server-cli:${PUBLISH_DOCKER_TAG}"
|
|
fi
|
|
|
|
gittag:
|
|
extends: .publish
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE == "schedule"
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/base/common:${CACHE_IMAGE_TAG}
|
|
dependencies: []
|
|
tags: ["veloren/veloren", "publish", "trusted"]
|
|
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}
|
|
- |
|
|
if [[ ! "${SCHEDULE_CADENCE}" =~ ${TAG_REGEX} ]]; then
|
|
git fetch;
|
|
git tag -a "${SCHEDULE_CADENCE}" -m '' -f;
|
|
git push origin "${SCHEDULE_CADENCE}" -f;
|
|
fi
|
|
|
|
pages:
|
|
extends: .publish
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PIPELINE_SOURCE != "schedule"
|
|
image: registry.gitlab.com/veloren/veloren-docker-ci/cache/quality:${CACHE_IMAGE_TAG}
|
|
dependencies: []
|
|
tags: ["veloren/veloren", "publish"]
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
script:
|
|
- rm -rf public
|
|
- mkdir -p public
|
|
- RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo doc --no-deps --document-private-items
|
|
- mv target/doc/* public
|