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

KH-520: Fix failing builds on PR from forked repositories #365

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,24 @@ on:
types: [published]

jobs:
validate-pr:
if: ${{ github.event_name == 'pull_request' }}
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
with:
java-version: "8"
maven-phase: "install"
maven-args: "-P validator -DskipTests"
secrets: # We don't the secrets here. we make them not required.
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }}

validate:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main
with:
java-version: "8"
maven-phase: "install"
maven-args: "-P prod" # Remove -Pvalidator to temporarily bypass validation
Copy link
Member

Choose a reason for hiding this comment

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

Could you still keep the comment which indicates that the validation is disabled?

maven-args: "-P prod -DskipTests"
corneliouzbett marked this conversation as resolved.
Show resolved Hide resolved
use-secrets: true
secrets:
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }}
Expand All @@ -26,7 +38,7 @@ jobs:
uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-publish.yml@main
with:
java-version: "8"
maven-args: "-P prod -DskipTests=true"
maven-args: "-P prod -DskipTests"
secrets:
NEXUS_USERNAME: ${{ secrets.MEKOM_NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.MEKOM_NEXUS_PASSWORD }}
13 changes: 3 additions & 10 deletions base/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,9 @@
See Slack conversation:
https://mekomsolutions.slack.com/archives/G421UNF5L/p1715787009629219?thread_ts=1715774419.673979&cid=G421UNF5L
-->
<!-- <profiles>
<profiles>
<profile>
<id>validator</id>
<activation>
<jdk>1.8</jdk>
<property>
<name>env.CI</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -300,5 +293,5 @@
</plugins>
</build>
</profile>
</profiles> -->
</project>
</profiles>
</project>
Loading