snuyanzin commented on code in PR #28831:
URL: https://github.com/apache/flink/pull/28831#discussion_r3786703947
##########
.github/workflows/nightly.yml:
##########
@@ -92,6 +135,138 @@ jobs:
- name: "Build docs and check for broken links"
run: ./tools/ci/docs.sh
+ 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
+ steps:
+ - name: "Flink Checkout"
+ uses: actions/checkout@v7
+ with:
+ persist-credentials: false
+ - name: "Initialize job"
+ uses: "./.github/actions/job_init"
+ with:
+ # In order for other repository's(e.g. flink-docker,
flink-benchmarks) CI to
+ # cover all supported jdks, keep it to the minimum supported version.
+ # Upgrade this only when we drop support for this jdk version.
+ 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: /root/flink/tools/releasing/release
+ 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: |
+ if [[ -z "${ARTIFACTS_S3_BUCKET}" || -z "${AWS_ACCESS_KEY_ID}" || -z
"${AWS_SECRET_ACCESS_KEY}" ]]; then
+ echo "::warning::Skipping S3 upload:
ARTIFACTS_S3_BUCKET/ARTIFACTS_AWS_ACCESS_KEY_ID/ARTIFACTS_AWS_SECRET_ACCESS_KEY
secrets are not set up yet"
+ exit 0
+ fi
+ source ./tools/ci/deploy_nightly_to_s3.sh
+ # branches in the shadow phase upload to a GHA-specific prefix, so
that
+ # they don't overwrite the builds AZP is still uploading
+ upload_to_s3 ./tools/releasing/release "${S3_PREFIX}"
+ env:
+ S3_PREFIX: ${{ contains(fromJSON(env.SHADOW_SNAPSHOT_BRANCHES),
github.ref_name) && 'gha-trial/' || '' }}
+ ARTIFACTS_S3_BUCKET: ${{ secrets.ARTIFACTS_S3_BUCKET }}
+ AWS_ACCESS_KEY_ID: ${{ secrets.ARTIFACTS_AWS_ACCESS_KEY_ID }}
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.ARTIFACTS_AWS_SECRET_ACCESS_KEY }}
+
+ snapshot_maven:
+ name: "Snapshot Maven Deploy"
+ runs-on: ubuntu-24.04
+ timeout-minutes: 240
+ container:
+ image: apache/flink-ci-docker:java_8_11_17_21_25_maven_386_jammy
Review Comment:
not related to this PR
however just in general: may be we need to introduce constants for
default java version, minimum java version, image, os to run, something
else, to avoid it copying everywhere
--
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]