From 38f3212e2aa46a3055e73db1be6eb170475e1102 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 15:42:33 +0000 Subject: [PATCH] build: remove woodpecker CI usage --- .forgejo/workflows/push-main.yml | 23 +++++++++++++++++++++++ .woodpecker/cron-docker-builder.yml | 15 --------------- .woodpecker/push-next.yml | 13 ------------- .woodpecker/tag-created.yml | 16 ---------------- Dockerfile | 4 ++-- Dockerfile.builder | 21 --------------------- 6 files changed, 25 insertions(+), 67 deletions(-) delete mode 100644 .woodpecker/cron-docker-builder.yml delete mode 100644 .woodpecker/push-next.yml delete mode 100644 .woodpecker/tag-created.yml delete mode 100644 Dockerfile.builder diff --git a/.forgejo/workflows/push-main.yml b/.forgejo/workflows/push-main.yml index 07eaa81..22c5de4 100644 --- a/.forgejo/workflows/push-main.yml +++ b/.forgejo/workflows/push-main.yml @@ -37,3 +37,26 @@ jobs: env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + docker: + name: Docker image + runs-on: docker + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Build + run: | + docker build . -t git.kemitix.net/kemitix/rust:latest + docker tag git.kemitix.net/kemitix/rust:latest git.kemitix.net/kemitix/rust:${{ env.GITHUB_REF_NAME }} + + - name: Login + run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net + + - name: Publish + run: | + docker push git.kemitix.net/kemitix/rust:${{ env.GITHUB_REF_NAME }} + docker push git.kemitix.net/kemitix/rust:latest + diff --git a/.woodpecker/cron-docker-builder.yml b/.woodpecker/cron-docker-builder.yml deleted file mode 100644 index ebf1c9c..0000000 --- a/.woodpecker/cron-docker-builder.yml +++ /dev/null @@ -1,15 +0,0 @@ -steps: - - update-builder-image: - when: - - event: cron - image: docker.io/woodpeckerci/plugin-docker-buildx:latest - settings: - username: kemitix - repo: git.kemitix.net/kemitix/git-next-builder - auto_tag: true - dockerfile: Dockerfile.builder - dry-run: false # push to remote repo - registry: git.kemitix.net - password: - from_secret: woodpecker-docker-push diff --git a/.woodpecker/push-next.yml b/.woodpecker/push-next.yml deleted file mode 100644 index 69fcb7e..0000000 --- a/.woodpecker/push-next.yml +++ /dev/null @@ -1,13 +0,0 @@ -steps: - docker-build: - when: - - event: push - branch: next - # INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx - image: docker.io/woodpeckerci/plugin-docker-buildx:5.1.0 - settings: - username: kemitix - repo: git.kemitix.net/kemitix/git-next - dockerfile: Dockerfile - auto_tag: false - dry-run: true # don't push to remote repo diff --git a/.woodpecker/tag-created.yml b/.woodpecker/tag-created.yml deleted file mode 100644 index 5ccd3a1..0000000 --- a/.woodpecker/tag-created.yml +++ /dev/null @@ -1,16 +0,0 @@ -steps: - docker-build: - when: - - event: tag - ref: refs/tags/v* - # INFO: https://woodpecker-ci.org/plugins/Docker%20Buildx - image: docker.io/woodpeckerci/plugin-docker-buildx:5.1.0 - settings: - username: kemitix - repo: git.kemitix.net/kemitix/git-next - dockerfile: Dockerfile - auto_tag: true - dry-run: false # push to remote repo - registry: git.kemitix.net - password: - from_secret: woodpecker-docker-push diff --git a/Dockerfile b/Dockerfile index f5334d9..2509e11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Leveraging the pre-built Docker images with # cargo-chef and the Rust toolchain -FROM git.kemitix.net/kemitix/git-next-builder:2024.12.28 AS chef +FROM git.kemitix.net/kemitix/rust:v3.0.0 AS chef WORKDIR /app FROM chef AS planner @@ -15,7 +15,7 @@ COPY . . RUN cargo build --release --bin git-next --all-features && \ strip target/release/git-next -FROM docker.io/debian:stable-20240904-slim AS runtime +FROM docker.io/debian:stable-20241223-slim AS runtime WORKDIR /app RUN apt-get update && \ apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \ diff --git a/Dockerfile.builder b/Dockerfile.builder deleted file mode 100644 index 7ea6df0..0000000 --- a/Dockerfile.builder +++ /dev/null @@ -1,21 +0,0 @@ -FROM docker.io/rust:1.84.0-bookworm - -RUN apt-get update && \ - apt-get install -y libdbus-1-dev && \ - curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ - tar -xzf cargo-binstall.tgz && \ - rm cargo-binstall.tgz && \ - mv cargo-binstall /usr/local/bin/ && \ - cargo binstall -y cargo-chef && \ - rustup component add rustfmt clippy - -# verify that the binaries are installed -RUN ls -l /usr/local/cargo/bin/ -RUN cargo chef --version -RUN rustfmt --version -RUN cargo fmt --version -RUN cargo clippy --version -RUN cargo --version -RUN rustc --version -RUN rustup --version -RUN rustup show