Explorar o código

feat(ci): push some envs through artifact files in workflows

So that we could optimize away the need for the full git history.
Andrew Mayorov %!s(int64=2) %!d(string=hai) anos
pai
achega
08b2b36b87

+ 2 - 2
.github/workflows/_pr_entrypoint.yaml

@@ -139,6 +139,8 @@ jobs:
         run: |
           make ensure-rebar3
           make ${PROFILE}-compile test-compile
+          echo "PROFILE=${PROFILE}" | tee -a .env
+          echo "PKG_VSN=$(./pkg-vsn.sh ${PROFILE})" | tee -a .env
           zip -ryq -x@.github/workflows/.zipignore $PROFILE.zip .
       - uses: actions/upload-artifact@v3
         with:
@@ -217,8 +219,6 @@ jobs:
     with:
       runner_labels: ${{ needs.sanity-checks.outputs.runner_labels }}
       builder: ${{ needs.sanity-checks.outputs.builder }}
-      version-emqx: ${{ needs.sanity-checks.outputs.version-emqx }}
-      version-emqx-enterprise: ${{ needs.sanity-checks.outputs.version-emqx-enterprise }}
 
   check_deps_integrity:
     needs:

+ 2 - 0
.github/workflows/_push-entrypoint.yaml

@@ -149,6 +149,8 @@ jobs:
           ENABLE_COVER_COMPILE: 1
         run: |
           make $PROFILE
+          echo "PROFILE=${PROFILE}" | tee -a .env
+          echo "PKG_VSN=$(./pkg-vsn.sh ${PROFILE})" | tee -a .env
           zip -ryq -x@.github/workflows/.zipignore $PROFILE.zip .
       - uses: actions/upload-artifact@v3
         with:

+ 1 - 9
.github/workflows/run_conf_tests.yaml

@@ -13,20 +13,11 @@ on:
       builder:
         required: true
         type: string
-      version-emqx:
-        required: false
-        type: string
-      version-emqx-enterprise:
-        required: false
-        type: string
 
 jobs:
   run_conf_tests:
     runs-on: ${{ fromJSON(inputs.runner_labels) }}
     container: ${{ inputs.builder }}
-    env:
-      PROFILE: ${{ matrix.profile }}
-      PKG_VSN: ${{ startsWith(matrix.profile, 'emqx-enterprise') && inputs.version-emqx-enterprise || inputs.version-emqx }}
     strategy:
       fail-fast: false
       matrix:
@@ -41,6 +32,7 @@ jobs:
         run: |
           unzip -o -q ${{ matrix.profile }}.zip
           git config --global --add safe.directory "$GITHUB_WORKSPACE"
+      - run: cat .env | tee -a $GITHUB_ENV
       - run: make ${{ matrix.profile }}
       - run: ./scripts/test/check-example-configs.sh
       - run: ./scripts/conf-test/run.sh

+ 1 - 2
.github/workflows/static_checks.yaml

@@ -43,7 +43,6 @@ jobs:
           key: rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-${{ hashFiles('rebar.*', 'apps/*/rebar.*', 'lib-ee/*/rebar.*') }}
           restore-keys: |
             rebar3-dialyzer-plt-${{ matrix.profile }}-${{ matrix.otp }}-
+      - run: cat .env | tee -a $GITHUB_ENV
       - name: run static checks
-        env:
-          PROFILE: ${{ matrix.profile }}
         run: make static_checks