Skip to content
Merged
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
24 changes: 2 additions & 22 deletions .github/workflows/publish_image_chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:

env:
GHCR: ghcr.io
GCR: gcr.io
HELM_VERSION: 3.8.2

jobs:
Expand All @@ -20,9 +19,6 @@ jobs:
packages: write
strategy:
matrix:
container_registry:
- ghcr.io/pipe-cd
- gcr.io/pipecd
image:
- helloworld
- launcher
Expand All @@ -46,15 +42,6 @@ jobs:
dockerfile: cmd/piped/Dockerfile-okd
- image: pipectl
dockerfile: cmd/pipectl/Dockerfile
exclude:
- image: launcher-okd
container_registry: gcr.io/pipecd
- image: controlplane
container_registry: gcr.io/pipecd
- image: piped-okd
container_registry: gcr.io/pipecd
- image: pipectl
container_registry: gcr.io/pipecd

steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -77,13 +64,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to GCR
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.GCR }}
username: _json_key
password: ${{ secrets.GCR_SA }}

# Building and pushing container images.
- name: Build and push ${{ matrix.image }} image
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
Expand All @@ -92,9 +72,9 @@ jobs:
context: .
file: ${{ matrix.dockerfile }}
platforms: linux/amd64,linux/arm64
tags: ${{ matrix.container_registry }}/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
tags: ${{ env.GHCR }}/pipe-cd/${{ matrix.image }}:${{ env.PIPECD_VERSION }}
# parameter to use inline cache. ref; https://docs.docker.com/build/ci/github-actions/cache/#inline-cache
cache-from: type=registry,ref=${{ matrix.container_registry }}/${{ matrix.image }}:latest
cache-from: type=registry,ref=${{ env.GHCR }}/pipe-cd/${{ matrix.image }}:latest
cache-to: type=inline

# Publish Helm charts once, only after every image in the artifacts matrix has
Expand Down
37 changes: 7 additions & 30 deletions .github/workflows/publish_pipedv1_exp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ permissions: {}
env:
GO_VERSION: 1.26.2
GHCR: ghcr.io
GCR: gcr.io
HELM_VERSION: 3.8.2

jobs:
Expand Down Expand Up @@ -59,9 +58,6 @@ jobs:
arch: amd64
- runner: ubuntu-24.04-arm
arch: arm64
container_registry:
- ghcr.io/pipe-cd
- gcr.io/pipecd
runs-on: ${{ matrix.platform.runner }}
permissions:
contents: read
Expand All @@ -82,13 +78,6 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to GCR
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.GCR }}
username: _json_key
password: ${{ secrets.GCR_SA }}

# Build and push image by digest (without tag)
- name: Build and push pipedv1 experimental image (${{ matrix.platform.arch }})
id: build
Expand All @@ -97,8 +86,8 @@ jobs:
context: .
file: cmd/pipedv1/Dockerfile
platforms: linux/${{ matrix.platform.arch }}
outputs: type=image,name=${{ matrix.container_registry }}/pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=${{ matrix.container_registry }}/pipedv1-exp:latest
outputs: type=image,name=${{ env.GHCR }}/pipe-cd/pipedv1-exp,push-by-digest=true,name-canonical=true,push=true
cache-from: type=registry,ref=${{ env.GHCR }}/pipe-cd/pipedv1-exp:latest
cache-to: type=inline

# Export digest as artifact for merge job
Expand All @@ -111,7 +100,7 @@ jobs:
- name: Upload digest
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: digests-pipedv1-exp-${{ matrix.platform.arch }}-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
name: digests-pipedv1-exp-${{ matrix.platform.arch }}
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1
Expand All @@ -123,11 +112,6 @@ jobs:
permissions:
contents: read
packages: write
strategy:
matrix:
container_registry:
- ghcr.io/pipe-cd
- gcr.io/pipecd
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
Expand All @@ -137,7 +121,7 @@ jobs:
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: /tmp/digests
pattern: digests-pipedv1-exp-*-${{ matrix.container_registry == 'ghcr.io/pipe-cd' && 'ghcr' || 'gcr' }}
pattern: digests-pipedv1-exp-*
merge-multiple: true

- name: Set up Docker Buildx
Expand All @@ -151,24 +135,17 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to GCR
uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f # v4.6.0
with:
registry: ${{ env.GCR }}
username: _json_key
password: ${{ secrets.GCR_SA }}

# Create and push multi-arch manifest
- name: Create manifest list and push
working-directory: /tmp/digests
run: |
docker buildx imagetools create \
-t ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }} \
$(printf '${{ matrix.container_registry }}/pipedv1-exp@sha256:%s ' *)
-t ${{ env.GHCR }}/pipe-cd/pipedv1-exp:${{ inputs.version }} \
$(printf '${{ env.GHCR }}/pipe-cd/pipedv1-exp@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect ${{ matrix.container_registry }}/pipedv1-exp:${{ inputs.version }}
docker buildx imagetools inspect ${{ env.GHCR }}/pipe-cd/pipedv1-exp:${{ inputs.version }}

image_chart:
runs-on: ubuntu-24.04
Expand Down
13 changes: 0 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,6 @@ build/plugin:
done
@echo "Plugins are built and copied to $(PLUGINS_BIN_DIR)"

.PHONY: push
push/chart: BUCKET ?= charts.pipecd.dev
push/chart: VERSION ?= $(shell git describe --tags --always --dirty --abbrev=7 --match 'v[0-9]*.*')
push/chart: CREDENTIALS_FILE ?= ~/.config/gcloud/application_default_credentials.json
push/chart:
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/pipecd/Chart.yaml
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/controlplane/Chart.yaml
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/piped/Chart.yaml
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/site/Chart.yaml
@yq -i '.version = "${VERSION}" | .appVersion = "${VERSION}"' manifests/helloworld/Chart.yaml
docker run --rm -it -v ${CREDENTIALS_FILE}:/secret -v ${PWD}:/repo gcr.io/pipecd/chart-releaser@sha256:fc432431b411a81d7658355c27ebaa924afe190962ab11d46f5a6cdff0833cc3 /chart-releaser --bucket=${BUCKET} --manifests-dir=repo/manifests --credentials-file=secret #v0.13.0
@git checkout manifests/

# Test commands

..PHONY: test
Expand Down
Loading