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

Fix app test

parent 6cbae745
No related branches found
No related tags found
1 merge request!1Feat/job token
...@@ -21,6 +21,10 @@ include: ...@@ -21,6 +21,10 @@ include:
- remote: 'https://api.r2devops.io/job/r/gitlab/r2devops/hub/docker_build@latest.yaml' - remote: 'https://api.r2devops.io/job/r/gitlab/r2devops/hub/docker_build@latest.yaml'
- remote: 'https://api.r2devops.io/job/r/gitlab/r2devops/hub/gitleaks@latest.yaml' - remote: 'https://api.r2devops.io/job/r/gitlab/r2devops/hub/gitleaks@latest.yaml'
gitleaks:
stage: build_test
cache: [ ]
check-format: check-format:
stage: build_test stage: build_test
image: rust:$RUST_VERSION image: rust:$RUST_VERSION
...@@ -30,10 +34,9 @@ check-format: ...@@ -30,10 +34,9 @@ check-format:
- cargo fmt --all -- --check - cargo fmt --all -- --check
- cargo clippy -- -D warnings - cargo clippy -- -D warnings
allow_failure: true allow_failure: true
rules:
gitleaks: - if: $CI_COMMIT_REF_NAME == 'main'
stage: build_test - if: $CI_PIPELINE_SOURCE == "merge_request_event"
cache: [ ]
test-rust-current: test-rust-current:
stage: build_test stage: build_test
...@@ -45,7 +48,7 @@ test-rust-current: ...@@ -45,7 +48,7 @@ test-rust-current:
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"
test-rust-nightly: test-rust-nightly:
extends: test-rust-current extends: test-rust-current
......
...@@ -9,8 +9,8 @@ use regex::Regex; ...@@ -9,8 +9,8 @@ use regex::Regex;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::diagnosis::{ use crate::diagnosis::{
ARTIFACT_JOBS_LIMIT, PACKAGE_REGISTRY_LIMIT, REPO_LIMIT, Reportable, ReportJob, ReportPending, warning_if, ReportJob, ReportPending, ReportStatus, Reportable, ARTIFACT_JOBS_LIMIT,
ReportStatus, STORAGE_LIMIT, warning_if, PACKAGE_REGISTRY_LIMIT, REPO_LIMIT, STORAGE_LIMIT,
}; };
use crate::fl; use crate::fl;
...@@ -119,10 +119,15 @@ impl ConnectionJob { ...@@ -119,10 +119,15 @@ impl ConnectionJob {
token: Option<String>, token: Option<String>,
) -> Result<(Gitlab, Project)> { ) -> Result<(Gitlab, Project)> {
println!("INFO: Project server : {server}"); println!("INFO: Project server : {server}");
println!("INFO: Project token : {token:?}");
let client = match Self::_env_token(token)? { let client = match Self::_env_token(token)? {
GitlabToken::PrivateToken(token) => Gitlab::new(server, token)?, GitlabToken::PrivateToken(token) => {
GitlabToken::JobToken(token) => Gitlab::new_job_token(server, token)?, println!("INFO: Project token : {token:?}");
Gitlab::new(server, token)?
}
GitlabToken::JobToken(token) => {
println!("INFO: Project token : {token:?}");
Gitlab::new_job_token(server, token)?
}
}; };
println!("INFO: Project path : {path}"); println!("INFO: Project path : {path}");
let endpoint = projects::Project::builder() let endpoint = projects::Project::builder()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment