dalelane commented on code in PR #28831:
URL: https://github.com/apache/flink/pull/28831#discussion_r3711062419


##########
.github/workflows/nightly.yml:
##########
@@ -77,6 +109,163 @@ jobs:
       s3_access_key: ${{ secrets.IT_CASE_S3_ACCESS_KEY }}
       s3_secret_key: ${{ secrets.IT_CASE_S3_SECRET_KEY }}
 
+  snapshot_binary:
+    name: "Snapshot Binary Release"
+    runs-on: ubuntu-24.04
+    container:
+      image: apache/flink-ci-docker:java_8_11_17_21_25_maven_386_jammy
+      options: --init --privileged
+    env:
+      MOUNTED_WORKING_DIR: /__w/flink/flink
+      CONTAINER_LOCAL_WORKING_DIR: /root/flink
+      MAVEN_REPO_FOLDER: /root/.m2/repository
+      MAVEN_ARGS: -Dmaven.repo.local=/root/.m2/repository
+      RELEASE_DIR: /root/flink/tools/releasing/release
+    steps:
+      - name: "Flink Checkout"
+        uses: actions/checkout@v7
+        with:
+          persist-credentials: false
+      - name: "Initialize job"
+        uses: "./.github/actions/job_init"
+        with:
+          jdk_version: 11
+          maven_repo_folder: ${{ env.MAVEN_REPO_FOLDER }}
+          source_directory: ${{ env.MOUNTED_WORKING_DIR }}
+          target_directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }}
+      - name: "Build snapshot binary release"
+        working-directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }}
+        shell: bash
+        run: |
+          # errexit needs to be disabled explicitly here because 
maven-utils.sh handles the error if a mirror is not available
+          set +o errexit
+          source ./tools/ci/maven-utils.sh
+          set -o errexit
+          run_mvn -version
+          export MVN="run_mvn"
+          export RELEASE_VERSION=$(MVN_RUN_VERBOSE=false run_mvn help:evaluate 
-Dexpression=project.version -q -DforceStdout)
+          echo "Determined RELEASE_VERSION as '$RELEASE_VERSION'"
+          cd tools
+          MVN_RUN_VERBOSE=true SKIP_GPG=true SKIP_PYTHON_WHEELS=true 
./releasing/create_binary_release.sh
+          echo "Created files:"
+          find ./releasing/release
+          cd ..
+      # Uploaded for every branch so that the binaries can be inspected and
+      # compared against the ones the Azure pipeline produces.
+      - name: "Upload snapshot binary release as build artifact"
+        uses: actions/upload-artifact@v7
+        with:
+          name: snapshot-binary-release-${{ github.run_number }}
+          path: ${{ env.RELEASE_DIR }}
+          if-no-files-found: error
+          retention-days: 5
+      - name: "Upload artifacts to S3"
+        if: ${{ contains(fromJSON(env.PUBLISH_SNAPSHOT_BRANCHES), 
github.ref_name) }}
+        working-directory: ${{ env.CONTAINER_LOCAL_WORKING_DIR }}
+        shell: bash
+        run: |
+          source ./tools/ci/deploy_nightly_to_s3.sh

Review Comment:
   addressed in 336e9644a367763a98c74e9807ab3a3708c77647



##########
.github/workflows/nightly.yml:
##########
@@ -27,6 +27,38 @@ concurrency:
 
 permissions: read-all
 
+env:
+  # Branches whose nightly snapshots are published by this pipeline (binaries
+  # to S3, jars to repository.apache.org). Branches not listed here will build
+  # snapshots, and keep them as build artifacts of the workflow run only.
+  # This allows the migration from Azure Pipelines to GitHub Actions to happen
+  # one release branch at a time, without both pipelines publishing over each
+  # other: add a branch here once its snapshots are no longer published by
+  # the Azure pipeline, or while it is in the shadow phase described under
+  # SHADOW_SNAPSHOT_BRANCHES below.
+  #
+  # Adding a branch here needs a matching change to that branch's copy of
+  # tools/azure-pipelines/build-apache-repo.yml, ideally in the same commit.
+  # Remove the "cron_snapshot_deployment" build-nightly-dist.yml template from
+  # the "cron_build" stage in tools/azure-pipelines/build-apache-repo.yml
+  # so that the Azure pipeline stops publishing snapshots for the branch.
+  # Removing that template will stop snapshots being published by AZP
+  PUBLISH_SNAPSHOT_BRANCHES: '["master"]'

Review Comment:
   addressed in 336e9644a367763a98c74e9807ab3a3708c77647



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to