bannana-pho/.gitlab-ci.yml

47 lines
831 B
YAML
Raw Permalink Normal View History

2023-06-18 10:25:42 -04:00
image: "rust:slim"
2023-06-18 10:25:42 -04:00
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
stages:
- build
- test
- release
cargo-build:
stage: build
script:
- cargo build
cargo-test:
stage: test
script:
2023-06-18 10:25:42 -04:00
- rustc --version && cargo --version
- cargo test --workspace --verbose
2023-06-18 10:25:42 -04:00
clippy-lint:
stage: test
before_script:
2023-06-18 10:25:42 -04:00
- rustup component add clippy
script:
2023-06-18 10:25:42 -04:00
- cargo clippy
release-artifacts:
stage: release
script:
- cargo build --release
artifacts:
paths:
- target/release/bannana-pho
expire_in: 1 week
release-container:
image: quay.io/podman/stable
stage: release
before_script:
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- podman build -t $IMAGE_TAG -f ./Dockerfile
2023-06-18 10:25:42 -04:00
- podman push $IMAGE_TAG