Skip to content
Snippets Groups Projects
Verified Commit f75ef2e1 authored by Geoffrey Arthaud's avatar Geoffrey Arthaud
Browse files

Rust image check and rebuild manually activated

parent 19dd54c7
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ workflow:
variables:
RUST_VERSION: "1.79" # slim or alpine not adapted because of openSSL dependency
RUST_IMAGE: "registry.gitlab-forge.din.developpement-durable.gouv.fr/pub/numeco/gitlab-project-doctor/rust-tools"
TARGET_ARCH: default
CARGO_HOME: .cargo
TEST_OPTIONS: --url $CI_PROJECT_URL -a
......@@ -55,6 +56,8 @@ include:
build-rust-image:
cache: [ ]
rules:
- if: $RUST_REBUILD_IMAGE
release-gpd-image:
needs:
......@@ -66,7 +69,7 @@ release-gpd-image:
check-format:
stage: deps_and_lint
image: ${REGISTRY_IMAGE_RUST}
image: ${RUST_IMAGE}:${RUST_VERSION}
script:
- cargo fetch
- cargo fmt --all -- --check
......@@ -79,7 +82,7 @@ check-format:
test-rust-current:
stage: build_test
image: ${REGISTRY_IMAGE_RUST}
image: ${RUST_IMAGE}:${RUST_VERSION}
script:
- cargo test --verbose
- cargo run -- $TEST_OPTIONS
......@@ -93,7 +96,7 @@ test-rust-nightly:
allow_failure: true
.rust-release:
image: ${REGISTRY_IMAGE_RUST}
image: ${RUST_IMAGE}:${RUST_VERSION}
stage: release
variables:
APP_NAME: gitlab-project-doctor
......@@ -169,6 +172,7 @@ test-release-docker:
- gitlab-project-doctor $CLEAN_OPTIONS --token $TEST_GL_TOKEN
cache: [ ]
needs:
- release-linux
- release-gpd-image
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment