Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit 130b0e2

Browse files
authored
Add publish docker staking-miner (#5710)
* [DO NOT MERGE] Add publish docker staking-miner * debug docker publish * remove debug * small naming fix * fix comment
1 parent 03bef44 commit 130b0e2

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

.gitlab-ci.yml

+44-1
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,22 @@ default:
106106
- if: $CI_COMMIT_REF_NAME == "master"
107107
- if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs
108108

109+
.deploy-testnet-refs: &deploy-testnet-refs
110+
rules:
111+
- if: $CI_PIPELINE_SOURCE == "pipeline"
112+
when: never
113+
- if: $CI_PIPELINE_SOURCE == "schedule"
114+
- if: $CI_COMMIT_REF_NAME == "master"
115+
109116
.publish-refs: &publish-refs
110117
rules:
111118
- if: $CI_PIPELINE_SOURCE == "pipeline"
112119
when: never
113120
- if: $CI_PIPELINE_SOURCE == "schedule"
121+
- if: $CI_PIPELINE_SOURCE == "web" &&
122+
$CI_COMMIT_REF_NAME == "master"
114123
- if: $CI_COMMIT_REF_NAME == "master"
124+
- if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
115125

116126
.build-push-image: &build-push-image
117127
<<: *kubernetes-env
@@ -266,6 +276,22 @@ build-malus:
266276
- echo "polkadot-test-malus = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
267277
- cp -r ./scripts/* ./artifacts
268278

279+
build-staking-miner:
280+
stage: stage1
281+
<<: *collect-artifacts
282+
<<: *docker-env
283+
<<: *compiler-info
284+
<<: *common-refs
285+
script:
286+
- time cargo build --locked --release --package staking-miner
287+
# pack artifacts
288+
- mkdir -p ./artifacts
289+
- mv ./target/release/staking-miner ./artifacts/.
290+
- echo -n "${CI_COMMIT_REF_NAME}" > ./artifacts/VERSION
291+
- echo -n "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" > ./artifacts/EXTRATAG
292+
- echo "staking-miner = $(cat ./artifacts/VERSION) (EXTRATAG = $(cat ./artifacts/EXTRATAG))"
293+
- cp -r ./scripts/* ./artifacts
294+
269295
#### stage: stage2
270296

271297
.check-dependent-project: &check-dependent-project
@@ -424,6 +450,23 @@ publish-malus-image:
424450
# this artifact is used in zombienet-tests job
425451
dotenv: ./artifacts/malus.env
426452

453+
publish-staking-miner-image:
454+
stage: stage2
455+
<<: *build-push-image
456+
<<: *publish-refs
457+
variables:
458+
<<: *image-variables
459+
# scripts/ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile
460+
DOCKERFILE: ci/dockerfiles/staking-miner/staking-miner_injected.Dockerfile
461+
IMAGE_NAME: docker.io/paritytech/staking-miner
462+
GIT_STRATEGY: none
463+
DOCKER_USER: ${Docker_Hub_User_Parity}
464+
DOCKER_PASS: ${Docker_Hub_Pass_Parity}
465+
needs:
466+
- job: build-staking-miner
467+
artifacts: true
468+
469+
427470
publish-s3-release: &publish-s3
428471
stage: stage3
429472
needs:
@@ -586,7 +629,7 @@ deploy-parity-testnet:
586629
needs:
587630
- job: test-deterministic-wasm
588631
artifacts: false
589-
<<: *publish-refs
632+
<<: *deploy-testnet-refs
590633
variables:
591634
POLKADOT_CI_COMMIT_NAME: "${CI_COMMIT_REF_NAME}"
592635
POLKADOT_CI_COMMIT_REF: "${CI_COMMIT_SHORT_SHA}"

0 commit comments

Comments
 (0)