Unverified Commit 7146ed24 authored by Denis_P's avatar Denis_P 🏑 Committed by GitHub
Browse files

WIP: CI: simnet to run pinned versions (#3051)



* CI: simnet to run pinned versions

* CI: explanation and tag

* dummy commit to trigger pipeline

* try with a new tag

* update new simnet stable version

Co-authored-by: Radu Popa's avatarradupopa2010 <radupopa2010@yahoo.com>
parent aa66db21
Pipeline #139610 passed with stages
in 37 minutes and 36 seconds
...@@ -164,27 +164,26 @@ check-runtime-benchmarks: ...@@ -164,27 +164,26 @@ check-runtime-benchmarks:
- ./scripts/gitlab/check_runtime_benchmarks.sh - ./scripts/gitlab/check_runtime_benchmarks.sh
- sccache -s - sccache -s
# FIXME: uncomment this when simnet is ready build-adder-collator:
# build-adder-collator: stage: test
# stage: test <<: *collect-artifacts
# <<: *collect-artifacts <<: *docker-env
# <<: *docker-env <<: *compiler-info
# <<: *compiler-info rules:
# rules: - if: $CI_PIPELINE_SOURCE == "schedule"
# - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master"
# - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
# - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME == "rococo-v1"
# - if: $CI_COMMIT_REF_NAME == "rococo-v1" script:
# script: - time cargo build --release --verbose -p test-parachain-adder-collator
# - time cargo build --release --verbose -p test-parachain-adder-collator - sccache -s
# - sccache -s # pack artifacts
# # pack artifacts - mkdir -p ./artifacts
# - mkdir -p ./artifacts - mv ./target/release/adder-collator ./artifacts/.
# - mv ./target/release/adder-collator ./artifacts/. - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
# - echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
# - echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG - echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
# - echo "adder-collator version = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))" - cp -r scripts/docker/* ./artifacts
# - cp -r scripts/docker/* ./artifacts
#### stage: build #### stage: build
...@@ -258,21 +257,19 @@ generate-impl-guide: ...@@ -258,21 +257,19 @@ generate-impl-guide:
publish-polkadot-image: publish-polkadot-image:
stage: build stage: build
<<: *build-push-image <<: *build-push-image
# FIXME: uncomment this when simnet is ready variables:
# variables: <<: *image-variables
# <<: *image-variables # scripts/docker/Dockerfile
# # scripts/docker/Dockerfile DOCKERFILE: Dockerfile
# DOCKERFILE: Dockerfile IMAGE_NAME: docker.io/paritypr/synth-wave
# IMAGE_NAME: docker.io/paritypr/synth-wave
rules: rules:
# Don't run on releases - this is handled by the Github Action here: # Don't run on releases - this is handled by the Github Action here:
# .github/workflows/publish-docker-release.yml # .github/workflows/publish-docker-release.yml
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
when: never when: never
# FIXME: uncomment this when simnet is ready - if: $CI_PIPELINE_SOURCE == "schedule"
# - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master"
# - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
# - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
- if: $CI_COMMIT_REF_NAME == "rococo-v1" - if: $CI_COMMIT_REF_NAME == "rococo-v1"
variables: variables:
<<: *image-variables <<: *image-variables
...@@ -283,33 +280,32 @@ publish-polkadot-image: ...@@ -283,33 +280,32 @@ publish-polkadot-image:
- job: test-build-linux-stable - job: test-build-linux-stable
artifacts: true artifacts: true
# FIXME: uncomment this when simnet is ready publish-adder-collator-image:
# publish-adder-collator-image: # service image for Simnet
# # service image for Simnet stage: build
# stage: build <<: *build-push-image
# <<: *build-push-image variables:
# variables: <<: *image-variables
# <<: *image-variables # scripts/docker/collator.Dockerfile
# # scripts/docker/collator.Dockerfile DOCKERFILE: collator.Dockerfile
# DOCKERFILE: collator.Dockerfile IMAGE_NAME: docker.io/paritypr/colander
# IMAGE_NAME: docker.io/paritypr/colander rules:
# rules: - if: $CI_PIPELINE_SOURCE == "schedule"
# - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master"
# - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
# - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME == "rococo-v1"
# - if: $CI_COMMIT_REF_NAME == "rococo-v1" needs:
# needs: - job: build-adder-collator
# - job: build-adder-collator artifacts: true
# artifacts: true after_script:
# after_script: - buildah logout "$IMAGE_NAME"
# - buildah logout "$IMAGE_NAME" # pass artifacts to the trigger-simnet job
# # pass artifacts to the trigger-simnet job - echo "COLLATOR_IMAGE=$IMAGE_NAME" > ./artifacts/collator.env
# - echo "COLLATOR_IMAGE=$IMAGE_NAME" > ./artifacts/collator.env - echo "COLLATOR_IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" >> ./artifacts/collator.env
# - echo "COLLATOR_IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" >> ./artifacts/collator.env artifacts:
# artifacts: reports:
# reports: # this artifact is used in trigger-simnet job
# # this artifact is used in trigger-simnet job dotenv: ./artifacts/collator.env
# dotenv: ./artifacts/collator.env
#### stage: publish #### stage: publish
...@@ -367,30 +363,30 @@ deploy-polkasync-kusama: ...@@ -367,30 +363,30 @@ deploy-polkasync-kusama:
allow_failure: true allow_failure: true
trigger: "parity/infrastructure/parity-testnet" trigger: "parity/infrastructure/parity-testnet"
# FIXME: uncomment this when simnet is ready trigger-simnet:
# trigger-simnet: stage: deploy
# stage: deploy image: paritytech/tools:latest
# image: paritytech/tools:latest <<: *kubernetes-env
# rules: rules:
# - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_PIPELINE_SOURCE == "schedule"
# - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_COMMIT_REF_NAME == "master"
# - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
# - if: $CI_COMMIT_REF_NAME == "rococo-v1" - if: $CI_COMMIT_REF_NAME == "rococo-v1"
# needs: needs:
# - job: publish-polkadot-image - job: publish-polkadot-image
# - job: publish-adder-collator-image - job: publish-adder-collator-image
# # `build.env` brings here `$IMAGE_NAME` and `$IMAGE_TAG` (`$EXTRATAG` here, # `build.env` brings here `$IMAGE_NAME` and `$IMAGE_TAG` (`$EXTRATAG` here,
# # i.e. `2643-0.8.29-5f689e0a-6b24dc54`). # i.e. `2643-0.8.29-5f689e0a-6b24dc54`).
# # `collator.env` bears adder-collator unique build tag. In non-triggered builds it # `collator.env` bears adder-collator unique build tag. In non-triggered builds it
# # can be called by `master` tag. # can be called by `master` tag.
# # Simnet uses an image published on PRs with this exact version for triggered runs # Simnet uses an image published on PRs with this exact version for triggered runs
# # on commits. And parity/rococo:rococo-v1 for the runs not launched by this job. # on commits. And parity/rococo:rococo-v1 for the runs not launched by this job.
# variables: variables:
# TRGR_PROJECT: ${CI_PROJECT_NAME} TRGR_PROJECT: ${CI_PROJECT_NAME}
# TRGR_REF: ${CI_COMMIT_REF_NAME} TRGR_REF: ${CI_COMMIT_REF_NAME}
# # simnet project ID # simnet project ID
# DWNSTRM_ID: 332 DWNSTRM_ID: 332
# script: script:
# # API trigger for a simnet job # API trigger for a simnet job
# - ./scripts/gitlab/trigger_pipeline.sh - ./scripts/gitlab/trigger_pipeline.sh
# allow_failure: true allow_failure: true
...@@ -8,7 +8,7 @@ echo "Triggering Simnet pipeline." ...@@ -8,7 +8,7 @@ echo "Triggering Simnet pipeline."
curl --silent \ curl --silent \
-X POST \ -X POST \
-F "token=${CI_JOB_TOKEN}" \ -F "token=${CI_JOB_TOKEN}" \
-F "ref=master" \ -F "ref=v3" `# trigger the pinned version of simnet CI config` \
-F "variables[TRGR_PROJECT]=${TRGR_PROJECT}" \ -F "variables[TRGR_PROJECT]=${TRGR_PROJECT}" \
-F "variables[TRGR_REF]=${TRGR_REF}" \ -F "variables[TRGR_REF]=${TRGR_REF}" \
-F "variables[IMAGE_NAME]=${IMAGE_NAME}" \ -F "variables[IMAGE_NAME]=${IMAGE_NAME}" \
...@@ -50,3 +50,4 @@ for i in $(seq 1 360); do ...@@ -50,3 +50,4 @@ for i in $(seq 1 360); do
fi fi
sleep 8; sleep 8;
done done
# dummy: delete me
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment