-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[OSSM-5306][OSSM-5307] Add building tests images into pipeline
- Loading branch information
Showing
5 changed files
with
192 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Release test suites images | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
initialize: | ||
name: Initialize | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
quay_org: 'kiali' | ||
images_tag: ${{ steps.images_tag.outputs.images_tag }} | ||
steps: | ||
- name: Determine Images tag without Z version | ||
id: images_tag | ||
run: | | ||
major=$(echo ${{ github.ref_name }} | cut -d. -f1) | ||
minor=$(echo ${{ github.ref_name }} | cut -d. -f2) | ||
echo "images_tag=$major.$minor" >> $GITHUB_OUTPUT | ||
- name: Log information | ||
run: | | ||
echo "Github tag": ${{ github.ref_name }} | ||
echo "Quay main version tag": ${{ steps.images_tag.outputs.images_tag }} | ||
push_test_images: | ||
name: Build and push images with full tag | ||
uses: ./.github/workflows/tests-images-creator.yml | ||
needs: [initialize] | ||
with: | ||
release_branch: ${{ github.ref_name }} | ||
images_tag: ${{ github.ref_name }} | ||
quay_org: ${{ needs.initialize.outputs.quay_org }} | ||
secrets: | ||
QUAY_USER: ${{ secrets.QUAY_USER }} | ||
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
update_latest_test_images: | ||
name: Update images under major.minor version tag | ||
runs-on: ubuntu-20.04 | ||
needs: [initialize, push_test_images] | ||
steps: | ||
- name: Login to Quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
|
||
- name: Pull new integration test image | ||
run: | | ||
docker pull quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-int-tests:${{ github.ref_name }} | ||
- name: Use major.minor version tag | ||
run: | | ||
docker tag quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-int-tests:${{ github.ref_name }} quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-int-tests:${{ needs.initialize.outputs.images_tag }} | ||
- name: Update integration test image in quay | ||
run: | | ||
docker push quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-int-tests:${{ needs.initialize.outputs.images_tag }} | ||
- name: Pull new cypress test image | ||
run: | | ||
docker pull quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-cypress-tests:${{ github.ref_name }} | ||
- name: Use major.minor version tag | ||
run: | | ||
docker tag quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-cypress-tests:${{ github.ref_name }} quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-cypress-tests:${{ needs.initialize.outputs.images_tag }} | ||
- name: Update cypress test image in quay | ||
run: | | ||
docker push quay.io/${{ needs.initialize.outputs.quay_org }}/kiali-cypress-tests:${{ needs.initialize.outputs.images_tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build and push test suites images | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_branch: | ||
description: Branch to release | ||
default: master | ||
type: string | ||
required: true | ||
quay_org: | ||
description: Quay organization | ||
type: string | ||
default: kiali | ||
required: true | ||
images_tag: | ||
description: Images tag | ||
type: string | ||
default: dev | ||
required: true | ||
workflow_call: | ||
inputs: | ||
release_branch: | ||
description: Branch to release | ||
type: string | ||
required: true | ||
quay_org: | ||
description: Quay organization | ||
type: string | ||
required: true | ||
images_tag: | ||
description: Images tag | ||
type: string | ||
required: true | ||
secrets: | ||
QUAY_USER: | ||
description: 'A quay user secret passed from the caller workflow' | ||
required: true | ||
QUAY_PASSWORD: | ||
description: 'A quay user password passed from the caller workflow' | ||
required: true | ||
|
||
|
||
jobs: | ||
build_and_push: | ||
name: Generate and push docker images | ||
runs-on: ubuntu-latest | ||
env: | ||
# These ENVs are expected in Make file! | ||
IMAGE_ORG: ${{ inputs.quay_org }} | ||
INT_TESTS_CONTAINER_VERSION: ${{ inputs.images_tag }} | ||
CYPRESS_TESTS_CONTAINER_VERSION: ${{ inputs.images_tag }} | ||
steps: | ||
- name: Log information | ||
run: | | ||
echo "Branch": ${{ inputs.release_branch }} | ||
echo "Quay organization": ${{ inputs.quay_org }} | ||
echo "Images tag": ${{ inputs.images_tag }} | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.release_branch }} | ||
- name: Login to Quay.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: quay.io | ||
username: ${{ secrets.QUAY_USER }} | ||
password: ${{ secrets.QUAY_PASSWORD }} | ||
- name: "Build integration tests image" | ||
run: | | ||
make container-build-int-tests container-push-int-tests-quay | ||
- name: "Build cypress tests image" | ||
run: | | ||
make container-build-cypress-tests container-push-cypress-tests-quay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters