Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action workflow to build pipeline base images #603

Closed
Closed
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
63 changes: 63 additions & 0 deletions .github/workflows/pipeline_base_image_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: build pipeline base image

on:
workflow_dispatch:
inputs:
pathToProject:
description: 'path to project'
required: true
default: 'github.com/tektoncd/pipeline'
imageRegistry:
description: 'image registry'
required: true
default: 'gcr.io/tekton-nightly'
url:
description: 'url'
required: true
default: 'build-base:latest'

jobs:
buildx:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: github_actions_base_pipeline

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
install: true

- name: Set up gcloud
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
service_account_key: ${{ secrets.GKE_SA_KEY }}
project_id: ${{ secrets.GKE_PROJECT }}

- name: Configure docker to use gcloud
run: |-
gcloud --quiet auth configure-docker

- name: Checkout pipeline repo
uses: actions/checkout@v2
with:
repository: tektoncd/pipeline
path: pipeline

- name: Run Buildx
run: |
docker build \
--platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x \
--tag ${{ github.event.inputs.imageRegistry }}/${{ github.event.inputs.pathToProject }}/${{ github.event.inputs.url }} \
--push \
./pipeline/images
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be different ? 🤔

Copy link
Member Author

@barthy1 barthy1 Oct 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean platforms? which one would you you suggest?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah I meant the ./pipeline/image path. where is it in the tektoncd/plumbing repository ? shouldn't this be pointing at each images with a Dockerfile ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far I've created this PR to build 1 image -gcr.io/tekton-nightly/github.com/tektoncd/pipeline/build-base:latest - https://github.com/tektoncd/pipeline/blob/master/.ko.yaml#L5
And I thought its Dockerfile is located at https://github.com/tektoncd/pipeline/tree/master/images, so pipeline/images for pipeline repo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it works smoothly we can build other images from plumbing repo itself

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohhhh It's targeting tektoncd/pipeline, I see 😅