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

Overriding ability for the mvn repository url to download jar from #18

Open
Macadoshis opened this issue Apr 13, 2022 · 0 comments
Open

Comments

@Macadoshis
Copy link

Please make the mvn target repository overridable, particularly for GH Enterprise private instances whose most of them have their Internet access blocked or ssl access enforced by restrictive certificates, and thus benefit from their intranet nexus instance (less download time and security compliance).

javawrapperversion=$(curl https://repo1.maven.org/maven2/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/maven-metadata.xml | grep latest | cut -d '>' -f 2 | cut -d '<' -f 1)
#echo "javawrapperversion: $javawrapperversion"
curl -sS -o VeracodeJavaAPI.jar "https://repo1.maven.org/maven2/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/$javawrapperversion/vosp-api-wrappers-java-$javawrapperversion.jar"

Based on other jar-downloading tools like the maven-wrapper, please expose the url as an overridable parameter or environment variable, and only fallback to https://repo1.maven.org/maven2 if not set.

Something like :

- name: Veracode Upload And Scan
  uses: veracode/veracode-uploadandscan-action
  env:
    MVNW_REPOURL: "https://nexus.mycompany.com/repository/maven-central"
# entrypoint.sh
if [ ! -n "$MVNW_REPOURL" ]; then
MVNW_REPOURL="https://repo1.maven.apache.org/maven2"
fi

javawrapperversion=$(curl $MVNW_REPOURL/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/maven-metadata.xml | grep latest |  cut -d '>' -f 2 | cut -d '<' -f 1)

#echo "javawrapperversion: $javawrapperversion"

curl -sS -o VeracodeJavaAPI.jar "$MVNW_REPOURL/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/$javawrapperversion/vosp-api-wrappers-java-$javawrapperversion.jar"
Macadoshis added a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Apr 20, 2022
Macadoshis added a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Apr 20, 2022
Macadoshis added a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Apr 20, 2022
Macadoshis added a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Jun 20, 2022
Macadoshis added a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Jun 20, 2022
Macadoshis pushed a commit to Macadoshis/veracode-uploadandscan-action that referenced this issue Jan 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant