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

feat: tkc 2620 docker agent include docker image as part of the cicd #5900

Merged
Show file tree
Hide file tree
Changes from 17 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
46 changes: 46 additions & 0 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,52 @@ 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/amd64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 > build/kind/images/node.tar

docker pull --platform linux/arm64 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/Dockerfile.kind
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
47 changes: 47 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,53 @@ 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/amd64 kindest/node:v1.31.0
docker save kindest/node:v1.31.0 > build/kind/images/node.tar

docker pull --platform linux/arm64 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/Dockerfile.kind
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
Loading