image: "rust:slim"
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
- rustc --version && cargo --version
- cargo test --workspace --verbose
clippy-lint:
before_script:
- rustup component add clippy
- cargo clippy
release-artifacts:
stage: release
- cargo build --release
artifacts:
paths:
- target/release/kyanite
expire_in: 1 week
release-container:
image: quay.io/podman/stable
- podman login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
- podman build -t $IMAGE_TAG -f ./Dockerfile
- podman push $IMAGE_TAG