Skip to content

Commit 0c539dd

Browse files
klemenfnjanezicmatej
authored andcommitted
pipeline changes
1 parent 37c9eaa commit 0c539dd

3 files changed

Lines changed: 5 additions & 68 deletions

File tree

.github/workflows/build-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- name: Build and push default image
5656
uses: docker/build-push-action@v5
5757
with:
58-
context: . # Because GH actions are for kids and put protection on everything; https://stackoverflow.com/a/71159809/11276254
58+
context: .
5959
platforms: linux/amd64,linux/arm64
6060
push: true
6161
tags: ${{ env.ALL_TAGS }}

.gitlab-ci.yml

Lines changed: 2 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ variables:
33

44
.test_template:
55
stage: test
6-
image: ghcr.io/astral-sh/uv:python3.14-bookworm-slim
6+
image: ghcr.io/astral-sh/uv:python3.14-trixie-slim
77
cache:
88
key:
99
files:
@@ -17,7 +17,6 @@ variables:
1717

1818
stages:
1919
- test
20-
- release_flare_infra
2120

2221
test_ruff:
2322
extends: .test_template
@@ -48,66 +47,4 @@ test_django:
4847
junit: junit.xml
4948
coverage_report:
5049
coverage_format: cobertura
51-
path: coverage.xml
52-
53-
.release_flare_infra:
54-
stage: release_flare_infra
55-
rules:
56-
- if: "$CI_COMMIT_TAG"
57-
58-
# todo: Remove once GitHub repo is public and use images from ghcr
59-
release_flare_infra:auth:
60-
extends: .release_flare_infra
61-
image: registry.gitlab.com/flarenetwork/infra/pipeliner:latest
62-
id_tokens:
63-
OIDC_JOB_TOKEN:
64-
aud: https://gitlab.com
65-
variables:
66-
GCP_PROJECT: "flare-network-shared"
67-
GCP_PROJECT_NUMBER: "940168819002"
68-
before_script:
69-
- >
70-
WORKLOAD_IDENTITY_POOL=$([ "$CI_COMMIT_REF_PROTECTED" == "true" ] &&
71-
echo "cr-oidc-gitlab-protected-pool" ||
72-
echo "cr-oidc-gitlab-pool")
73-
- >
74-
WORKLOAD_IDENTITY_POOL_PROVIDER=$([ "$CI_COMMIT_REF_PROTECTED" == "true" ] &&
75-
echo "oidc-gitlab-protected" ||
76-
echo "oidc-gitlab-pool-provider")
77-
- >
78-
SERVICE_ACCOUNT_EMAIL=$([ "$CI_COMMIT_REF_PROTECTED" == "true" ] &&
79-
echo "cr-prtctd-oidc-cntnr-img-bldr@flare-network-shared.iam.gserviceaccount.com" ||
80-
echo "cr-oidc-cntnr-img-bldr@flare-network-shared.iam.gserviceaccount.com")
81-
- . pipeliner gcloud-setup
82-
script:
83-
- echo "GOOGLE_OAUTH_ACCESS_TOKEN=$GOOGLE_OAUTH_ACCESS_TOKEN" > auth.env
84-
artifacts:
85-
reports:
86-
dotenv:
87-
- auth.env
88-
89-
release_flare_infra:
90-
extends: .release_flare_infra
91-
image:
92-
name: gcr.io/kaniko-project/executor:v1.18.0-debug
93-
entrypoint: [""]
94-
needs:
95-
- job: release_flare_infra:auth
96-
artifacts: true
97-
before_script:
98-
- mkdir -p /kaniko/.docker
99-
- auth_encoded=$(echo -n "oauth2accesstoken:$GOOGLE_OAUTH_ACCESS_TOKEN" | base64 | tr -d "\n")
100-
- echo "{\"auths\":{\"europe-west1-docker.pkg.dev\":{\"auth\":\"$auth_encoded\",\"email\":\"not@val.id\"}}}" > /kaniko/.docker/config.json
101-
script:
102-
- >
103-
args="--context ${CI_PROJECT_DIR}/.
104-
--dockerfile ${CI_PROJECT_DIR}/Dockerfile
105-
--cache=true
106-
--destination europe-west1-docker.pkg.dev/flare-network-staging/containers/data-availability:latest
107-
--destination europe-west1-docker.pkg.dev/flare-network-staging/containers/data-availability:${CI_COMMIT_TAG}"
108-
- >-
109-
if [[ $CI_COMMIT_REF_PROTECTED == "true" ]]; then
110-
args="$args --destination europe-west1-docker.pkg.dev/flare-network-production/containers/data-availability:latest"
111-
args="$args --destination europe-west1-docker.pkg.dev/flare-network-production/containers/data-availability:${CI_COMMIT_TAG}"
112-
fi
113-
- /kaniko/executor $args
50+
path: coverage.xml

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.14-slim AS builder
1+
FROM python:3.14-slim-trixie@sha256:fb83750094b46fd6b8adaa80f66e2302ecbe45d513f6cece637a841e1025b4ca AS builder
22

33
COPY --from=ghcr.io/astral-sh/uv:0.10.8 /uv /uvx /bin/
44

@@ -16,7 +16,7 @@ RUN if [ "$DEV" = "true" ]; then \
1616
uv sync --locked --no-dev; \
1717
fi
1818

19-
FROM python:3.14-slim AS final
19+
FROM python:3.14-slim-trixie@sha256:fb83750094b46fd6b8adaa80f66e2302ecbe45d513f6cece637a841e1025b4ca AS final
2020

2121
ARG DEV=false
2222
RUN apt-get update && \

0 commit comments

Comments
 (0)