Skip to content

Commit

Permalink
ci-shared-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
yacekmm committed Apr 21, 2024
1 parent 45ae132 commit 60a698f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
19 changes: 18 additions & 1 deletion .github/workflows/ci-pricing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,21 @@ jobs:
- name: Test
run: >-
cd services/Pricing &&
./gradlew test
./gradlew
-Ppact.verifier.publishResults=true
-Ppact.provider.version=${{ github.sha }}
-Ppact.provider.branchName=${{ github.ref_name }}
-Ppact.provider.tag=${{ github.ref_name }}
-Ppact.rootDir=build/pacts
test
- name: Publish Pricing Pact
run: >-
docker run --rm \
-w ${PWD} \
-v ${PWD}:${PWD} \
-e PACT_BROKER_BASE_URL=$PACT_BROKER_BASE_URL \
-e PACT_BROKER_TOKEN=$PACT_BROKER_TOKEN \
pactfoundation/pact-cli:1.1.0.0 \
broker publish ${PWD}/services/Pricing/build/pacts --consumer-app-version=${{ github.sha }} --branch=${{github.ref_name}} --tag-with-git-branch
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public class Pricing_providesApiContract_pactApiTest extends FrameworkTestBase {
public void setupTestTarget(PactVerificationContext context) {
super.beforeEach();
context.setTarget(new HttpTestTarget("localhost", port));
System.setProperty("pact.verifier.publishResults", "true"); // Should only be enabled in CI.
System.setProperty("pact.provider.version", gitProperties.getShortCommitId());
System.setProperty("pact.provider.tag", gitProperties.getBranch());
System.setProperty("pact.rootDir", "build/pacts");
// System.setProperty("pact.verifier.publishResults", "true"); // Should only be enabled in CI.
// System.setProperty("pact.provider.version", gitProperties.getShortCommitId());
// System.setProperty("pact.provider.tag", gitProperties.getBranch());
// System.setProperty("pact.rootDir", "build/pacts");
}

@TestTemplate
Expand Down

0 comments on commit 60a698f

Please sign in to comment.