FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(build): build multi-arch images by nejch · Pull Request #2987 · python-gitlab/python-gitlab · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
33 changes: 29 additions & 4 deletions .gitlab-ci.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
image: python:3.12

stages:
- build
- deploy
- promote

deploy-images:
stage: deploy
build-images:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-alpine
- executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-slim-bullseye --build-arg PYTHON_FLAVOR=slim-bullseye
- executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE/$CI_RUNNER_EXECUTABLE_ARCH:$CI_COMMIT_TAG-alpine
- executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE/$CI_RUNNER_EXECUTABLE_ARCH:$CI_COMMIT_TAG-slim-bullseye --build-arg PYTHON_FLAVOR=slim-bullseye
Comment thread
nejch marked this conversation as resolved.
rules:
- if: $CI_COMMIT_TAG
tags:
- $RUNNER_TAG
parallel:
matrix:
# See tags in https://docs.gitlab.com/ee/ci/runners/hosted_runners/linux.html
- RUNNER_TAG: saas-linux-medium-amd64
- RUNNER_TAG: saas-linux-medium-arm64

deploy-images:
stage: deploy
image:
name: mplatform/manifest-tool:alpine-v2.0.4@sha256:38b399ff66f9df247af59facceb7b60e2cd01c2d649aae318da7587efb4bbf87
entrypoint: [""]
script:
- manifest-tool --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD push from-args
--platforms linux/amd64,linux/arm64
--template $CI_REGISTRY_IMAGE/OS/ARCH:$CI_COMMIT_TAG-alpine
--target $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-alpine
- manifest-tool --username $CI_REGISTRY_USER --password $CI_REGISTRY_PASSWORD push from-args
--platforms linux/amd64,linux/arm64
--template $CI_REGISTRY_IMAGE/OS/ARCH:$CI_COMMIT_TAG-slim-bullseye
--target $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG-slim-bullseye
rules:
- if: $CI_COMMIT_TAG

Expand Down

Back | FazBrowse Home | New Git URL