diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..853a4f65d3294b3b69c613fd0b26c3222442f51a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +stages: + - test + - build + +test: + image: rust:1.82.0-slim-bookworm + stage: test + script: + - cargo test + +include: + - component: gitlab.sauerburger.com/sauerburger-it/devops/kaniko-build@0.2.1-alpha diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..2b5b6d1da0a44e5288772194f70a6dee3039599e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM rust:1.82.0-slim-bookworm as builder + +WORKDIR /app +COPY Cargo.* /app/ +COPY src /app/src/ + +RUN cargo build --release + +FROM debian:bookworm-slim +COPY --from=builder /app/target/release/tcpjunction /bin/tcpjunction +CMD ["tcpjunction"] diff --git a/src/main.rs b/src/main.rs index e71fdf55421d043f171eba8c32329338498cad17..21e8033fe137f98da00058da06c2d803e35712df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1 +1,3 @@ -fn main() {} \ No newline at end of file +fn main() { + println!("TCP Junction") +} \ No newline at end of file