Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
check:
Expand Down Expand Up @@ -87,6 +86,9 @@ jobs:
name: Docker image build
runs-on: ubuntu-latest
needs: [check, fmt, test, clippy]
strategy:
matrix:
target: [obo-cli, obs-gitlab-runner]

permissions:
contents: read
Expand All @@ -102,12 +104,13 @@ jobs:
- id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.target }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
if: github.event_name != 'pull_request'
with:
context: .
file: Dockerfile.${{ matrix.target }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand Down
99 changes: 95 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 18 additions & 35 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,33 @@
[package]
name = "obs-gitlab-runner"
version = "0.1.8"
edition = "2024"
license = "MIT OR Apache-2.0"
[workspace]
resolver = "3"
members = [
"obo-cli",
"obo-core",
"obo-tests",
"obo-test-support",
"obs-gitlab-runner"
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
[workspace.dependencies]
async-trait = "0.1"
base16ct = { version = "0.2", features = ["std"] }
bytes = "1.10"
camino = "1.1"
claims = "0.8"
clap = { version = "4.5", features = ["default", "derive", "env"] }
color-eyre = "0.6"
derivative = "2.2"
futures-util = "0.3"
md-5 = "0.10"
reqwest = "0.12"
rfc822-like = "0.2"
open-build-service-api = { git = "https://github.com/collabora/open-build-service-rs" }
# open-build-service-api = { path = "../open-build-service-rs/open-build-service-api" }
open-build-service-mock = { git = "https://github.com/collabora/open-build-service-rs" }
# open-build-service-mock = { path = "../open-build-service-rs/open-build-service-api" }
rstest = "0.26"
serde = "1.0"
serde_json = "1.0.140"
serde_yaml = "0.9"
shellexpand = "3.1"
shell-words = "1.1"
strum = { version = "0.27", features = ["derive"] }
tempfile = "3.20"
thiserror = "2.0"
tokio = { version = "1.45", features = ["full"] }
tokio-retry2 = { version = "0.6.0", features = ["jitter"] }
tokio-util = { version = "0.7", features = ["full"] }
tracing = "0.1"
tracing-error = "0.2"
tracing-subscriber = { version = "0.3", features = ["default", "json"] }
url = "2.5"

gitlab-runner = "0.3.0-rc1"
# gitlab-runner = { path = "../gitlab-runner-rs/gitlab-runner" }
open-build-service-api = { git = "https://github.com/collabora/open-build-service-rs" }
thiserror = "2.0.12"
# open-build-service-api = { path = "../open-build-service-rs/open-build-service-api" }

[dev-dependencies]
claims = "0.8"
rstest = "0.26"
wiremock = "0.6"
zip = "5.1"

gitlab-runner-mock = "0.2.1"
# gitlab-runner-mock = { path = "../gitlab-runner-rs/gitlab-runner-mock" }
open-build-service-mock = { git = "https://github.com/collabora/open-build-service-rs" }
# open-build-service-mock = { path = "../open-build-service-rs/open-build-service-mock" }
18 changes: 18 additions & 0 deletions Dockerfile.obo-cli
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM rust:1.88.0-slim-bookworm AS build
ARG DEBIAN_FRONTEND=noninteractive

ADD . /app
WORKDIR /app
RUN apt-get update \
&& apt-get install -y pkg-config libssl-dev \
&& cargo build -p obo-cli --release

FROM debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get install -y libssl3 ca-certificates \
&& rm -rf /var/lib/apt/lists/
COPY --from=build /app/target/release/obo /usr/local/bin/

ENTRYPOINT ["/usr/local/bin/obo"]
2 changes: 1 addition & 1 deletion Dockerfile → Dockerfile.obs-gitlab-runner
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
WORKDIR /app
RUN apt-get update \
&& apt-get install -y pkg-config libssl-dev \
&& cargo build --release
&& cargo build -p obs-gitlab-runner --release

FROM debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -23,4 +23,4 @@

USER obs-gitlab-runner

ENTRYPOINT /usr/local/bin/obs-gitlab-runner

Check warning on line 26 in Dockerfile.obs-gitlab-runner

View workflow job for this annotation

GitHub Actions / Docker image build (obs-gitlab-runner)

JSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals

JSONArgsRecommended: JSON arguments recommended for ENTRYPOINT to prevent unintended behavior related to OS signals More info: https://docs.docker.com/go/dockerfile/rule/json-args-recommended/
Loading