okumin commented on code in PR #6127:
URL: https://github.com/apache/hive/pull/6127#discussion_r2428167506
##########
.github/workflows/docker-GA-images.yml:
##########
@@ -113,29 +48,40 @@ jobs:
with:
java-version: 21
- - name: Hive version
- run: echo "HIVE_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=project.version -DforceStdout)" >> $GITHUB_ENV
-
- - name: Tag
- run: echo "tag=${{ env.HIVE_VERSION }}" | awk '{print tolower($0)}' >>
$GITHUB_ENV
-
- - name: Hadoop version
- run: echo "HADOOP_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=hadoop.version -DforceStdout)" >> $GITHUB_ENV
-
- - name: Tez version
- run: echo "TEZ_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=tez.version -DforceStdout)" >> $GITHUB_ENV
+ - name: Prepare environment variables for Workflow Dispatch
+ if: github.event_name == 'workflow_dispatch'
+ run: |
+ echo "HIVE_VERSION=${{ github.event.inputs.hiveVersion }}" >>
$GITHUB_ENV
+ echo "HADOOP_VERSION=${{ github.event.inputs.hadoopVersion }}" >>
$GITHUB_ENV
+ echo "TEZ_VERSION=${{ github.event.inputs.tezVersion }}" >>
$GITHUB_ENV
+ echo "BUILD_ENV=archive" >> $GITHUB_ENV
+
+ - name: Prepare environment variables for Release
+ if: github.event_name == 'create' && github.event.ref_type == 'tag' &&
startsWith(github.event.ref, 'rel/')
+ run: |
+ echo "HIVE_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=project.version -DforceStdout)" >> $GITHUB_ENV
+ echo "HADOOP_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=hadoop.version -DforceStdout)" >> $GITHUB_ENV
+ echo "TEZ_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=tez.version -DforceStdout)" >> $GITHUB_ENV
+ echo "BUILD_ENV=buildarchive" >> $GITHUB_ENV
+
+ - name: Prepare common environment variables
+ run: |
+ echo "namespace=${{ vars.DOCKER_NAMESPACE || 'apache' }}" >>
$GITHUB_ENV
+ echo "tag=$HIVE_VERSION" | awk '{print tolower($0)}' >> $GITHUB_ENV
- name: Build Hive project
- run: mvn clean package -DskipTests -Pdist
-
- - name: Check for hive tar.gz
- run: ls ./packaging/target/
-
- - name: Copy to docker directory
- run: cp ./packaging/target/apache-hive-*-bin.tar.gz
./packaging/src/docker/
-
- - name: Confirm the copy of hive tar.gz
- run: ls ./packaging/src/docker/
+ if: github.event_name == 'create' && github.event.ref_type == 'tag' &&
startsWith(github.event.ref, 'rel/')
+ run: |
+ mvn clean package -DskipTests -Pdist
+ ls ./packaging/target/
+ mv ./packaging/target/apache-hive-*-bin.tar.gz
./packaging/src/docker/
+ rm -rf ./packaging/target
Review Comment:
Just because I encountered a disk full. We might have a smarter way though
this is enough.
https://github.com/okumin/hive/actions/runs/18424087084
##########
.github/workflows/docker-GA-images.yml:
##########
@@ -113,29 +48,40 @@ jobs:
with:
java-version: 21
- - name: Hive version
- run: echo "HIVE_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=project.version -DforceStdout)" >> $GITHUB_ENV
-
- - name: Tag
- run: echo "tag=${{ env.HIVE_VERSION }}" | awk '{print tolower($0)}' >>
$GITHUB_ENV
-
- - name: Hadoop version
- run: echo "HADOOP_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=hadoop.version -DforceStdout)" >> $GITHUB_ENV
-
- - name: Tez version
- run: echo "TEZ_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=tez.version -DforceStdout)" >> $GITHUB_ENV
+ - name: Prepare environment variables for Workflow Dispatch
+ if: github.event_name == 'workflow_dispatch'
+ run: |
+ echo "HIVE_VERSION=${{ github.event.inputs.hiveVersion }}" >>
$GITHUB_ENV
+ echo "HADOOP_VERSION=${{ github.event.inputs.hadoopVersion }}" >>
$GITHUB_ENV
+ echo "TEZ_VERSION=${{ github.event.inputs.tezVersion }}" >>
$GITHUB_ENV
+ echo "BUILD_ENV=archive" >> $GITHUB_ENV
+
+ - name: Prepare environment variables for Release
+ if: github.event_name == 'create' && github.event.ref_type == 'tag' &&
startsWith(github.event.ref, 'rel/')
+ run: |
+ echo "HIVE_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=project.version -DforceStdout)" >> $GITHUB_ENV
+ echo "HADOOP_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=hadoop.version -DforceStdout)" >> $GITHUB_ENV
+ echo "TEZ_VERSION=$(mvn -f "pom.xml" -q help:evaluate
-Dexpression=tez.version -DforceStdout)" >> $GITHUB_ENV
+ echo "BUILD_ENV=buildarchive" >> $GITHUB_ENV
+
+ - name: Prepare common environment variables
+ run: |
+ echo "namespace=${{ vars.DOCKER_NAMESPACE || 'apache' }}" >>
$GITHUB_ENV
Review Comment:
I parameterized this part so that a contributor can test the action on their
fork.
##########
.github/workflows/docker-GA-images.yml:
##########
@@ -35,74 +35,9 @@ on:
required: true
default: '0.10.2'
-env:
- DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}
Review Comment:
This is probably not used.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]