From 29b63627c79effd265c29e5f36af3742d682ca24 Mon Sep 17 00:00:00 2001 From: dyegomb Date: Fri, 5 Jan 2024 16:20:36 -0300 Subject: [PATCH] fix dockerfile --- Cargo.toml | 1 + Dockerfile | 3 +++ src/main.rs | 2 +- src/tests.rs | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 26faa8b..a576542 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,7 @@ env_logger = "0.10" configloader = { path = "./configloader"} mailsender = { path = "./mailsender" } gitlabapi = { path = "./gitlabapi" } +openssl = { version = "0.10", features = ["vendored"] } [dev-dependencies] env_logger = "0.10" diff --git a/Dockerfile b/Dockerfile index 60578f3..c33da98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -47,6 +47,9 @@ WORKDIR /opt COPY Cargo.toml /opt/ COPY src /opt/src +COPY configloader /opt/configloader +COPY gitlabapi /opt/gitlabapi +COPY mailsender /opt/mailsender RUN cargo build --target x86_64-unknown-linux-musl --release diff --git a/src/main.rs b/src/main.rs index 3cbf772..2c70643 100644 --- a/src/main.rs +++ b/src/main.rs @@ -44,7 +44,7 @@ mod tests; mod utils; #[derive(Debug)] -enum MailReason { +pub enum MailReason { Duplicated, InvalidTag, ErrorToCancel, diff --git a/src/tests.rs b/src/tests.rs index 9e2650f..ccc573a 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -16,6 +16,8 @@ mod integration_tests { async fn create_pipeline() { // TESTE_TOKENTRIG="token" cargo test --package gitlabjob --bin gitlabjob -- tests::integration_tests::create_pipeline \ // --exact --nocapture --ignored + + // curl -X POST --fail -F "token=$totken" -F "ref=master" -F "variables[PROD_TAG]=PROD-1.1" https://gitlab.com/api/v4/projects/***PROJID***/trigger/pipeline use std::env; let token_trigger = match env::var("TESTE_TOKENTRIG") {