Skip to content

Commit

Permalink
Adding release
Browse files Browse the repository at this point in the history
Signed-off-by: David Wertenteil <dwertent@armosec.io>
  • Loading branch information
David Wertenteil committed Feb 7, 2023
1 parent 0994e89 commit fff80ca
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 85 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/02-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
128 changes: 64 additions & 64 deletions .github/workflows/b-binary-build-and-e2e-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}


0 comments on commit fff80ca

Please sign in to comment.