Skip to content

Commit

Permalink
updated to the latest contract versions
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingrzejszczak committed Nov 16, 2022
1 parent 22021e6 commit d6bd907
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 33 deletions.
18 changes: 0 additions & 18 deletions .circleci/config.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: ./scripts/runAcceptanceTests.sh
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
</properties>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
<spring-cloud-contract.version>3.1.3-SNAPSHOT</spring-cloud-contract.version>
</properties>

Expand Down
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,23 @@
<enabled>false</enabled>
</snapshots>
</repository>
<!-- FIXME: 4.0 -->
<repository>
<id>netflix-snapshots</id>
<name>Netflix Snapshots</name>
<url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>netflix-candidates</id>
<name>Netflix Candidates</name>
<url>https://artifactory-oss.prod.netflix.net/artifactory/maven-oss-candidates</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand Down
2 changes: 0 additions & 2 deletions stub_runner/cloud_cli.sh

This file was deleted.

8 changes: 4 additions & 4 deletions stub_runner/docker.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env bash

# Provide the Spring Cloud Contract Docker version
SC_CONTRACT_DOCKER_VERSION="3.1.0-SNAPSHOT"
SC_CONTRACT_DOCKER_VERSION="4.0.0-SNAPSHOT"

# Spring Cloud Contract Stub Runner properties
STUBRUNNER_PORT="8083"
STUBRUNNER_PORT="8750"

# Stub coordinates 'groupId:artifactId:version:classifier:port'
STUBRUNNER_IDS="com.example:the-legacy-app-stubs-with-proxy:+:stubs:8765"
Expand All @@ -14,13 +14,13 @@ STUBRUNNER_IDS="com.example:the-legacy-app-stubs-with-proxy:+:stubs:8765"
#STUBRUNNER_STUBS_MODE="REMOTE"

# We pass a volume with our local .m2 to fetch local stubs
# "${HOME}/.m2/:/root/.m2:ro"
# "${HOME}/.m2/:/home/scc/.m2:rw"

# Run the docker with Stub Runner Boot
docker run --rm \
-e "STUBRUNNER_IDS=${STUBRUNNER_IDS}" \
-e "STUBRUNNER_STUBS_MODE=LOCAL" \
-p "${STUBRUNNER_PORT}:${STUBRUNNER_PORT}" \
-p "8765:8765" \
-v "${HOME}/.m2/:/root/.m2:ro" \
-v "${HOME}/.m2/:/home/scc/.m2:rw" \
springcloud/spring-cloud-contract-stub-runner:"${SC_CONTRACT_DOCKER_VERSION}"
4 changes: 2 additions & 2 deletions stub_runner/java_jar.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
export SC_CONTRACT_VERSION="${SC_CONTRACT_VERSION:-3.1.0-SNAPSHOT}"
export SC_CONTRACT_VERSION="${SC_CONTRACT_VERSION:-4.0.0-SNAPSHOT}"
mkdir -p target
wget -O target/stub-runner.jar "https://search.maven.org/remotecontent?filepath=org/springframework/cloud/spring-cloud-contract-stub-runner-boot/${SC_CONTRACT_VERSION}/spring-cloud-contract-stub-runner-boot-${SC_CONTRACT_VERSION}.jar"
java -jar target/stub-runner.jar --stubrunner.stubsMode="LOCAL" --stubrunner.ids="com.example:the-legacy-app-stubs-with-proxy:+:stubs:8765"
java -jar target/stub-runner.jar --stubrunner.stubsMode="LOCAL" --stubrunner.ids="com.example:the-legacy-app-stubs-with-proxy:+:stubs:8765"
4 changes: 0 additions & 4 deletions stub_runner/stubrunner.yml

This file was deleted.

2 changes: 1 addition & 1 deletion stubs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<java.version>17</java.version>
<!-- We don't want to run the generated tests -->
<!--<skipTests>true</skipTests>-->
<spring-cloud-contract.version>3.1.3-SNAPSHOT</spring-cloud-contract.version>
Expand Down

0 comments on commit d6bd907

Please sign in to comment.