-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29463: Publish nightly Docker images #6387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,6 +18,8 @@ name: Build and Publish docker images for Hive GA | |
|
|
||
| on: | ||
| create: | ||
| schedule: | ||
| - cron: '17 3 * * *' | ||
| workflow_dispatch: | ||
| inputs: | ||
| hiveVersion: | ||
|
|
@@ -40,7 +42,7 @@ env: | |
|
|
||
| jobs: | ||
| buildAndPush: | ||
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'create' && github.event.ref_type == 'tag' && startsWith(github.event.ref, 'rel/') | ||
| if: github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' || (github.event_name == 'create' && github.event.ref_type == 'tag' && startsWith(github.event.ref, 'rel/')) | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Free disk space | ||
|
|
@@ -76,8 +78,8 @@ jobs: | |
| echo "TEZ_VERSION=${{ github.event.inputs.tezVersion }}" >> $GITHUB_ENV | ||
| echo "BUILD_ENV=release" >> $GITHUB_ENV | ||
|
|
||
| - name: Prepare environment variables for Release | ||
| if: github.event_name == 'create' && github.event.ref_type == 'tag' && startsWith(github.event.ref, 'rel/') | ||
| - name: Prepare environment variables from repository | ||
| if: github.event_name != 'workflow_dispatch' | ||
| 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 | ||
|
|
@@ -87,10 +89,21 @@ jobs: | |
| - name: Prepare common environment variables | ||
| run: | | ||
| echo "namespace=${{ vars.DOCKER_NAMESPACE || 'apache' }}" >> $GITHUB_ENV | ||
| echo "tag=$HIVE_VERSION" | awk '{print tolower($0)}' >> $GITHUB_ENV | ||
| echo "tag=$HIVE_VERSION" >> $GITHUB_ENV | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe we don't have a case where we have to keep the Also, this PR currently assumes we want to replace |
||
|
|
||
| - name: Validate nightly tag suffix | ||
| if: github.event_name == 'schedule' | ||
| run: | | ||
| case "$tag" in | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not simplify with if |
||
| *-SNAPSHOT) ;; | ||
| *) | ||
| echo "Nightly image tag must end with -SNAPSHOT, got: $tag" | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| - name: Build Hive project | ||
| if: github.event_name == 'create' && github.event.ref_type == 'tag' && startsWith(github.event.ref, 'rel/') | ||
| if: github.event_name != 'workflow_dispatch' | ||
| run: | | ||
| mvn --batch-mode clean package -DskipTests -Pdist | ||
| ls ./packaging/target/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,7 @@ spec: | |
| - | | ||
| apt-get update | ||
| apt-get install -y --no-install-recommends ca-certificates wget | ||
| wget https://repo1.maven.org/maven2/software/amazon/awssdk/bundle/2.26.19/bundle-2.26.19.jar -P /tmp/ext-jars | ||
| wget https://repo1.maven.org/maven2/software/amazon/awssdk/bundle/2.41.3/bundle-2.41.3.jar -P /tmp/ext-jars | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess [this patch] brought a new library. Should we rather exclude
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AWS SDK v2 bundle does NOT include
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| volumeMounts: | ||
| - name: ext-jars | ||
| mountPath: /tmp/ext-jars | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose an odd time, following the guidance.