Skip to content

Commit cfc3475

Browse files
Mira Resselukint-vs
authored andcommitted
timestamp gitlab ci job outputs (paritytech#13605)
* timestamp gitlab ci job outputs Based on previous work by @alvicsam in paritytech#13047. * inline timestamp script Some of our jobs don't check out the substrate repo. * include .timestamp in pipelines overriding the default before_script Still not including it in the zombienet jobs, they have their own timestamping anyway. * move timestamp.yml to shared pipeline repo https://gitlab.parity.io/parity/infrastructure/ci_cd/shared
1 parent b658fef commit cfc3475

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ variables:
113113
.kubernetes-env:
114114
image: "${CI_IMAGE}"
115115
before_script:
116+
- !reference [.timestamp, before_script]
116117
- !reference [.job-switcher, before_script]
117118
- !reference [.prepare-env, before_script]
118119
tags:
@@ -141,6 +142,7 @@ variables:
141142
.docker-env:
142143
image: "${CI_IMAGE}"
143144
before_script:
145+
- !reference [.timestamp, before_script]
144146
- !reference [.job-switcher, before_script]
145147
- !reference [.prepare-env, before_script]
146148
- !reference [.rust-info-script, script]
@@ -310,6 +312,8 @@ include:
310312
- local: scripts/ci/gitlab/default-pipeline.yml
311313
rules:
312314
- if: $PIPELINE != "automatic-crate-publishing"
315+
- project: parity/infrastructure/ci_cd/shared
316+
file: /common/timestamp.yml
313317

314318
#### stage: notify
315319

scripts/ci/gitlab/pipeline/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ build-linux-substrate:
6262
- job: test-linux-stable
6363
artifacts: false
6464
before_script:
65+
- !reference [.timestamp, before_script]
6566
- !reference [.job-switcher, before_script]
6667
- mkdir -p ./artifacts/substrate/
6768
- !reference [.rusty-cachier, before_script]
@@ -95,6 +96,7 @@ build-linux-substrate:
9596
# this variable gets overriden by "rusty-cachier environment inject", use the value as default
9697
CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target"
9798
before_script:
99+
- !reference [.timestamp, before_script]
98100
- !reference [.job-switcher, before_script]
99101
- mkdir -p ./artifacts/subkey
100102
- !reference [.rusty-cachier, before_script]
@@ -120,6 +122,7 @@ build-subkey-macos:
120122
# duplicating before_script & script sections from .build-subkey hidden job
121123
# to overwrite rusty-cachier integration as it doesn't work on macos
122124
before_script:
125+
# skip timestamp script, the osx bash doesn't support printf %()T
123126
- !reference [.job-switcher, before_script]
124127
- mkdir -p ./artifacts/subkey
125128
script:

scripts/ci/gitlab/pipeline/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ cargo-check-benches:
8383
- .collect-artifacts
8484
- .pipeline-stopper-artifacts
8585
before_script:
86+
- !reference [.timestamp, before_script]
8687
# perform rusty-cachier operations before any further modifications to the git repo to make cargo feel cheated not so much
8788
- !reference [.rust-info-script, script]
8889
- !reference [.job-switcher, before_script]
@@ -145,7 +146,8 @@ node-bench-regression-guard:
145146
artifacts: true
146147
variables:
147148
CI_IMAGE: "paritytech/node-bench-regression-guard:latest"
148-
before_script: [""]
149+
before_script:
150+
- !reference [.timestamp, before_script]
149151
script:
150152
- echo "------- IMPORTANT -------"
151153
- echo "node-bench-regression-guard depends on the results of a cargo-check-benches job"
@@ -419,6 +421,7 @@ cargo-check-each-crate-macos:
419421
- .collect-artifacts
420422
- .pipeline-stopper-artifacts
421423
before_script:
424+
# skip timestamp script, the osx bash doesn't support printf %()T
422425
- !reference [.job-switcher, before_script]
423426
- !reference [.rust-info-script, script]
424427
- !reference [.pipeline-stopper-vars, script]

0 commit comments

Comments
 (0)