Migrate from Woodpecker CI to GitLab CI

This commit is contained in:
Evie Viau-Chow-Stuart 2023-06-18 10:21:14 -04:00
parent 722e9364af
commit 90b521a799
Signed by: evie
GPG key ID: 928652CDFCEC8099
3 changed files with 46 additions and 18 deletions

45
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,45 @@
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
script:
- rustc --version && cargo --version
- cargo test --workspace --verbose
clippy-lint:
stage: test
before_script:
- rustup component add clippy
script:
- cargo clippy
release-artifacts:
stage: release
script:
- cargo build --release
artifacts:
paths:
- target/release/kyanite
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
- podman push $IMAGE_TAG

View file

@ -1,17 +0,0 @@
pipeline:
build:
image: rust:1.67-slim
commands:
- cargo build
publish-rolling:
image: woodpeckerci/plugin-docker-buildx
secrets: [docker_username, docker_password]
settings:
platforms: linux/amd64
repo: git.gaycatgirl.sex/evie/kyanite
registry: git.gaycatgirl.sex
tags: latest
when:
branch: ${CI_REPO_DEFAULT_BRANCH}
event: push

View file

@ -4,7 +4,7 @@ Rusty CMS/Blogging engine thingamabob™
> ⚠️ Kyanite is still **very** early in development and may **not** be ready for your uses just yet! Containers are also on a rolling release. > ⚠️ Kyanite is still **very** early in development and may **not** be ready for your uses just yet! Containers are also on a rolling release.
[![status-badge](https://ci.gaycatgirl.sex/api/badges/evie/kyanite/status.svg)](https://ci.gaycatgirl.sex/evie/kyanite) [![status-badge](https://git.gaycatgirl.sex/evie/kyanite/badges/main/pipeline.svg)](https://git.gaycatgirl.sex/evie/kyanite/-/pipelines)
## Usage ## Usage