Skip to content

Commit

Permalink
Configured jobs to use new defaults - ref. common-ci-configuration#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Forinil authored and vogel76 committed Sep 11, 2023
1 parent ce37a7b commit 13e1894
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 23 deletions.
44 changes: 24 additions & 20 deletions .gitlab-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ beekeeper_wasm_build:
- public-runner-docker

beekeeper_wasm_package_generation:
extends: .job-defaults
stage: build
# emscripten image can be used as it contains all needed tools.
image: ${EMSCRIPTEN_IMAGE}
Expand Down Expand Up @@ -174,6 +175,7 @@ test_beekeeper_wasm:
- npm run test

mirrornet_replay_test:
extends: .job-defaults
stage: test
image: "$CI_REGISTRY_IMAGE/ci-base-image$TEST_IMAGE_TAG"
needs:
Expand Down Expand Up @@ -238,6 +240,7 @@ mirrornet_replay_test:
- hived-for-tests

.unit_tests_base:
extends: .job-defaults
stage: test
needs:
- job: testnet_node_build
Expand Down Expand Up @@ -305,26 +308,26 @@ plugin_test:
- timeout $((($PYTEST_TIMEOUT_MINUTES + 2) * 60)) pytest --timeout=$(($PYTEST_TIMEOUT_MINUTES * 60)) --junitxml="$JUNIT_REPORT" "${PROCESSES}" "${DURATIONS}" "${PYTEST_ARGS[@]}"

.pytest_based:
variables:
JUNIT_REPORT: "report.xml" # should be ovverided by derived jobs

interruptible: true
image: "$CI_REGISTRY_IMAGE/ci-base-image$TEST_IMAGE_TAG"

before_script:
- python3 -m venv venv/
- . venv/bin/activate
- (cd $CI_PROJECT_DIR/tests/hive-local-tools && poetry install)
artifacts:
reports:
junit: $JUNIT_REPORT

name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- "**/generated_during_*"
- "**/generated_by_package_fixtures"
when: always
expire_in: 1 week
extends: .job-defaults
variables:
JUNIT_REPORT: "report.xml" # should be ovverided by derived jobs

interruptible: true
image: "$CI_REGISTRY_IMAGE/ci-base-image$TEST_IMAGE_TAG"

before_script:
- python3 -m venv venv/
- . venv/bin/activate
- (cd $CI_PROJECT_DIR/tests/hive-local-tools && poetry install)
artifacts:
reports:
junit: $JUNIT_REPORT
name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- "**/generated_during_*"
- "**/generated_by_package_fixtures"
when: always
expire_in: 1 week

.test_tools_based:
extends: .pytest_based
Expand Down Expand Up @@ -831,6 +834,7 @@ several_node_restarts_tests:
- public-runner-docker

artifacts_generation_tests:
extends: .job-defaults
stage: test
image: "$CI_REGISTRY_IMAGE/ci-base-image$TEST_IMAGE_TAG"
needs:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ci-helpers/mirrornet_jobs.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,4 @@ variables:

script:
- rm -Rf $BLOCK_LOG_OUTPUT_DIR/*
when: manual
when: manual
5 changes: 3 additions & 2 deletions scripts/ci-helpers/prepare_data_image_job.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
variables:
# Variables required by Common CI jobs
CI_COMMON_JOB_VERSION: "ac35c204e1b836c9be2ad4cd59aaa89f4ee48c3f"
CI_COMMON_JOB_VERSION: "4b62d20dfebebacf51ca8795f3d7c4df2d9b8565"
DOCKER_BUILDER_TAG: "$CI_COMMON_JOB_VERSION"
DOCKER_DIND_TAG: "$CI_COMMON_JOB_VERSION"
IMAGE_REMOVER_TAG: "$CI_COMMON_JOB_VERSION"

include:
- project: 'hive/common-ci-configuration'
ref: ac35c204e1b836c9be2ad4cd59aaa89f4ee48c3f # develop
ref: 4b62d20dfebebacf51ca8795f3d7c4df2d9b8565 # develop
file: '/templates/docker_image_jobs.gitlab-ci.yml'

.docker_image_builder_job:
Expand All @@ -24,6 +24,7 @@ include:
interruptible: true

.cleanup_cache_manual:
extends: .job-defaults
image: alpine:3.16
interruptible: true
variables:
Expand Down

0 comments on commit 13e1894

Please sign in to comment.