diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f354b51 --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index 9f0e891..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/README.md b/README.md index 1973ad6..69eb9d2 100644 --- a/README.md +++ b/README.md @@ -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. -[![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