Skip to content

Commit

Permalink
feat: tkc 2620 docker agent include docker image as part of the cicd (#…
Browse files Browse the repository at this point in the history
…5900)

* add agent image build
  • Loading branch information
ypoplavs authored Oct 7, 2024
1 parent 7be199a commit da1f500
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,55 @@ jobs:
${{ matrix.name }}/testkube_${{ matrix.name }}_*
retention-days: 1

build_agent_image:
name: Build a Docker image for Testkube Agent
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true

- name: Preload kind images
run: |
mkdir -p build/kind/images
docker pull --platform linux/arm64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 > build/kind/images/node.tar
docker pull --platform linux/amd64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 >> build/kind/images/node.tar
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: |
segmentio_key=${{secrets.TESTKUBE_SEGMENTIO_KEY}}
ga_id=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_ID}}
ga_secret=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_SECRET}}
context: build/kind
file: build/kind/kind.Dockerfile
platforms: linux/amd64,linux/arm64/v8
provenance: mode=max
push: true
sbom: true
tags: kubeshop/testkube-agent:${{steps.tag.outputs.tag}}

release:
name: Create and upload release-artifacts
needs: pre_build
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,56 @@ jobs:
${{ matrix.name }}/testkube_${{ matrix.name }}_*
retention-days: 1

build_agent_image:
name: Build a Docker image for Testkube Agent
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
with:
strip_v: true

- name: Preload kind images
run: |
mkdir -p build/kind/images
docker pull --platform linux/arm64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 > build/kind/images/node.tar
docker pull --platform linux/amd64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 >> build/kind/images/node.tar
- name: Build and push
uses: docker/build-push-action@v6
with:
build-args: |
segmentio_key=${{secrets.TESTKUBE_SEGMENTIO_KEY}}
ga_id=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_ID}}
ga_secret=${{secrets.TESTKUBE_CLI_GA_MEASUREMENT_SECRET}}
context: build/kind
file: build/kind/kind.Dockerfile
platforms: linux/amd64,linux/arm64
provenance: mode=max
push: true
sbom: true
tags: kubeshop/testkube-agent:${{steps.tag.outputs.tag}},kubeshop/testkube-agent:latest

release:
name: Create and upload release-artifacts
needs: pre_build
Expand Down
File renamed without changes.

0 comments on commit da1f500

Please sign in to comment.