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

Update CI and validate syntax

parent f947e227
No related branches found
Tags 0.4.0
No related merge requests found
...@@ -17,6 +17,7 @@ stages: ...@@ -17,6 +17,7 @@ stages:
- build_test - build_test
- release - release
- deploy - deploy
- deploy_test
include: include:
- remote: 'https://gitlab.com/r2devops/hub/-/raw/docker_build@2.0.2/jobs/docker_build/docker_build.yml' - remote: 'https://gitlab.com/r2devops/hub/-/raw/docker_build@2.0.2/jobs/docker_build/docker_build.yml'
...@@ -34,7 +35,6 @@ check-format: ...@@ -34,7 +35,6 @@ check-format:
- rustup component add clippy - rustup component add clippy
- cargo fmt --all -- --check - cargo fmt --all -- --check
- cargo clippy -- -D warnings - cargo clippy -- -D warnings
allow_failure: true
rules: rules:
- if: $CI_COMMIT_REF_NAME == 'main' - if: $CI_COMMIT_REF_NAME == 'main'
- if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_PIPELINE_SOURCE == "merge_request_event"
...@@ -128,6 +128,29 @@ docker_build: ...@@ -128,6 +128,29 @@ docker_build:
rules: rules:
- if: $CI_COMMIT_REF_NAME == 'main' - if: $CI_COMMIT_REF_NAME == 'main'
test-release-docker:
stage: deploy_test
image: $CI_REGISTRY/pub/numeco/gitlab-project-doctor:$CI_COMMIT_SHA
script:
- gitlab-project-doctor --url $CI_PROJECT_URL -a
cache: [ ]
needs:
- docker_build
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
test-release-linux:
stage: deploy_test
image: curlimages/curl:8.6.0
needs:
- release-linux
script:
- 'curl -O --header "JOB-TOKEN: $CI_JOB_TOKEN" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/x86_64-unknown-linux-musl/latest/gitlab-project-doctor"'
- chmod +x gitlab-project-doctor
- ./gitlab-project-doctor --url $CI_PROJECT_URL -a
rules:
- if: $CI_COMMIT_REF_NAME == 'main'
docker_build-prod: docker_build-prod:
stage: deploy stage: deploy
extends: docker_build extends: docker_build
......
...@@ -703,7 +703,7 @@ dependencies = [ ...@@ -703,7 +703,7 @@ dependencies = [
[[package]] [[package]]
name = "gitlab-project-doctor" name = "gitlab-project-doctor"
version = "0.4.0-dev" version = "0.4.0"
dependencies = [ dependencies = [
"atty", "atty",
"chrono", "chrono",
......
[package] [package]
name = "gitlab-project-doctor" name = "gitlab-project-doctor"
version = "0.4.0-dev" version = "0.4.0"
edition = "2018" edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
......
...@@ -6,10 +6,10 @@ use gitlab::api::{ApiError, Query}; ...@@ -6,10 +6,10 @@ use gitlab::api::{ApiError, Query};
use gitlab::Gitlab; use gitlab::Gitlab;
use human_bytes::human_bytes; use human_bytes::human_bytes;
use crate::{fl, Reportable, ReportPending, ReportStatus};
use crate::diagnosis::{GITLAB_SCOPE_ERROR, RemedyJob};
use crate::diagnosis::gitlab_connection::{Project, Statistics}; use crate::diagnosis::gitlab_connection::{Project, Statistics};
use crate::diagnosis::pipeline_analysis::{GitlabPipeline, PipelineAnalysisReport}; use crate::diagnosis::pipeline_analysis::{GitlabPipeline, PipelineAnalysisReport};
use crate::diagnosis::{RemedyJob, GITLAB_SCOPE_ERROR};
use crate::{fl, ReportPending, ReportStatus, Reportable};
pub struct PipelineCleanJob { pub struct PipelineCleanJob {
pub pipeline_report: PipelineAnalysisReport, pub pipeline_report: PipelineAnalysisReport,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment