Skip to content

Commit

Permalink
test develop and releasef low
Browse files Browse the repository at this point in the history
  • Loading branch information
ypoplavs committed Jun 2, 2024
1 parent 7e908a8 commit 5febab8
Show file tree
Hide file tree
Showing 3 changed files with 109 additions and 307 deletions.
82 changes: 19 additions & 63 deletions .github/workflows/docker-build-api-executors-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,24 @@ jobs:
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }}

testworkflow-init:
testworkflow:
strategy:
matrix:
service: [ testworkflow-init, testworkflow-toolkit ]
include:
- service: testworkflow-init
repository: testkube-tw-init
- service: testworkflow-toolkit
repository: testkube-tw-toolkit
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: sigstore/[email protected]
- uses: anchore/sbom-action/[email protected]

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

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

- name: Set-up Go
uses: actions/setup-go@v5
with:
Expand All @@ -107,76 +109,28 @@ jobs:
path: |
~/go/pkg/mod
~/.cache/go-build
key: testkube-tw-init-go-${{ hashFiles('**/go.sum') }}
key: ${{ matrix.service }}-go-${{ hashFiles('**/go.sum') }}

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

- name: Release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-init.yml
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}}
ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}}
SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}}
SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}}
SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}}
CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}}
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }}

testworkflow-toolkit:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: sigstore/[email protected]
- uses: anchore/sbom-action/[email protected]

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

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

- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false

- name: Go Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: testkube-tw-toolkit-go-${{ hashFiles('**/go.sum') }}
- name: Get branch name
run: |
# Extract everything after the first slash
branch_identifier=$(echo "$GITHUB_REF_NAME" | cut -d'/' -f2-)
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Replace slashes with dashes using sed
echo branch_identifier=$(echo "$branch_identifier" | sed 's/\//-/g') >> $GITHUB_ENV
- name: Release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-toolkit.yml
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow.yml --snapshot
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}}
Expand All @@ -190,6 +144,8 @@ jobs:
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }}
SERVICE: ${{ matrix.service }}
REPOSITORY: ${{ matrix.repository }}

single_executor:
strategy:
Expand Down
115 changes: 34 additions & 81 deletions .github/workflows/docker-build-develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
push:
branches:
- develop
- ci/sanbox-flow
paths-ignore:
- 'docs/**'
env:
Expand Down Expand Up @@ -68,65 +69,15 @@ jobs:
run: |
docker push kubeshop/testkube-api-server:${{ steps.commit.outputs.short }}
testworkflow-init:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version: stable
cache: false

- name: Go Cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: testkube-tw-init-go-${{ hashFiles('**/go.sum') }}

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

- id: commit
uses: prompt/actions-commit-hash@v3

- name: Release
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-init.yml --snapshot
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}}
ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}}
SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}}
SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}}
SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}}
CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}}
DOCKER_BUILDX_BUILDER: "${{ steps.buildx.outputs.name }}"
DOCKER_BUILDX_CACHE_FROM: "type=gha"
DOCKER_BUILDX_CACHE_TO: "type=gha,mode=max"
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }}
IMAGE_TAG_SHA: true

- name: Push Docker images
run: |
docker push kubeshop/testkube-tw-init:${{ steps.commit.outputs.short }}
testworkflow-toolkit:
testworkflow:
strategy:
matrix:
service: [ testworkflow-init, testworkflow-toolkit ]
include:
- service: testworkflow-init
repository: testkube-tw-init
- service: testworkflow-toolkit
repository: testkube-tw-toolkit
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -139,7 +90,7 @@ jobs:
- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version: stable
go-version: stable
cache: false

- name: Go Cache
Expand All @@ -148,7 +99,7 @@ jobs:
path: |
~/go/pkg/mod
~/.cache/go-build
key: testkube-tw-toolkit-go-${{ hashFiles('**/go.sum') }}
key: ${{ matrix.service }}-go-${{ hashFiles('**/go.sum') }}

- name: Login to DockerHub
uses: docker/login-action@v3
Expand All @@ -164,7 +115,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow-toolkit.yml --snapshot
args: release -f goreleaser_files/.goreleaser-docker-build-testworkflow.yml --snapshot
env:
GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}}
Expand All @@ -179,10 +130,12 @@ jobs:
ALPINE_IMAGE: ${{ env.ALPINE_IMAGE }}
BUSYBOX_IMAGE: ${{ env.BUSYBOX_IMAGE }}
IMAGE_TAG_SHA: true
SERVICE: ${{ matrix.service }}
REPOSITORY: ${{ matrix.repository }}

- name: Push Docker images
run: |
docker push kubeshop/testkube-tw-toolkit:${{ steps.commit.outputs.short }}
docker push kubeshop/${{ matrix.repository }}:${{ steps.commit.outputs.short }}
single_executor:
strategy:
Expand Down Expand Up @@ -791,21 +744,21 @@ jobs:
docker manifest push -p kubeshop/testkube-${{ matrix.service }}:${{ steps.commit.outputs.short }}
workflow_dispatch:
needs: [api, single_executor, executor_jmeter, executor_jmeterd, jmeterd_slave, executor_maven, executor_gradle, executor_cypress, executor_playwright]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Get commit sha
id: github_sha
run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"

- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.CI_BOT_TOKEN }}
repository: kubeshop/helm-charts
event-type: trigger-workflow-api-develop
client-payload: '{"image_tag_api": "${{ steps.github_sha.outputs.sha_short }}"}'
# workflow_dispatch:
# needs: [api, single_executor, executor_jmeter, executor_jmeterd, jmeterd_slave, executor_maven, executor_gradle, executor_cypress, executor_playwright]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
#
# - name: Get commit sha
# id: github_sha
# run: echo "::set-output name=sha_short::${GITHUB_SHA::7}"
#
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.CI_BOT_TOKEN }}
# repository: kubeshop/helm-charts
# event-type: trigger-workflow-api-develop
# client-payload: '{"image_tag_api": "${{ steps.github_sha.outputs.sha_short }}"}'
Loading

0 comments on commit 5febab8

Please sign in to comment.