From 6018089912450d0dd45554fa77c4e6d967245f48 Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 21 Feb 2019 13:03:53 +0100 Subject: [PATCH 1/5] no-git for publish jobs, empty artifacts dir --- .gitlab-ci.yml | 11 ++++++++++- scripts/gitlab/build-unix.sh | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a4109ad8597..0d70398bf47 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,6 +14,11 @@ variables: CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" CARGO_TARGET: x86_64-unknown-linux-gnu +.no-git: &no-git + GIT_STRATEGY: none + GIT_SUBMODULE_STRATEGY: none + + .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") only: &releaseable_branches - stable @@ -94,6 +99,7 @@ build-windows: publish-docker: stage: publish only: *releaseable_branches + <<: &no-git cache: {} dependencies: - build-linux @@ -105,6 +111,7 @@ publish-docker: publish-snap: stage: optional #publish only: *releaseable_branches + <<: &no-git image: snapcore/snapcraft variables: BUILD_ARCH: amd64 @@ -119,9 +126,10 @@ publish-snap: allow_failure: true <<: *collect_artifacts -publish-onnet-update: +publish-onchain-update: stage: publish-onchain only: *releaseable_branches + <<: &no-git cache: {} dependencies: - build-linux @@ -155,6 +163,7 @@ publish-awss3-release: image: parity/awscli:latest stage: publish only: *releaseable_branches + <<: &no-git cache: {} dependencies: - build-linux diff --git a/scripts/gitlab/build-unix.sh b/scripts/gitlab/build-unix.sh index 6244dc8460c..592bbd54e52 100755 --- a/scripts/gitlab/build-unix.sh +++ b/scripts/gitlab/build-unix.sh @@ -25,6 +25,7 @@ else fi echo "_____ Post-processing binaries _____" +rm -rf artifacts/* mkdir -p artifacts/$CARGO_TARGET cd artifacts/$CARGO_TARGET From a2407a3832f4618dd613543dfea4a9b6d57abee9 Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 21 Feb 2019 13:13:28 +0100 Subject: [PATCH 2/5] fix syntax --- .gitlab-ci.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d70398bf47..f94143746ea 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,9 +14,10 @@ variables: CARGO_HOME: "${CI_PROJECT_DIR}/.cargo" CARGO_TARGET: x86_64-unknown-linux-gnu -.no-git: &no-git - GIT_STRATEGY: none - GIT_SUBMODULE_STRATEGY: none +.no_git: &no_git + variables: + GIT_STRATEGY: none + GIT_SUBMODULE_STRATEGY: none .releaseable_branches: # list of git refs for building GitLab artifacts (think "pre-release binaries") @@ -99,7 +100,7 @@ build-windows: publish-docker: stage: publish only: *releaseable_branches - <<: &no-git + <<: *no_git cache: {} dependencies: - build-linux @@ -111,7 +112,7 @@ publish-docker: publish-snap: stage: optional #publish only: *releaseable_branches - <<: &no-git + <<: *no_git image: snapcore/snapcraft variables: BUILD_ARCH: amd64 @@ -129,7 +130,7 @@ publish-snap: publish-onchain-update: stage: publish-onchain only: *releaseable_branches - <<: &no-git + <<: *no_git cache: {} dependencies: - build-linux @@ -163,7 +164,7 @@ publish-awss3-release: image: parity/awscli:latest stage: publish only: *releaseable_branches - <<: &no-git + <<: *no_git cache: {} dependencies: - build-linux From cc0c8f3bd9339da64c515b26f2facbbfdb89a6ad Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 21 Feb 2019 16:20:22 +0100 Subject: [PATCH 3/5] prettiness --- .gitlab-ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f94143746ea..298b0132352 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,6 @@ stages: - test - build - publish - - publish-onchain - optional image: parity/rust:gitlab-ci @@ -110,12 +109,12 @@ publish-docker: - scripts/gitlab/publish-docker.sh parity publish-snap: - stage: optional #publish + stage: publish only: *releaseable_branches <<: *no_git image: snapcore/snapcraft variables: - BUILD_ARCH: amd64 + BUILD_ARCH: amd64 cache: {} before_script: *determine_version dependencies: @@ -127,8 +126,8 @@ publish-snap: allow_failure: true <<: *collect_artifacts -publish-onchain-update: - stage: publish-onchain +publish-onchain: + stage: publish only: *releaseable_branches <<: *no_git cache: {} From 8a661966ed09ebbc678ba90bf16278733af8023b Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 21 Feb 2019 16:36:59 +0100 Subject: [PATCH 4/5] fix prettiness --- .gitlab-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 298b0132352..0b478aabad4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -135,7 +135,6 @@ publish-onchain: - build-linux - build-darwin - build-windows - - publish-awss3-release before_script: *determine_version script: - scripts/gitlab/publish-onnet-update.sh From 518c9d90bb2f977fd955b05624430890104d44c0 Mon Sep 17 00:00:00 2001 From: Denis P Date: Thu, 21 Feb 2019 18:42:22 +0100 Subject: [PATCH 5/5] should get rid of git in publishing --- .gitlab-ci.yml | 5 ++--- .../gitlab/{publish-onnet-update.sh => publish-onchain.sh} | 0 2 files changed, 2 insertions(+), 3 deletions(-) rename scripts/gitlab/{publish-onnet-update.sh => publish-onchain.sh} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0b478aabad4..52b16d7cb78 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -111,7 +111,7 @@ publish-docker: publish-snap: stage: publish only: *releaseable_branches - <<: *no_git + # <<: *no_git image: snapcore/snapcraft variables: BUILD_ARCH: amd64 @@ -135,9 +135,8 @@ publish-onchain: - build-linux - build-darwin - build-windows - before_script: *determine_version script: - - scripts/gitlab/publish-onnet-update.sh + - scripts/gitlab/publish-onchain.sh tags: - linux-docker diff --git a/scripts/gitlab/publish-onnet-update.sh b/scripts/gitlab/publish-onchain.sh similarity index 100% rename from scripts/gitlab/publish-onnet-update.sh rename to scripts/gitlab/publish-onchain.sh