From fff80ca572a7463649140b5afe2dde3982142861 Mon Sep 17 00:00:00 2001 From: David Wertenteil Date: Tue, 7 Feb 2023 11:44:10 +0200 Subject: [PATCH] Adding release Signed-off-by: David Wertenteil --- .github/workflows/02-release.yaml | 42 +++--- .../b-binary-build-and-e2e-tests.yaml | 128 +++++++++--------- 2 files changed, 85 insertions(+), 85 deletions(-) diff --git a/.github/workflows/02-release.yaml b/.github/workflows/02-release.yaml index b477bad072..4c9df2dc97 100644 --- a/.github/workflows/02-release.yaml +++ b/.github/workflows/02-release.yaml @@ -18,28 +18,28 @@ jobs: with: SUB_STRING: "-rc" - # binary-build: - # needs: [retag] - # uses: ./.github/workflows/b-binary-build-and-e2e-tests.yaml - # with: - # COMPONENT_NAME: kubescape - # CGO_ENABLED: 1 - # GO111MODULE: "" - # GO_VERSION: "1.19" - # RELEASE: ${{ github.ref_name}} - # CLIENT: release - # secrets: inherit + binary-build: + needs: [retag] + uses: ./.github/workflows/b-binary-build-and-e2e-tests.yaml + with: + COMPONENT_NAME: kubescape + CGO_ENABLED: 1 + GO111MODULE: "" + GO_VERSION: "1.19" + RELEASE: ${{ github.ref_name}} + CLIENT: release + secrets: inherit - # create-release: - # permissions: - # contents: write - # needs: [retag, binary-build] - # uses: ./.github/workflows/c-create-release.yaml - # with: - # RELEASE_NAME: "Release ${{ needs.retag.outputs.NEW_TAG }}" - # TAG: ${{ needs.retag.outputs.NEW_TAG }} - # DRAFT: false - # secrets: inherit + create-release: + permissions: + contents: write + needs: [retag, binary-build] + uses: ./.github/workflows/c-create-release.yaml + with: + RELEASE_NAME: "Release ${{ needs.retag.outputs.NEW_TAG }}" + TAG: ${{ needs.retag.outputs.NEW_TAG }} + DRAFT: false + secrets: inherit # publish-krew-plugin: # name: Publish Krew plugin diff --git a/.github/workflows/b-binary-build-and-e2e-tests.yaml b/.github/workflows/b-binary-build-and-e2e-tests.yaml index 9239c5b96c..b92852c8f0 100644 --- a/.github/workflows/b-binary-build-and-e2e-tests.yaml +++ b/.github/workflows/b-binary-build-and-e2e-tests.yaml @@ -195,82 +195,82 @@ jobs: path: build/${{ matrix.os }}/ if-no-files-found: error - run-tests: - strategy: - fail-fast: false - matrix: - TEST: ${{ fromJson(needs.binary-build.outputs.TEST_NAMES) }} - needs: binary-build - runs-on: ubuntu-20.04 # This cannot change - steps: + # run-tests: + # strategy: + # fail-fast: false + # matrix: + # TEST: ${{ fromJson(needs.binary-build.outputs.TEST_NAMES) }} + # needs: binary-build + # runs-on: ubuntu-20.04 # This cannot change + # steps: - - uses: actions/download-artifact@v3.0.2 - id: download-artifact - with: - name: kubescape-ubuntu-latest - path: "~" + # - uses: actions/download-artifact@v3.0.2 + # id: download-artifact + # with: + # name: kubescape-ubuntu-latest + # path: "~" - - run: ls -laR + # - run: ls -laR - - name: chmod +x - run: chmod +x ${{steps.download-artifact.outputs.download-path}}/kubescape-ubuntu-latest + # - name: chmod +x + # run: chmod +x ${{steps.download-artifact.outputs.download-path}}/kubescape-ubuntu-latest - - name: Checkout systests repo - uses: actions/checkout@v3 - with: - repository: armosec/system-tests - path: . + # - name: Checkout systests repo + # uses: actions/checkout@v3 + # with: + # repository: armosec/system-tests + # path: . - - uses: actions/setup-python@v4 - with: - python-version: '3.8.13' - cache: 'pip' + # - uses: actions/setup-python@v4 + # with: + # python-version: '3.8.13' + # cache: 'pip' - - name: create env - run: ./create_env.sh + # - name: create env + # run: ./create_env.sh - - name: Generate uuid - id: uuid - run: | - echo "RANDOM_UUID=$(uuidgen)" >> $GITHUB_OUTPUT + # - name: Generate uuid + # id: uuid + # run: | + # echo "RANDOM_UUID=$(uuidgen)" >> $GITHUB_OUTPUT - - name: Create k8s Kind Cluster - id: kind-cluster-install - uses: helm/kind-action@v1.3.0 - with: - cluster_name: ${{ steps.uuid.outputs.RANDOM_UUID }} + # - name: Create k8s Kind Cluster + # id: kind-cluster-install + # uses: helm/kind-action@v1.3.0 + # with: + # cluster_name: ${{ steps.uuid.outputs.RANDOM_UUID }} - - name: run-tests - env: - CUSTOMER: ${{ secrets.CUSTOMER }} - USERNAME: ${{ secrets.USERNAME }} - PASSWORD: ${{ secrets.PASSWORD }} - CLIENT_ID: ${{ secrets.CLIENT_ID_PROD }} - SECRET_KEY: ${{ secrets.SECRET_KEY_PROD }} - REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} - REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} + # - name: run-tests + # env: + # CUSTOMER: ${{ secrets.CUSTOMER }} + # USERNAME: ${{ secrets.USERNAME }} + # PASSWORD: ${{ secrets.PASSWORD }} + # CLIENT_ID: ${{ secrets.CLIENT_ID_PROD }} + # SECRET_KEY: ${{ secrets.SECRET_KEY_PROD }} + # REGISTRY_USERNAME: ${{ secrets.REGISTRY_USERNAME }} + # REGISTRY_PASSWORD: ${{ secrets.REGISTRY_PASSWORD }} - run: | - echo "Test history:" - echo " ${{ matrix.TEST }} " >/tmp/testhistory - cat /tmp/testhistory - source systests_python_env/bin/activate + # run: | + # echo "Test history:" + # echo " ${{ matrix.TEST }} " >/tmp/testhistory + # cat /tmp/testhistory + # source systests_python_env/bin/activate - python3 systest-cli.py \ - -t ${{ matrix.TEST }} \ - -b production \ - -c CyberArmorTests \ - --duration 3 \ - --logger DEBUG \ - --kwargs kubescape=${{steps.download-artifact.outputs.download-path}}/kubescape-ubuntu-latest + # python3 systest-cli.py \ + # -t ${{ matrix.TEST }} \ + # -b production \ + # -c CyberArmorTests \ + # --duration 3 \ + # --logger DEBUG \ + # --kwargs kubescape=${{steps.download-artifact.outputs.download-path}}/kubescape-ubuntu-latest - deactivate + # deactivate - - name: Test Report - uses: mikepenz/action-junit-report@v3.6.1 - if: always() # always run even if the previous step fails - with: - report_paths: '**/results_xml_format/**.xml' - commit: ${{github.event.workflow_run.head_sha}} + # - name: Test Report + # uses: mikepenz/action-junit-report@v3.6.1 + # if: always() # always run even if the previous step fails + # with: + # report_paths: '**/results_xml_format/**.xml' + # commit: ${{github.event.workflow_run.head_sha}} \ No newline at end of file