Skip to content
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

ORC-1006: Build and test in github workflow using the maven version specified in pom #914

Closed
wants to merge 2 commits into from

Conversation

guiyanakuang
Copy link
Member

@guiyanakuang guiyanakuang commented Sep 20, 2021

What changes were proposed in this pull request?

Two steps have been added to the build job to set the maven version specified in pom.

Why are the changes needed?

  1. Make the github workflow consistent with the build environment expressed in the readme.

  2. Provides a capability: github workflow facilitates switching between maven versions and even supports build testing of multiple maven versions.

  3. This can be used as a workaround for the warning indicated in ORC-894.

How was this patch tested?

Pass the CIs.

@github-actions github-actions bot added the INFRA label Sep 20, 2021
- name: Set maven version to env
run: echo "maven_version=$(grep "<maven.version>" "./java/pom.xml" | head -n1 | awk -F '[<>]' '{print $3}')" >> $GITHUB_ENV
- name: Set up Maven ${{ env.maven_version }}
uses: stCarolas/setup-maven@v4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @guiyanakuang . Is it approved by Apache Software Foundation?
AFS doesn't allow the un-approved GitHub Actions.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I hadn't noticed that, just a moment while I make sure.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dongjoon-hyun I read this link: https://cwiki.apache.org/confluence/display/BUILDS/GitHub+Actions+status.
Learn about security. This pr hands over the installation of maven to a third party, which does pose a significant security risk.

NEVER use 3rd-party actions directly in your worfklows - use the "submodule" pattern. Example PR Tobiasz Kędzierski opened in SuperSet showing how this could be done.

Although I did not find an ASF Approved Action list, I will close this pr first and open it again if I find a safe and approved solution.

@dongjoon-hyun
Copy link
Member

Thank you for closing, @guiyanakuang .
Yes, for the unapproved ones, it may work on PR, but it's banned when we land it to the Apache branches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants