ci: get rid of some template inheretence in yaml

its confusing and it took 3 attempts to get `before_script`
to fucntion as expected. Instead get rid of the anchor
and use a (questionable) but simpler heuristic to detemine
when to update the lockfile.
This commit is contained in:
Jordan Petridis 2020-08-25 19:22:50 +03:00
parent 2ead28defe
commit 42768a3159
No known key found for this signature in database
GPG key ID: 902CC06D159744F5

View file

@ -37,9 +37,6 @@ stages:
- "extras" - "extras"
- "deploy" - "deploy"
.source_env_anchor: &source_env
- source ./ci/env.sh
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
.debian:10: .debian:10:
variables: variables:
@ -49,7 +46,15 @@ stages:
# Override the CARGO_HOME variable to force its location # Override the CARGO_HOME variable to force its location
CARGO_HOME: "${CI_PROJECT_DIR}/.cargo_home" CARGO_HOME: "${CI_PROJECT_DIR}/.cargo_home"
before_script: before_script:
- *source_env - source ./ci/env.sh
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
# If cargo exists assume we probably will want to update
# the lockfile
- |
if command -v cargo; then
cargo generate-lockfile
cargo update
fi
.debian:10-base: .debian:10-base:
extends: .debian:10 extends: .debian:10
@ -118,11 +123,6 @@ update-nightly:
.dist-debian-container: .dist-debian-container:
extends: extends:
- .fdo.distribution-image@debian - .fdo.distribution-image@debian
before_script:
- *source_env
# Ensure the cache and the .lockfile are up to date
- cargo generate-lockfile
- cargo update
cache: cache:
key: "gst" key: "gst"
paths: paths:
@ -149,8 +149,6 @@ update-nightly:
# settings and containing a gst-plugins-rs pipeline trigger token # settings and containing a gst-plugins-rs pipeline trigger token
.plugins-update: .plugins-update:
stage: deploy stage: deploy
before_script:
- *source_env
script: script:
- | - |
# FDO_DISTRIBUTION_IMAGE still has indirections # FDO_DISTRIBUTION_IMAGE still has indirections