From 9f8e681baa70f01a39a8808b551c4eefcdcb6719 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 23 Feb 2023 17:11:50 -0800 Subject: [PATCH 1/3] Update 2.x workflow Signed-off-by: Simeon Widdis --- .github/workflows/auto-release.yml | 29 +++++++++++++++++++ .github/workflows/enforce-labels.yml | 13 +++++++++ ...-observability-test-and-build-workflow.yml | 11 ++++++- integrations/observability/NginX/test | 0 4 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/auto-release.yml create mode 100644 .github/workflows/enforce-labels.yml create mode 100644 integrations/observability/NginX/test diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml new file mode 100644 index 000000000..5bcfea751 --- /dev/null +++ b/.github/workflows/auto-release.yml @@ -0,0 +1,29 @@ +name: Releases + +on: + push: + tags: + - '*' + +jobs: + + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: GitHub App token + id: github_app_token + uses: tibdex/github-app-token@v1.5.0 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.APP_PRIVATE_KEY }} + installation_id: 22958780 + - name: Get tag + id: tag + uses: dawidd6/action-get-tag@v1 + - uses: actions/checkout@v2 + - uses: ncipollo/release-action@v1 + with: + github_token: ${{ steps.github_app_token.outputs.token }} + bodyFile: release-notes/opensearch-observability.release-notes-${{steps.tag.outputs.tag}}.md diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml new file mode 100644 index 000000000..71d923f66 --- /dev/null +++ b/.github/workflows/enforce-labels.yml @@ -0,0 +1,13 @@ +name: Enforce PR labels + +on: + pull_request: + types: [labeled, unlabeled, opened, edited, synchronize] +jobs: + enforce-label: + runs-on: ubuntu-latest + steps: + - uses: yogevbd/enforce-label-action@2.1.0 + with: + REQUIRED_LABELS_ANY: "breaking,feature,enhancement,bug,infrastructure,dependencies,documentation,maintenance,skip-changelog" + REQUIRED_LABELS_ANY_DESCRIPTION: "A release label is required: ['breaking', 'bug', 'dependencies', 'documentation', 'enhancement', 'feature', 'infrastructure', 'maintenance', 'skip-changelog']" diff --git a/.github/workflows/opensearch-observability-test-and-build-workflow.yml b/.github/workflows/opensearch-observability-test-and-build-workflow.yml index f21ee5b34..b7e664950 100644 --- a/.github/workflows/opensearch-observability-test-and-build-workflow.yml +++ b/.github/workflows/opensearch-observability-test-and-build-workflow.yml @@ -4,10 +4,19 @@ on: [pull_request, push] jobs: build: + env: + BUILD_ARGS: ${{ matrix.os_build_args }} strategy: + # Run all jobs + fail-fast: false matrix: java: [11, 17] os: [ubuntu-latest, windows-latest, macos-latest] + include: + - os: windows-latest + os_build_args: -x integTest -x jacocoTestReport + - os: macos-latest + os_build_args: -x integTest -x jacocoTestReport runs-on: ${{ matrix.os }} steps: @@ -27,7 +36,7 @@ jobs: - name: Build with Gradle run: | - ./gradlew build + ./gradlew build ${{ env.BUILD_ARGS }} - name: Upload coverage if: ${{ matrix.os == 'ubuntu-latest' }} diff --git a/integrations/observability/NginX/test b/integrations/observability/NginX/test new file mode 100644 index 000000000..e69de29bb From b6c60fbcbd1f26d4a56681d7c73ba9627b0df919 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 24 Feb 2023 13:02:07 -0800 Subject: [PATCH 2/3] Undo test-build changes from main Signed-off-by: Simeon Widdis --- ...ensearch-observability-test-and-build-workflow.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/opensearch-observability-test-and-build-workflow.yml b/.github/workflows/opensearch-observability-test-and-build-workflow.yml index b7e664950..f21ee5b34 100644 --- a/.github/workflows/opensearch-observability-test-and-build-workflow.yml +++ b/.github/workflows/opensearch-observability-test-and-build-workflow.yml @@ -4,19 +4,10 @@ on: [pull_request, push] jobs: build: - env: - BUILD_ARGS: ${{ matrix.os_build_args }} strategy: - # Run all jobs - fail-fast: false matrix: java: [11, 17] os: [ubuntu-latest, windows-latest, macos-latest] - include: - - os: windows-latest - os_build_args: -x integTest -x jacocoTestReport - - os: macos-latest - os_build_args: -x integTest -x jacocoTestReport runs-on: ${{ matrix.os }} steps: @@ -36,7 +27,7 @@ jobs: - name: Build with Gradle run: | - ./gradlew build ${{ env.BUILD_ARGS }} + ./gradlew build - name: Upload coverage if: ${{ matrix.os == 'ubuntu-latest' }} From d267b6507ab8aeebae257719e83b4fd0f1673a47 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Fri, 24 Feb 2023 13:07:25 -0800 Subject: [PATCH 3/3] Remove test Signed-off-by: Simeon Widdis --- integrations/observability/NginX/test | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 integrations/observability/NginX/test diff --git a/integrations/observability/NginX/test b/integrations/observability/NginX/test deleted file mode 100644 index e69de29bb..000000000