Simnet v8 move tests (#3647)

* Update to simnet v8

* rm duplicate

* add tags also

* revertme: add simnet image version for testing CI

* add info regarding the image names and values

* fix lint error

* one more try to fix the lint

* hardcode simnet version and revertme

* hardcode simnet

* more hardcodding

* I wonder how may silly mistakes I can make

* simnet image name needs to be hardcoded

* Update .gitlab-ci.yml

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>

* Update .gitlab-ci.yml

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>

* remove revertme changes

* rm unused script

Co-authored-by: Denis Pisarev <denis.pisarev@parity.io>
This commit is contained in:
radupopa2010
2021-08-17 16:49:52 +02:00
committed by GitHub
parent 9ecde11698
commit fdb1653783
2 changed files with 36 additions and 228 deletions
+36 -26
View File
@@ -293,14 +293,6 @@ build-rustdoc:
- buildah push --format=v2s2 "$IMAGE_NAME:$EXTRATAG"
after_script:
- buildah logout "$IMAGE_NAME"
# pass artifacts to the trigger-simnet job
- echo "IMAGE_NAME=${IMAGE_NAME}" > ./artifacts/build.env
- echo "IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" >> ./artifacts/build.env
artifacts:
reports:
# this artifact is used in trigger-simnet job
# https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#with-variable-inheritance
dotenv: ./artifacts/build.env
publish-polkadot-image:
stage: build
@@ -327,6 +319,15 @@ publish-polkadot-image:
needs:
- job: test-build-linux-stable
artifacts: true
after_script:
# pass artifacts to the simnet-tests job
# https://docs.gitlab.com/ee/ci/multi_project_pipelines.html#with-variable-inheritance
- echo "PARACHAINS_IMAGE_NAME=${IMAGE_NAME}" > ./artifacts/parachains.env
- echo "PARACHAINS_IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" >> ./artifacts/parachains.env
artifacts:
reports:
# this artifact is used in simnet-tests job
dotenv: ./artifacts/parachains.env
publish-adder-collator-image:
# service image for Simnet
@@ -347,11 +348,12 @@ publish-adder-collator-image:
artifacts: true
after_script:
- buildah logout "$IMAGE_NAME"
# pass artifacts to the trigger-simnet job
- echo "COLLATOR_IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" > ./artifacts/collator.env
# pass artifacts to the simnet-tests job
- echo "COLLATOR_IMAGE_NAME=${IMAGE_NAME}" > ./artifacts/collator.env
- echo "COLLATOR_IMAGE_TAG=$(cat ./artifacts/EXTRATAG)" >> ./artifacts/collator.env
artifacts:
reports:
# this artifact is used in trigger-simnet job
# this artifact is used in simnet-tests job
dotenv: ./artifacts/collator.env
.update_weights: &update-weights
@@ -479,9 +481,9 @@ deploy-polkasync-kusama:
allow_failure: true
trigger: "parity/infrastructure/parity-testnet"
trigger-simnet:
simnet-tests:
stage: deploy
image: paritytech/tools:latest
image: "docker.io/paritytech/simnet:${SIMNET_REF}"
<<: *kubernetes-env
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
@@ -491,18 +493,26 @@ trigger-simnet:
needs:
- job: publish-polkadot-image
- job: publish-adder-collator-image
# `build.env` brings here `$IMAGE_NAME` and `$IMAGE_TAG` (`$EXTRATAG` here,
# i.e. `2643-0.8.29-5f689e0a-6b24dc54`).
# `collator.env` bears adder-collator unique build tag. In non-triggered builds it
# can be called by `master` tag.
# 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.
variables:
TRGR_PROJECT: ${CI_PROJECT_NAME}
TRGR_REF: ${CI_COMMIT_REF_NAME}
# Simnet project ID
DWNSTRM_ID: 332
# `parachains.env` brings here `$PARACHAINS_IMAGE_NAME` and `$PARACHAINS_IMAGE_TAG`
# (`$EXTRATAG` here, # i.e. `2643-0.8.29-5f689e0a-6b24dc54`).
# `collator.env` brings here `$COLLATOR_IMAGE_NAME` and `$COLLATOR_IMAGE_TAG`
# For local tests with docker `$PARACHAINS_IMAGE_TAG` and `$COLLATOR_IMAGE_TAG`
# can be replaced with `master` tag.
# SIMNET_REF is a gitlab variable
before_script:
- echo "Simnet Tests Config
${SIMNET_IMAGE_NAME} ${SIMNET_REF}
${PARACHAINS_IMAGE_NAME} ${PARACHAINS_IMAGE_TAG}
${COLLATOR_IMAGE_NAME} ${COLLATOR_IMAGE_TAG}"
script:
# API trigger for a Simnet job, argument value is set in the project variables
- ./scripts/gitlab/trigger_pipeline.sh --simnet-version=${SIMNET_REF}
- /home/nonroot/simnet/gurke/scripts/run-test-environment-manager.sh
--github-remote-dir="https://github.com/paritytech/polkadot/tree/master/simnet_tests"
--config="simnet_tests/configs/simple_rococo_testnet.toml"
--image="${PARACHAINS_IMAGE_NAME}:${PARACHAINS_IMAGE_TAG}"
--image-2="${COLLATOR_IMAGE_NAME}:${COLLATOR_IMAGE_TAG}"
--image-simnet="docker.io/paritytech/simnet:${SIMNET_REF}"
allow_failure: true
retry: 2
tags:
- parity-simnet