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: ...@@ -6,6 +6,7 @@ workflow:
variables: variables:
RUST_VERSION: "1.79" # slim or alpine not adapted because of openSSL dependency 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 TARGET_ARCH: default
CARGO_HOME: .cargo CARGO_HOME: .cargo
TEST_OPTIONS: --url $CI_PROJECT_URL -a TEST_OPTIONS: --url $CI_PROJECT_URL -a
...@@ -55,6 +56,8 @@ include: ...@@ -55,6 +56,8 @@ include:
build-rust-image: build-rust-image:
cache: [ ] cache: [ ]
rules:
- if: $RUST_REBUILD_IMAGE
release-gpd-image: release-gpd-image:
needs: needs:
...@@ -66,7 +69,7 @@ release-gpd-image: ...@@ -66,7 +69,7 @@ release-gpd-image:
check-format: check-format:
stage: deps_and_lint stage: deps_and_lint
image: ${REGISTRY_IMAGE_RUST} image: ${RUST_IMAGE}:${RUST_VERSION}
script: script:
- cargo fetch - cargo fetch
- cargo fmt --all -- --check - cargo fmt --all -- --check
...@@ -79,7 +82,7 @@ check-format: ...@@ -79,7 +82,7 @@ check-format:
test-rust-current: test-rust-current:
stage: build_test stage: build_test
image: ${REGISTRY_IMAGE_RUST} image: ${RUST_IMAGE}:${RUST_VERSION}
script: script:
- cargo test --verbose - cargo test --verbose
- cargo run -- $TEST_OPTIONS - cargo run -- $TEST_OPTIONS
...@@ -93,7 +96,7 @@ test-rust-nightly: ...@@ -93,7 +96,7 @@ test-rust-nightly:
allow_failure: true allow_failure: true
.rust-release: .rust-release:
image: ${REGISTRY_IMAGE_RUST} image: ${RUST_IMAGE}:${RUST_VERSION}
stage: release stage: release
variables: variables:
APP_NAME: gitlab-project-doctor APP_NAME: gitlab-project-doctor
...@@ -169,6 +172,7 @@ test-release-docker: ...@@ -169,6 +172,7 @@ test-release-docker:
- gitlab-project-doctor $CLEAN_OPTIONS --token $TEST_GL_TOKEN - gitlab-project-doctor $CLEAN_OPTIONS --token $TEST_GL_TOKEN
cache: [ ] cache: [ ]
needs: needs:
- release-linux
- release-gpd-image - release-gpd-image
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - 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