diff --git a/.github/workflows/acceptance_tests.yml b/.github/workflows/acceptance_tests.yml index 199dc0c51..ed73c704c 100644 --- a/.github/workflows/acceptance_tests.yml +++ b/.github/workflows/acceptance_tests.yml @@ -1,12 +1,6 @@ -name: acceptance tests +on: [push, pull_request] -on: - pull_request: - branches: - - 'main' - push: - branches: - - 'develop' +name: Acceptance tests env: KUBESHARK_CI_IMAGE: kubeshark/ci:0.0 diff --git a/.github/workflows/acceptance_tests_on_pr.yml b/.github/workflows/acceptance_tests_on_pr.yml deleted file mode 100644 index a70dc1730..000000000 --- a/.github/workflows/acceptance_tests_on_pr.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Acceptance tests on PR - -on: push - -env: - KUBESHARK_CI_IMAGE: kubeshark/ci:0.0 - -concurrency: - group: acceptance-tests-on-pr-${{ github.ref }} - cancel-in-progress: true - -jobs: - run-tests: - name: Run tests - runs-on: ubuntu-latest - if: ${{ contains(github.event.head_commit.message, '#run_acceptance_tests') }} - - steps: - - name: Set up Go 1.17 - uses: actions/setup-go@v2 - with: - go-version: '^1.17' - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Build - uses: docker/build-push-action@v2 - with: - context: . - push: false - load: true - tags: ${{ env.KUBESHARK_CI_IMAGE }} - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Setup acceptance test - run: ./acceptanceTests/setup.sh - - - name: Create k8s users and change context - env: - USERNAME_UNRESTRICTED: user-with-clusterwide-access - USERNAME_RESTRICTED: user-with-restricted-access - run: | - ./acceptanceTests/create_user.sh "${USERNAME_UNRESTRICTED}" - ./acceptanceTests/create_user.sh "${USERNAME_RESTRICTED}" - kubectl apply -f cli/cmd/permissionFiles/permissions-all-namespaces-tap.yaml - kubectl config use-context ${USERNAME_UNRESTRICTED} - - - name: Test - run: make acceptance-test diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b1f6a28d..ef0a6126f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,10 @@ -name: Build - on: - pull_request: - branches: - - 'develop' - - 'main' + push: + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Build concurrency: group: kubeshark-pr-validation-${{ github.ref }} @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 2 - + - name: Check modified files id: modified_files run: devops/check_modified_files.sh cli/ @@ -42,7 +42,7 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 2 - + - name: Check modified files id: modified_files run: devops/check_modified_files.sh agent/ shared/ tap/ ui/ ui-common/ Dockerfile diff --git a/.github/workflows/inactive-issues-close.yaml b/.github/workflows/inactive-issues-close.yaml deleted file mode 100644 index b854b2064..000000000 --- a/.github/workflows/inactive-issues-close.yaml +++ /dev/null @@ -1,23 +0,0 @@ -name: Close inactive issues -on: - schedule: - - cron: "0 0 * * *" - -jobs: - close-issues: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v3 - with: - days-before-issue-stale: 30 - days-before-issue-close: -1 - exempt-issue-labels: "enhancement" - stale-issue-label: "stale" - stale-issue-message: "This issue is stale because it has been open for 30 days with no activity." - close-issue-message: "" - days-before-pr-stale: -1 - days-before-pr-close: -1 - repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00bca0583..9c1ca96ed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,10 @@ -name: Release - on: push: - branches: - - 'develop' - - 'main' + # Sequence of patterns matched against refs/tags + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + +name: Release concurrency: group: kubeshark-publish-${{ github.ref }} diff --git a/.github/workflows/static_code_analysis.yml b/.github/workflows/static_code_analysis.yml index d61504803..0b3887c8b 100644 --- a/.github/workflows/static_code_analysis.yml +++ b/.github/workflows/static_code_analysis.yml @@ -1,10 +1,6 @@ -name: Static code analysis +on: [push, pull_request] -on: - pull_request: - branches: - - 'develop' - - 'main' +name: Static code analysis permissions: contents: read @@ -113,7 +109,7 @@ jobs: with: version: latest working-directory: tap/extensions/amqp - + - name: Check tap/extensions/http modified files id: tap_http_modified_files run: devops/check_modified_files.sh tap/extensions/http/ @@ -169,11 +165,11 @@ jobs: - uses: actions/setup-node@v2 with: node-version: 16 - + - name: Check modified UI files id: ui_modified_files run: devops/check_modified_files.sh ui/ - + - name: ESLint prerequisites ui if: steps.ui_modified_files.outputs.matched == 'true' run: | @@ -187,11 +183,11 @@ jobs: run: | cd ui npm run eslint - + - name: Check modified ui-common files id: ui_common_modified_files run: devops/check_modified_files.sh ui-common/ - + - name: ESLint prerequisites ui-common if: steps.ui_common_modified_files.outputs.matched == 'true' run: | diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4dff0deff..0092fc92e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,14 +1,6 @@ -name: Test +on: [push, pull_request] -on: - pull_request: - branches: - - 'develop' - - 'main' - push: # needed to upload test coverage report to codecov - branches: - - 'develop' - - 'main' +name: Test concurrency: group: kubeshark-tests-validation-${{ github.ref }} @@ -62,7 +54,7 @@ jobs: - name: Shared Test run: make test-shared - + - name: Check extensions modified files id: ext_modified_files run: devops/check_modified_files.sh tap/extensions/ tap/api/