From 3ca3d2310760efb5c878bc78ef12bbda8942a607 Mon Sep 17 00:00:00 2001 From: Serverless QE Robot Date: Thu, 14 Nov 2024 19:39:49 -0500 Subject: [PATCH] :fire: remove unneeded workflows Signed-off-by: Serverless QE Robot --- .github/workflows/OWNERS | 2 - .github/workflows/build-dependabot-pr.yaml | 51 ----------- .github/workflows/knative-go-build.yaml | 14 --- .github/workflows/knative-go-test.yaml | 19 ---- .github/workflows/knative-java-test.yaml | 61 ------------- .../workflows/knative-profile-data-plane.yaml | 90 ------------------- .github/workflows/knative-security.yaml | 17 ---- .github/workflows/knative-stale.yaml | 14 --- .github/workflows/knative-style.yaml | 15 ---- .github/workflows/knative-verify.yaml | 26 ------ .github/workflows/update-dependabot-pr.yaml | 69 -------------- 11 files changed, 378 deletions(-) delete mode 100644 .github/workflows/OWNERS delete mode 100644 .github/workflows/build-dependabot-pr.yaml delete mode 100644 .github/workflows/knative-go-build.yaml delete mode 100644 .github/workflows/knative-go-test.yaml delete mode 100644 .github/workflows/knative-java-test.yaml delete mode 100644 .github/workflows/knative-profile-data-plane.yaml delete mode 100644 .github/workflows/knative-security.yaml delete mode 100644 .github/workflows/knative-stale.yaml delete mode 100644 .github/workflows/knative-style.yaml delete mode 100644 .github/workflows/knative-verify.yaml delete mode 100644 .github/workflows/update-dependabot-pr.yaml diff --git a/.github/workflows/OWNERS b/.github/workflows/OWNERS deleted file mode 100644 index 948c2c303e..0000000000 --- a/.github/workflows/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -labels: -- area/test diff --git a/.github/workflows/build-dependabot-pr.yaml b/.github/workflows/build-dependabot-pr.yaml deleted file mode 100644 index d297314206..0000000000 --- a/.github/workflows/build-dependabot-pr.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# This workflow runs with a READ-ONLY GITHUB_TOKEN -# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ - -# This action will run a `mvn license:aggregate-add-third-party` without write access to the repository - -# The completion of this workflow triggers the `Update Dependabot Maven PR` -# workflow which has a read-write GITHUB_TOKEN, extracting the changes to -# license files and pushing these to back to the Dependabot PR branch. - -name: Build Dependabot Maven PR -on: - push: - branches: - - "dependabot/maven**" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup java - uses: actions/setup-java@v1 - with: - java-version: 21 - - - run: mvn --no-transfer-progress -B --file data-plane/pom.xml -Dlicense.outputDirectory=. license:aggregate-add-third-party - - run: mkdir ./dependabot-pr - - name: Save branch ref - run: echo ${{ github.ref }} | sed 's/refs\/heads\///' > ./dependabot-pr/BRANCH_REF - - name: Configure git - run: | - git config --local user.email "automation@knative.team" - git config --local user.name "Knative Automation" - # NOTE: Prefixing/appending commit messages with `[dependabot skip]` allows - # dependabot to rebase/update the pull request, force-pushing over any changes - - name: Commit and copy license changes - run: | - if [[ $(git status | grep 'data-plane/THIRD-PARTY.txt') ]]; then - git add data-plane/THIRD-PARTY.txt - git commit --signoff -m "[dependabot skip] Update data-plane/THIRD-PARTY.txt" - git format-patch -n HEAD^ --binary --stdout > ./dependabot-pr/changes.patch - else - echo "Licenses were not changed" - fi - # NOTE: Use actions/upload-artifact instead of actions/cache as the - # workflow triggered on the default branch doesn't have access to caches - # created on feature branches - - uses: actions/upload-artifact@v2 - with: - name: dependabot-pr - path: dependabot-pr/ diff --git a/.github/workflows/knative-go-build.yaml b/.github/workflows/knative-go-build.yaml deleted file mode 100644 index 10c3de1a1e..0000000000 --- a/.github/workflows/knative-go-build.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Build - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - build: - uses: knative/actions/.github/workflows/reusable-go-build.yaml@main diff --git a/.github/workflows/knative-go-test.yaml b/.github/workflows/knative-go-test.yaml deleted file mode 100644 index aa3ec66c5d..0000000000 --- a/.github/workflows/knative-go-test.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright 2022 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Test - -on: - push: - branches: [ 'main', 'release-*' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - test: - uses: knative/actions/.github/workflows/reusable-go-test.yaml@main - secrets: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/knative-java-test.yaml b/.github/workflows/knative-java-test.yaml deleted file mode 100644 index 30f6d60c94..0000000000 --- a/.github/workflows/knative-java-test.yaml +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2020 The Knative Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Java Test - -on: - - push: - branches: [ 'main' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - - test: - name: Java Unit Tests - strategy: - matrix: - java-version: [ 21 ] - platform: [ ubuntu-latest ] - - runs-on: ${{ matrix.platform }} - - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Setup java - uses: actions/setup-java@v2 - with: - cache: 'maven' - java-version: ${{ matrix.java-version }} - distribution: 'temurin' # Eclipse Temurin, the new home for AdoptOpenJDK - - - name: Check for .codecov.yaml - id: codecov-enabled - uses: andstor/file-existence-action@v1 - with: - files: .codecov.yaml - - - name: Java Test - run: ./hack/run.sh unit-tests-data-plane - - - if: steps.codecov-enabled.outputs.files_exists == 'true' - name: Codecov - uses: codecov/codecov-action@v1 - with: - file: ./data-plane/target/jacoco/jacoco.xml - flags: java-unittests diff --git a/.github/workflows/knative-profile-data-plane.yaml b/.github/workflows/knative-profile-data-plane.yaml deleted file mode 100644 index ddaa120c2c..0000000000 --- a/.github/workflows/knative-profile-data-plane.yaml +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright 2020 The Knative Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is automagically synced here from github.com/knative-sandbox/.github -# repo by knobots: https://github.com/mattmoor/knobots and will be overwritten. - -name: Profiling - -on: - - push: - branches: [ 'main' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - - test: - name: Data plane - strategy: - matrix: - java-version: - - 21 - go-version: - - 1.17.x - platform: [ ubuntu-latest ] - event: - - alloc - - cpu - - lock - - env: - EVENT: ${{ matrix.event }} - - runs-on: ${{ matrix.platform }} - - steps: - - name: Check out code - uses: actions/checkout@v2 - - - name: Setup java ${{ matrix.java-version }} - uses: actions/setup-java@v1 - with: - java-version: ${{ matrix.java-version }} - - - name: Cache Maven packages - uses: actions/cache@v2 - with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-m2 - - - name: Set up Go ${{ matrix.go-version }} - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - - name: Run profiler ${{ matrix.event }} - id: run-profiler - run: | - ./data-plane/profiler/run.sh || exit 1 - ls -al - - - uses: actions/upload-artifact@v4 - with: - name: profile-${{ matrix.event }}-receiver.html - path: profile-${{ matrix.event }}-receiver.html - - - uses: actions/upload-artifact@v4 - with: - name: profile-${{ matrix.event }}-dispatcher.html - path: profile-${{ matrix.event }}-dispatcher.html - - - uses: actions/upload-artifact@v4 - if: always() - with: - name: logs-${{ matrix.event }} - path: /tmp/eventing-kafka-broker-logs/profiler/ diff --git a/.github/workflows/knative-security.yaml b/.github/workflows/knative-security.yaml deleted file mode 100644 index a6cd68137a..0000000000 --- a/.github/workflows/knative-security.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: 'Security' - -on: - push: - branches: [ 'main', 'release-*' ] - - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - analyze: - uses: knative/actions/.github/workflows/reusable-security.yaml@main diff --git a/.github/workflows/knative-stale.yaml b/.github/workflows/knative-stale.yaml deleted file mode 100644 index 2e25b9d99a..0000000000 --- a/.github/workflows/knative-stale.yaml +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots -name: 'Close stale' - -on: - schedule: - - cron: '0 1 * * *' - -jobs: - - stale: - uses: knative/actions/.github/workflows/reusable-stale.yaml@main diff --git a/.github/workflows/knative-style.yaml b/.github/workflows/knative-style.yaml deleted file mode 100644 index 55bb1537cc..0000000000 --- a/.github/workflows/knative-style.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2020 The Knative Authors. -# SPDX-License-Identifier: Apache-2.0 - -# This file is automagically synced here from github.com/knative-extensions/knobots - -name: Code Style - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - - style: - uses: knative/actions/.github/workflows/reusable-style.yaml@main diff --git a/.github/workflows/knative-verify.yaml b/.github/workflows/knative-verify.yaml deleted file mode 100644 index e1a28c4f50..0000000000 --- a/.github/workflows/knative-verify.yaml +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2020 The Knative Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This file is automagically synced here from github.com/knative-extensions/.github -# repo by knobots: https://github.com/knative-extensions/knobots and will be overwritten. - -name: Verify - -on: - pull_request: - branches: [ 'main', 'release-*' ] - -jobs: - verify: - uses: knative/actions/.github/workflows/reusable-verify-codegen.yaml@main diff --git a/.github/workflows/update-dependabot-pr.yaml b/.github/workflows/update-dependabot-pr.yaml deleted file mode 100644 index 8154837a74..0000000000 --- a/.github/workflows/update-dependabot-pr.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# This workflow runs after `Build Dependabot Maven PR` completes with a -# READ-WRITE GITHUB_TOKEN from the default branch and pushes updated license -# file changes back to the Dependabot PR branch. - -name: Update Dependabot Bundler PR -on: - workflow_run: - workflows: ["Build Dependabot Maven PR"] - types: - - completed - -jobs: - update: - runs-on: ubuntu-latest - if: > - ${{ github.event.workflow_run.event == 'push' && - github.event.workflow_run.conclusion == 'success' }} - steps: - - name: Download pr changes - uses: actions/github-script@v3.1.0 - with: - script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ - owner: context.repo.owner, - repo: context.repo.repo, - run_id: ${{github.event.workflow_run.id }}, - }); - var matchArtifact = artifacts.data.artifacts.filter((artifact) => { - return artifact.name == "dependabot-pr" - })[0]; - var download = await github.actions.downloadArtifact({ - owner: context.repo.owner, - repo: context.repo.repo, - artifact_id: matchArtifact.id, - archive_format: 'zip', - }); - var fs = require('fs'); - fs.writeFileSync('/home/runner/work/dependabot-pr.zip', Buffer.from(download.data)); - - run: mkdir -p /home/runner/work/dependabot-pr - # NOTE: actions/checkout will delete the contents of the current workspace - # so we unpack the changes outside the current workspace - - name: Unpack dependabot pr changes - run: unzip -o /home/runner/work/dependabot-pr.zip -d /home/runner/work/dependabot-pr - - name: Set BRANCH_REF env var - run: printf "BRANCH_REF=%q" "$(head -1 '/home/runner/work/dependabot-pr/BRANCH_REF')" >> $GITHUB_ENV - - name: Checkout the branch that triggered 'Build Dependabot Maven PR' - uses: actions/checkout@v2 - with: - ref: ${{ env.BRANCH_REF }} - - name: Configure git - run: | - git config --local user.email "automation@knative.team" - git config --local user.name "Knative Automation" - - name: Commit license changes - run: | - CHANGES_PATH=/home/runner/work/dependabot-pr/changes.patch - if [ -f "$CHANGES_PATH" ]; then - git am --keep-non-patch $CHANGES_PATH - else - echo "No changes where committed" - fi - - name: Push changes back to dependabot/maven branch - run: | - if [[ "$BRANCH_REF" =~ ^dependabot/maven* ]]; then - git push origin $BRANCH_REF - else - echo "Branch ref doesn't look like a dependabot/maven branch: $BRANCH_REF" - exit 1 - fi