Commit 653c74fb authored by nanahira's avatar nanahira

fix crlf

parent 4a3859fc
Pipeline #42032 passed with stages
in 1 minute and 42 seconds
/.idea/ /.idea/
/target /target
stages: stages:
- build - build
- deploy - deploy
variables: variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
before_script: before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
.build-image: .build-image:
stage: build stage: build
script: script:
- docker build --pull -t $TARGET_IMAGE . - docker build --pull -t $TARGET_IMAGE .
- docker push $TARGET_IMAGE - docker push $TARGET_IMAGE
build-x86: build-x86:
extends: .build-image extends: .build-image
tags: tags:
- docker - docker
variables: variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86 TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86
build-arm: build-arm:
extends: .build-image extends: .build-image
tags: tags:
- docker-arm - docker-arm
variables: variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm
.deploy: .deploy:
stage: deploy stage: deploy
tags: tags:
- docker - docker
script: script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86 - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm - docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm
- docker manifest create $TARGET_IMAGE --amend $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86 --amend - docker manifest create $TARGET_IMAGE --amend $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-x86 --amend
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-arm
- docker manifest push $TARGET_IMAGE - docker manifest push $TARGET_IMAGE
deploy_latest: deploy_latest:
extends: .deploy extends: .deploy
variables: variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest TARGET_IMAGE: $CI_REGISTRY_IMAGE:latest
only: only:
- master - master
deploy_branch: deploy_branch:
extends: .deploy extends: .deploy
variables: variables:
TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG TARGET_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
FROM rust:1.91-alpine3.22 as chef FROM rust:1.91-alpine3.22 as chef
RUN apk add --no-cache musl-dev RUN apk add --no-cache musl-dev
RUN cargo install cargo-chef RUN cargo install cargo-chef
WORKDIR /usr/src/app WORKDIR /usr/src/app
FROM chef as planner FROM chef as planner
COPY Cargo.toml Cargo.lock ./ COPY Cargo.toml Cargo.lock ./
COPY src src COPY src src
RUN cargo chef prepare --recipe-path recipe.json RUN cargo chef prepare --recipe-path recipe.json
FROM chef as builder FROM chef as builder
COPY --from=planner /usr/src/app/recipe.json recipe.json COPY --from=planner /usr/src/app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json RUN cargo chef cook --release --recipe-path recipe.json
COPY Cargo.toml Cargo.lock ./ COPY Cargo.toml Cargo.lock ./
COPY src src COPY src src
RUN cargo build --release RUN cargo build --release
FROM alpine:3.22 FROM alpine:3.22
RUN apk --no-cache add libgcc libstdc++ bash iproute2 iptables iptables-legacy ipset netcat-openbsd jq iputils RUN apk --no-cache add libgcc libstdc++ bash iproute2 iptables iptables-legacy ipset netcat-openbsd jq iputils
COPY --from=builder /usr/src/app/target/release/tun1 /usr/local/bin/tun COPY --from=builder /usr/src/app/target/release/tun1 /usr/local/bin/tun
COPY ./entrypoint.sh /entrypoint.sh COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]
CMD ["tun"] CMD ["tun"]
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment