Migrate from Woodpecker CI to GitLab CI
This commit is contained in:
parent
722e9364af
commit
90b521a799
3 changed files with 46 additions and 18 deletions
45
.gitlab-ci.yml
Normal file
45
.gitlab-ci.yml
Normal 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
|
|
@ -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
|
|
@ -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.
|
||||
|
||||
[](https://ci.gaycatgirl.sex/evie/kyanite)
|
||||
[](https://git.gaycatgirl.sex/evie/kyanite/-/pipelines)
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
Reference in a new issue