From aa4ea6a1c3cfa74dd5fffa512f469112ecc1af18 Mon Sep 17 00:00:00 2001 From: librelois <elois@ifee.fr> Date: Thu, 21 Jun 2018 01:59:46 +0200 Subject: [PATCH] [ref] rework ci stages --- .gitlab-ci.yml | 81 ++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 42 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19327fe5..a04eb0e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,17 +2,15 @@ stages: - build_and_tests - fmt - clippy + - publish_crate + - publish_doc - package - prerelease - - publish - -before_script: - - export PATH="$HOME/.cargo/bin:$PATH" + - release variables: CARGO_HOME: $CI_PROJECT_DIR/cargo - .rust_stable_env: &rust_stable_env tags: - redshift-rs-stable @@ -83,7 +81,36 @@ clippy: - cargo install --force clippy --verbose script: - cargo clippy --all -- -D warnings --verbose - allow_failure: true + allow_failure: true + +publish:crate: + <<: *rust_stable_env + stage: publish_crate + script: + - IFS='/' read -r first a <<< "$CI_COMMIT_TAG" + - cd $first + - cargo login $DUNITER_CRATES_TOKEN + - cargo publish + only: + - tags + allow_failure: true + when: manual + +pages: + <<: *rust_stable_env + stage: publish_doc + script: + - cargo doc + - mv target/doc public + - ls public + artifacts: + untracked: true + paths: + - public + allow_failure: true + when: manual + only: + - dev package:test:linux-x64: <<: *rust_stable_env @@ -116,8 +143,9 @@ package:prod:linux-x64: - work/bin/ expire_in: 2 weeks only: - - dev - - tags + - tags + when: manual + allow_failure: false .release_jobs: &release_jobs image: tensorflow/tensorflow:latest-py3 @@ -126,7 +154,6 @@ package:prod:linux-x64: script: - python3 .gitlab/releaser only: - - dev - tags prerelease: @@ -136,41 +163,11 @@ prerelease: RELEASE_BIN_DIR: work/bin/ SOURCE_EXT: '["tar.gz", "zip"]' -publish:release: +release: <<: *release_jobs - stage: publish + stage: release variables: RELEASE_BIN_DIR: work/bin/ WIKI_RELEASE: Releases allow_failure: false - when: manual - -publish:crate: - <<: *rust_stable_env - stage: publish - script: - - IFS='/' read -r first a <<< "$CI_COMMIT_TAG" - - cd $first - - cargo login $DUNITER_CRATES_TOKEN - - cargo publish - only: - - publish-crate - - tags - allow_failure: false - when: manual - -pages: - <<: *rust_stable_env - stage: publish - script: - - cargo doc - - mv target/doc public - - ls public - artifacts: - untracked: true - paths: - - public - allow_failure: true - when: manual - only: - - dev \ No newline at end of file + when: manual \ No newline at end of file -- GitLab