Skip to content

Commit

Permalink
[ci] Execute maven and verify with no-snapshot-updates (#6415)
Browse files Browse the repository at this point in the history
  • Loading branch information
jimschubert authored May 25, 2020
1 parent 8bbce33 commit fb57b60
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 18 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ script:
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh
# run integration tests defined in maven pom.xml
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet.
- mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test maven plugin
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# test gradle plugin
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk)
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate)
Expand Down
2 changes: 1 addition & 1 deletion CI/.travis.yml.bash
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ script:
- set -e
# run integration tests defined in maven pom.xml
- cp pom.xml.bash pom.xml
- mvn --batch-mode verify -Psamples
- mvn --no-snapshot-updates --batch-mode verify -Psamples
2 changes: 1 addition & 1 deletion CI/.travis.yml.ios
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ before_install:

script:
# run integration tests defined in maven pom.xml
- mvn -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
- mvn --no-snapshot-updates -q --batch-mode verify -Psamples.ios -Dmaven.javadoc.skip=true
2 changes: 1 addition & 1 deletion CI/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ workflows:
set -e
mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
title: Build openapi-generator
- [email protected]:
title: Update Swift samples
Expand Down
8 changes: 4 additions & 4 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if [ "$NODE_INDEX" = "1" ]; then
export PATH="/usr/local/go1.14/go/bin:$PATH"
go version

mvn --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet javadoc:javadoc -Psamples.circleci -Dorg.slf4j.simpleLogger.defaultLogLevel=error

elif [ "$NODE_INDEX" = "2" ]; then
# run ensure-up-to-date sample script on SNAPSHOT version only
Expand Down Expand Up @@ -58,7 +58,7 @@ elif [ "$NODE_INDEX" = "2" ]; then
sudo apt-get -y install libcurl4-gnutls-dev

# run integration tests
mvn --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.misc -Dorg.slf4j.simpleLogger.defaultLogLevel=error
else
echo "Running node $NODE_INDEX to test 'samples.circleci.jdk7' defined in pom.xml ..."
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
Expand All @@ -73,7 +73,7 @@ else
sudo apt-get install dart
export PATH="$PATH:/usr/lib/dart/bin"

mvn --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
mvn --no-snapshot-updates --quiet verify -Psamples.circleci.jdk7 -Dorg.slf4j.simpleLogger.defaultLogLevel=error
fi


2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build_script:
- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln
- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
# install openapi-generator locally
- mvn clean install --quiet -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
# run the locally installed openapi-generator-gradle-plugin
- gradle -b modules\openapi-generator-gradle-plugin\samples\local-spec\build.gradle buildGoSdk --info
test_script:
Expand Down
2 changes: 1 addition & 1 deletion bin/utils/ensure-up-to-date
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ declare -a always_iterate=(
export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn"
if [ "true" = "$batch_mode" ]; then
if [ ! -f "$executable" ]; then
(cd "${root}" && mvn -B clean package -DskipTests=true -Dmaven.javadoc.skip=true)
(cd "${root}" && mvn -B --no-snapshot-updates clean package -DskipTests=true -Dmaven.javadoc.skip=true)
fi

# shellcheck disable=SC2086
Expand Down
2 changes: 1 addition & 1 deletion circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: mvn --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@
<argLine>@{argLine} -XX:+StartAttachListener</argLine>
<systemPropertyVariables>
<org.openapitools.codegen.utils.oncelogger.expiry>1000</org.openapitools.codegen.utils.oncelogger.expiry>
<org.openapitools.codegen.utils.oncelogger.cachesize>5000</org.openapitools.codegen.utils.oncelogger.cachesize>
</systemPropertyVariables>
</configuration>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions shippable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:
- rm /etc/apt/sources.list.d/jonathonf-ubuntu-backports-xenial.list
#
- java -version
- mvn --quiet clean install -Dmaven.javadoc.skip=true
- mvn --no-snapshot-updates --quiet clean install -Dmaven.javadoc.skip=true
# ensure all modifications created by 'mature' generators are in the git repo
# below move to CircleCI ./bin/utils/ensure-up-to-date
# prepare environment for tests
Expand All @@ -42,7 +42,7 @@ build:
- elixir --version
- mix --version
# test samples defined in pom.xml
- mvn --quiet verify -P samples.shippable -Dmaven.javadoc.skip=true
- mvn --no-snapshot-updates --quiet verify -P samples.shippable -Dmaven.javadoc.skip=true
# below moved to CircleCI
## generate all petstore samples (client, servers, doc)
#- ./bin/run-all-petstore
Expand Down

0 comments on commit fb57b60

Please sign in to comment.