Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
sgalsaleh committed Jan 3, 2024
1 parent e9a9101 commit cf04d81
Showing 1 changed file with 68 additions and 68 deletions.
136 changes: 68 additions & 68 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,67 +467,67 @@ jobs:
# docker push ttl.sh/automated-${{ github.run_id }}/dex:${{ steps.dotenv.outputs.DEX_TAG }}

# # only run validate-kurl-addon if changes to "deploy/kurl/kotsadm/template/**"
# kurl-addon-changes-filter:
# runs-on: ubuntu-20.04
# needs: [ can-run-ci, enable-tests ]
# outputs:
# ok-to-test: ${{ steps.filter.outputs.kurl-addon }}
# steps:
# - uses: actions/checkout@v4
# - uses: dorny/paths-filter@v2
# id: filter
# with:
# filters: |
# kurl-addon:
# - 'deploy/kurl/kotsadm/template/**'
# - 'deploy/kurl/kotsadm/testgrid-os-spec.yaml'
# validate-kurl-addon:
# runs-on: ubuntu-20.04
# if: ${{ needs.kurl-addon-changes-filter.outputs.ok-to-test == 'true' }}
# needs: [ can-run-ci, enable-tests, generate-tag, kurl-addon-changes-filter, build-kots, build-kotsadm, build-kurl-proxy, build-migrations, push-dex ]
# steps:
# - name: checkout
# uses: actions/checkout@v4
# - name: set outputs
# id: vars
# run: |
# addon_version=${{ needs.generate-tag.outputs.tag }}
# echo "addon_version=${addon_version#v}" >> "$GITHUB_OUTPUT"
# - name: download kots binary
# uses: actions/download-artifact@v4
# with:
# name: kots
# path: bin/
# - name: prepare kots binary executable
# run: |
# chmod +x bin/*
# tar -C bin/ -czvf bin/kots.tar.gz kots
# - name: generate kurl add-on
# id: addon-generate
# uses: ./.github/actions/kurl-addon-kots-generate
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.KURL_ADDONS_AWS_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.KURL_ADDONS_AWS_SECRET_ACCESS_KEY }}
# AWS_DEFAULT_REGION: us-east-1
# with:
# addon_version: ${{ steps.vars.outputs.addon_version }}
# kotsadm_image_registry: ttl.sh
# kotsadm_image_namespace: automated-${{ github.run_id }}
# kotsadm_image_tag: 24h
# kotsadm_binary_override: bin/kots.tar.gz
# - name: test kurl add-on
# id: addon-test
# uses: ./.github/actions/kurl-addon-kots-test
# with:
# addon_version: ${{ steps.vars.outputs.addon_version }}
# addon_package_url: ${{ steps.addon-generate.outputs.addon_package_url }}
# testgrid_api_token: ${{ secrets.TESTGRID_PROD_API_TOKEN }}
# - name: comment testgrid url
# uses: mshick/add-pr-comment@v2
# with:
# message: ${{ steps.addon-test.outputs.testgrid_run_message }}
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# allow-repeats: false
kurl-addon-changes-filter:
runs-on: ubuntu-20.04
# needs: [ can-run-ci, enable-tests ]
outputs:
ok-to-test: ${{ steps.filter.outputs.kurl-addon }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
kurl-addon:
- 'deploy/kurl/kotsadm/template/**'
- 'deploy/kurl/kotsadm/testgrid-os-spec.yaml'
validate-kurl-addon:
runs-on: ubuntu-20.04
if: ${{ needs.kurl-addon-changes-filter.outputs.ok-to-test == 'true' }}
# needs: [ can-run-ci, enable-tests, generate-tag, kurl-addon-changes-filter, build-kots, build-kotsadm, build-kurl-proxy, build-migrations, push-dex ]
steps:
- name: checkout
uses: actions/checkout@v4
- name: set outputs
id: vars
run: |
addon_version=${{ needs.generate-tag.outputs.tag }}
echo "addon_version=${addon_version#v}" >> "$GITHUB_OUTPUT"
- name: download kots binary
uses: actions/download-artifact@v4
with:
name: kots
path: bin/
- name: prepare kots binary executable
run: |
chmod +x bin/*
tar -C bin/ -czvf bin/kots.tar.gz kots
- name: generate kurl add-on
id: addon-generate
uses: ./.github/actions/kurl-addon-kots-generate
env:
AWS_ACCESS_KEY_ID: ${{ secrets.KURL_ADDONS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.KURL_ADDONS_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
with:
addon_version: ${{ steps.vars.outputs.addon_version }}
kotsadm_image_registry: ttl.sh
kotsadm_image_namespace: automated-${{ github.run_id }}
kotsadm_image_tag: 24h
kotsadm_binary_override: bin/kots.tar.gz
- name: test kurl add-on
id: addon-test
uses: ./.github/actions/kurl-addon-kots-test
with:
addon_version: ${{ steps.vars.outputs.addon_version }}
addon_package_url: ${{ steps.addon-generate.outputs.addon_package_url }}
testgrid_api_token: ${{ secrets.TESTGRID_PROD_API_TOKEN }}
- name: comment testgrid url
uses: mshick/add-pr-comment@v2
with:
message: ${{ steps.addon-test.outputs.testgrid_run_message }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false


# cmx-versions:
Expand Down Expand Up @@ -3931,19 +3931,19 @@ jobs:
validate-success:
runs-on: ubuntu-20.04
needs:
# - validate-kurl-addon
- validate-kurl-addon
- validate-pr-tests
if: always()
steps:
# https://docs.github.com/en/actions/learn-github-actions/contexts#needs-context
# if the validate-kurl-addon job failed or was cancelled, this job will fail. it's ok if this job was skipped
# - name: fail if validate-kurl-addon job failed
# if: needs.validate-kurl-addon.result == 'failure' || needs.validate-kurl-addon.result == 'cancelled'
# run: exit 1
- name: fail if validate-kurl-addon job failed
if: needs.validate-kurl-addon.result == 'failure' || needs.validate-kurl-addon.result == 'cancelled'
run: exit 1
# # if the validate-pr-tests job was not successful, this job will fail
# - name: fail if validate-pr-tests job was not successful
# if: needs.validate-pr-tests.result != 'success'
# run: exit 1
- name: fail if validate-pr-tests job was not successful
if: needs.validate-pr-tests.result != 'success'
run: exit 1
# if the validate-pr-tests job was successful, this job will succeed
- name: succeed if validate-pr-tests job succeeded
if: needs.validate-pr-tests.result == 'success'
Expand Down

0 comments on commit cf04d81

Please sign in to comment.