From 656b932d10697679cd4f7f98b053f5f3e4697cf4 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 20 Jun 2023 10:23:11 +0200 Subject: [PATCH 1/5] Update Rakefile --- Rakefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Rakefile b/Rakefile index e950b6f7edf99..91df7bba82a35 100644 --- a/Rakefile +++ b/Rakefile @@ -360,6 +360,7 @@ def read_m2_user_pass pass = nil if ENV['SEL_M2_USER'] && ENV['SEL_M2_PASS'] puts 'Fetching m2 user and pass from environment variables.' + puts ENV['SEL_M2_USER'] user = ENV['SEL_M2_USER'] pass = ENV['SEL_M2_PASS'] return [user, pass] From 9dd1e4e6584f3e83feace9e8fdc16c8312cb2615 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 20 Jun 2023 10:50:16 +0200 Subject: [PATCH 2/5] [ci] Exporting M2 env vars --- .github/workflows/nightly.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 969d5a5337a31..333a243808387 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -10,13 +10,14 @@ on: type: string default: '' language: - description: Configured artefacts for the language will be built and pushed + description: Language artefacts required: true type: choice default: "ruby" options: - java - ruby + - grid jobs: ruby: @@ -44,10 +45,13 @@ jobs: with: name: Release cache-key: java-nightly - run: ./go publish-maven-snapshot + run: | + export SEL_M2_USER="$SEL_M2_USER" + export SEL_M2_PASS="$SEL_M2_PASS" + ./go publish-maven-snapshot grid: - if: inputs.language == 'java' || github.event_name == 'schedule' + if: inputs.language == 'grid' || github.event_name == 'schedule' name: Grid uses: ./.github/workflows/bazel.yml with: From 6e353ed8303eaac0978fe076ed463da373a63cc3 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 20 Jun 2023 12:18:44 +0200 Subject: [PATCH 3/5] [ci] Using secrets keyword --- .github/workflows/bazel.yml | 2 -- .github/workflows/nightly.yml | 5 +++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index f17fa96726faf..fee9fea375bec 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -54,8 +54,6 @@ jobs: runs-on: ${{ inputs.os == 'windows' && 'windows-2019' || format('{0}-latest', inputs.os) }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SEL_M2_USER: ${{ secrets.SEL_M2_USER }} - SEL_M2_PASS: ${{ secrets.SEL_M2_PASS }} steps: - name: Checkout source tree uses: actions/checkout@v3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 333a243808387..47f119af3726e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -46,9 +46,10 @@ jobs: name: Release cache-key: java-nightly run: | - export SEL_M2_USER="$SEL_M2_USER" - export SEL_M2_PASS="$SEL_M2_PASS" ./go publish-maven-snapshot + secrets: + SEL_M2_USER: ${{ secrets.SEL_M2_USER }} + SEL_M2_PASS: ${{ secrets.SEL_M2_PASS }} grid: if: inputs.language == 'grid' || github.event_name == 'schedule' From 2564fee6964706681e9ffeecf77c76d42ab94893 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 20 Jun 2023 12:24:08 +0200 Subject: [PATCH 4/5] [ci] Now using inherit --- .github/workflows/bazel.yml | 2 ++ .github/workflows/nightly.yml | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.yml index fee9fea375bec..f17fa96726faf 100644 --- a/.github/workflows/bazel.yml +++ b/.github/workflows/bazel.yml @@ -54,6 +54,8 @@ jobs: runs-on: ${{ inputs.os == 'windows' && 'windows-2019' || format('{0}-latest', inputs.os) }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SEL_M2_USER: ${{ secrets.SEL_M2_USER }} + SEL_M2_PASS: ${{ secrets.SEL_M2_PASS }} steps: - name: Checkout source tree uses: actions/checkout@v3 diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 47f119af3726e..c656543e13eda 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,9 +47,7 @@ jobs: cache-key: java-nightly run: | ./go publish-maven-snapshot - secrets: - SEL_M2_USER: ${{ secrets.SEL_M2_USER }} - SEL_M2_PASS: ${{ secrets.SEL_M2_PASS }} + secrets: inherit grid: if: inputs.language == 'grid' || github.event_name == 'schedule' From 572a4f0bd12c3d5aab90f02903fc07d72a367d82 Mon Sep 17 00:00:00 2001 From: Diego Molina Date: Tue, 20 Jun 2023 12:41:34 +0200 Subject: [PATCH 5/5] [ci] Removing debug line --- Rakefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Rakefile b/Rakefile index 91df7bba82a35..e950b6f7edf99 100644 --- a/Rakefile +++ b/Rakefile @@ -360,7 +360,6 @@ def read_m2_user_pass pass = nil if ENV['SEL_M2_USER'] && ENV['SEL_M2_PASS'] puts 'Fetching m2 user and pass from environment variables.' - puts ENV['SEL_M2_USER'] user = ENV['SEL_M2_USER'] pass = ENV['SEL_M2_PASS'] return [user, pass]