3131 APACHE_CONTENTS_REPO :
3232 description : ' Apache Staging Repository URL (e.g., https://repository.apache.org/content/repositories/orgapachebeam-1234)'
3333 required : true
34- GCP_PROJECT_ID :
35- description : ' GCP Project ID for running the test'
36- required : true
37- default : ' apache-beam-testing' # Default project used in other validations
38- GCS_BUCKET :
39- description : ' GCS Bucket for temporary files (e.g., gs://rc-validation-migration-tests)'
40- required : true
41- default : ' gs://rc-validation-migration-tests'
4234
4335# This allows a subsequently queued workflow run to interrupt previous runs
4436concurrency :
6759 GRADLE_ENTERPRISE_CACHE_PASSWORD : ${{ secrets.GE_CACHE_PASSWORD }}
6860 # Define unique names for resources based on run ID to avoid collisions
6961 RUN_ID_SUFFIX : ${{ github.run_id }}_${{ github.run_attempt }}
70- BQ_DATASET : mobilegaming_java_rc_${{ env.RUN_ID_SUFFIX }}
71- PUBSUB_TOPIC : mobilegaming_java_rc_${{ env.RUN_ID_SUFFIX }}
72- # Use inputs for GCP details
73- GCP_PROJECT_ID : ${{ github.event.inputs.GCP_PROJECT_ID }}
74- GCS_BUCKET_NAME : ${{ github.event.inputs.GCS_BUCKET }} # Extract bucket name if gs:// prefix is included
62+ BQ_DATASET : mobilegaming_java_rc_${{ github.run_id }}_${{ github.run_attempt }}
63+ PUBSUB_TOPIC : mobilegaming_java_rc_${{ github.run_id }}_${{ github.run_attempt }}
64+ # Set GCP Project ID and Bucket as constants
65+ GCP_PROJECT_ID : ' apache-beam-testing '
66+ GCS_BUCKET_NAME : ' gs://rc-validation-migration-tests '
7567 APACHE_REPO_URL : ${{ github.event.inputs.APACHE_CONTENTS_REPO }}
7668 RELEASE_VERSION : ${{ github.event.inputs.RELEASE_VER }}
7769 RC_TAG : " v${{github.event.inputs.RELEASE_VER}}-RC${{github.event.inputs.RC_NUM}}"
7870
7971jobs :
8072 run_java_mobile_gaming_rc_validation :
81- name : Run Java Mobile Gaming RC Validation (${{ env.RELEASE_VERSION }} RC${{ github.event.inputs.RC_NUM }})
73+ name : Run Java Mobile Gaming RC Validation (${{ github.event.inputs.RELEASE_VER }} RC${{ github.event.inputs.RC_NUM }})
8274 runs-on : [self-hosted, ubuntu-20.04, main]
8375 timeout-minutes : 120 # Adjust timeout as needed
8476 steps :
77+ - name : Extract GCS Bucket Name
78+ run : echo "GCS_BUCKET_NAME=$(echo ${{ github.event.inputs.GCS_BUCKET }} | sed 's/^gs:\/\///')" >> $GITHUB_ENV
79+
8580 - name : Checkout code at RC tag
8681 uses : actions/checkout@v4
8782 with :
@@ -104,20 +99,19 @@ jobs:
10499 echo "Creating PubSub topic: ${{ env.PUBSUB_TOPIC }} in project ${{ env.GCP_PROJECT_ID }}"
105100 gcloud pubsub topics create --project=${{ env.GCP_PROJECT_ID }} ${{ env.PUBSUB_TOPIC }}
106101 shell : bash
107-
102+
108103 # Run the Mobile Gaming example test using Gradle
109104 - name : Run MobileGaming Java Dataflow Test
110105 uses : ./.github/actions/gradle-command-self-hosted-action
111106 with :
112- gradle-command : >
113- :runners:google-cloud-dataflow-java:runMobileGamingJavaDataflow
114- -Prepourl=${{ env.APACHE_REPO_URL }}
115- -Pver=${{ env.RELEASE_VERSION }}
116- -PgcpProject=${{ env.GCP_PROJECT_ID }}
117- -PgcsBucket=${{ env.GCS_BUCKET_NAME }}
118- -PbqDataset=${{ env.BQ_DATASET }}
119- -PpubsubTopic=${{ env.PUBSUB_TOPIC }}
120- max-workers : 12 # Adjust as needed
107+ gradle-command : :runners:google-cloud-dataflow-java:runMobileGamingJavaDataflow
108+ arguments : |
109+ -Prepourl=${{ env.APACHE_REPO_URL }} \
110+ -Pver=${{ env.RELEASE_VERSION }} \
111+ -PgcpProject=${{ env.GCP_PROJECT_ID }} \
112+ -PgcsBucket=${{ env.GCS_BUCKET_NAME }} \
113+ -PbqDataset=${{ env.BQ_DATASET }} \
114+ -PpubsubTopic=${{ env.PUBSUB_TOPIC }} \
121115
122116 # Cleanup GCP resources (always run)
123117 - name : Cleanup BigQuery Dataset
0 commit comments