SCB-2205 Polishing Github actions workflow
diff --git a/.github/asf-deploy-settings.xml b/.github/asf-deploy-settings.xml
new file mode 100644
index 0000000..aefda6e
--- /dev/null
+++ b/.github/asf-deploy-settings.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one or more
+ ~ contributor license agreements. See the NOTICE file distributed with
+ ~ this work for additional information regarding copyright ownership.
+ ~ The ASF licenses this file to You under the Apache License, Version 2.0
+ ~ (the "License"); you may not use this file except in compliance with
+ ~ the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing, software
+ ~ distributed under the License is distributed on an "AS IS" BASIS,
+ ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ~ See the License for the specific language governing permissions and
+ ~ limitations under the License.
+ -->
+
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://maven.apache.org/SETTINGS/1.0.0
+ http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <servers>
+ <server>
+ <id>apache.snapshots.https</id>
+ <username>${env.NEXUS_DEPLOY_USERNAME}</username>
+ <password>${env.NEXUS_DEPLOY_PASSWORD}</password>
+ </server>
+ </servers>
+
+</settings>
diff --git a/.github/workflows/asf-snapshots-deploy.yml b/.github/workflows/asf-snapshots-deploy.yml
new file mode 100644
index 0000000..87c9b5d
--- /dev/null
+++ b/.github/workflows/asf-snapshots-deploy.yml
@@ -0,0 +1,98 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+name: deploy snapshot
+
+on:
+ schedule:
+ - cron: '0 2 * * *'
+ workflow_dispatch:
+
+env:
+ MAVEN_OPTS: -Xmx4g -Xms1g -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3
+ COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
+
+jobs:
+ build:
+ timeout-minutes: 180
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ java: [ '1.8' ]
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache Maven Repository
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository/
+ !~/.m2/repository/org/apache/servicecomb
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Show the first log message
+ run: git log -n1
+ - name: Build and test
+ if: ${{ success() }}
+ run: ./mvnw clean install -B -Pjacoco -Pdocker coveralls:report -DrepoToken=${COVERALLS_TOKEN}
+ - name: Upload unit test results
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: surefire-reports
+ path: ./**/target/surefire-reports/
+ if-no-files-found: ignore
+ - name: Verify demo
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
+ - name: Verify Acceptance tests
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
+
+ deploy:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ java: [ '1.8' ]
+ needs: build
+ if: github.ref == 'refs/heads/master'
+ env:
+ NEXUS_DEPLOY_USERNAME: ${{ secrets.NEXUS_USER }}
+ NEXUS_DEPLOY_PASSWORD: ${{ secrets.NEXUS_PW }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache Maven Repository
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository/
+ !~/.m2/repository/org/apache/servicecomb
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Deploy to ASF Snapshots Repository
+ run: mvn clean deploy -B -Ddocker.skip -DskipTests --settings .github/asf-deploy-settings.xml
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
deleted file mode 100644
index e097623..0000000
--- a/.github/workflows/ci.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
-name: CI
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
-jobs:
- pull_request_test:
- if: ${{ github.event.issue.pull_request }}
- timeout-minutes: 180
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
- java-package: jdk
- architecture: x64
- - name: Cache local maven repository
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository/
- !~/.m2/repository/org/apache/servicecomb
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
- - name: Show the first log message
- run: git log -n1
- - name: Build and Test and Install Docker
- if: ${{ success() }}
- run: ./mvnw clean install -B -Pdocker
- - name: Upload unit test results when the previous step of a job fails
- if: ${{ failure() }}
- uses: actions/upload-artifact@v2
- with:
- name: surefire-reports
- path: ./**/target/surefire-reports/
- if-no-files-found: ignore
- - name: Verify Demo
- if: ${{ success() }}
- run: ./mvnw clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
- - name: Verify Acceptance Tests
- if: ${{ success() }}
- run: ./mvnw clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
-
- push_master_test:
- if: ${{ !github.event.issue.pull_request && github.event.repository.owner.login == 'apache' }}
- timeout-minutes: 180
- runs-on: ubuntu-20.04
- steps:
- - uses: actions/checkout@v2
- - name: Set up JDK 1.8
- uses: actions/setup-java@v1
- with:
- java-version: 1.8
- java-package: jdk
- architecture: x64
- - name: Cache local maven repository
- uses: actions/cache@v2
- with:
- path: |
- ~/.m2/repository/
- !~/.m2/repository/org/apache/servicecomb
- key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
- restore-keys: ${{ runner.os }}-m2
- - name: Show the first log message
- run: git log -n1
- - name: Build and Test and Install Docker
- if: ${{ success() }}
- run: ./mvnw clean install -B -Pdocker
- - name: Upload unit test results when the previous step of a job fails
- if: ${{ failure() }}
- uses: actions/upload-artifact@v2
- with:
- name: surefire-reports
- path: ./**/target/surefire-reports/
- if-no-files-found: ignore
- - name: Verify Demo
- if: ${{ success() }}
- run: ./mvnw clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
- - name: Verify Acceptance Tests
- if: ${{ success() }}
- run: ./mvnw clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
diff --git a/.github/workflows/master-pr-build.yaml b/.github/workflows/master-pr-build.yaml
new file mode 100644
index 0000000..0e6fd96
--- /dev/null
+++ b/.github/workflows/master-pr-build.yaml
@@ -0,0 +1,68 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+name: master pr build
+
+on:
+ pull_request:
+ branches:
+ - master
+
+env:
+ MAVEN_OPTS: -Xmx4g -Xms1g -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3
+
+jobs:
+ mvn:
+ timeout-minutes: 180
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ java: [ '1.8' ]
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache Maven Repository
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository/
+ !~/.m2/repository/org/apache/servicecomb
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Show the first log message
+ run: git log -n1
+ - name: Build and test
+ if: ${{ success() }}
+ run: ./mvnw clean install -B -Pjacoco -Pdocker coveralls:report -DrepoToken=ftogh57jTQ0GRa4AaOgFfltiUrwnO8tw9
+ - name: Upload unit test results
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: surefire-reports
+ path: ./**/target/surefire-reports/
+ if-no-files-found: ignore
+ - name: Verify demo
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
+ - name: Verify Acceptance tests
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
diff --git a/.github/workflows/master-push-build.yaml b/.github/workflows/master-push-build.yaml
new file mode 100644
index 0000000..1f3d57d
--- /dev/null
+++ b/.github/workflows/master-push-build.yaml
@@ -0,0 +1,69 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements. See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License. You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+name: master push build
+
+on:
+ push:
+ branches:
+ - master
+
+env:
+ MAVEN_OPTS: -Xmx4g -Xms1g -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3
+ COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
+
+jobs:
+ mvn:
+ timeout-minutes: 180
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ java: [ '1.8' ]
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ persist-credentials: false
+ - name: Set up JDK ${{ matrix.java }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Cache Maven Repository
+ uses: actions/cache@v2
+ with:
+ path: |
+ ~/.m2/repository/
+ !~/.m2/repository/org/apache/servicecomb
+ key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+ restore-keys: ${{ runner.os }}-m2
+ - name: Show the first log message
+ run: git log -n1
+ - name: Build and test
+ if: ${{ success() }}
+ run: ./mvnw clean install -B -Pjacoco -Pdocker coveralls:report -DrepoToken=${COVERALLS_TOKEN}
+ - name: Upload unit test results
+ if: ${{ failure() }}
+ uses: actions/upload-artifact@v2
+ with:
+ name: surefire-reports
+ path: ./**/target/surefire-reports/
+ if-no-files-found: ignore
+ - name: Verify demo
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
+ - name: Verify Acceptance tests
+ if: ${{ success() }}
+ run: ./mvnw clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
diff --git a/.travis.settings.xml b/.travis.settings.xml
deleted file mode 100755
index f7ed272..0000000
--- a/.travis.settings.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<!--
- ~ Licensed to the Apache Software Foundation (ASF) under one or more
- ~ contributor license agreements. See the NOTICE file distributed with
- ~ this work for additional information regarding copyright ownership.
- ~ The ASF licenses this file to You under the Apache License, Version 2.0
- ~ (the "License"); you may not use this file except in compliance with
- ~ the License. You may obtain a copy of the License at
- ~
- ~ http://www.apache.org/licenses/LICENSE-2.0
- ~
- ~ Unless required by applicable law or agreed to in writing, software
- ~ distributed under the License is distributed on an "AS IS" BASIS,
- ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- ~ See the License for the specific language governing permissions and
- ~ limitations under the License.
- -->
-
-<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
- <servers>
- <server>
- <id>apache.snapshots.https</id>
- <username>${env.SONATYPE_USERNAME}</username>
- <password>${env.SONATYPE_PASSWORD}</password>
- </server>
- <server>
- <id>apache.releases.https</id>
- <username>${env.SONATYPE_USERNAME}</username>
- <password>${env.SONATYPE_PASSWORD}</password>
- </server>
- </servers>
- <profiles>
- <profile>
- <id>passphrase</id> <!-- give it the name of your project -->
- <properties>
- <gpg.homedir>/home/travis/build/apache/incubator-servicecomb-saga</gpg.homedir>
- <gpg.keyname>2DE9D2F9</gpg.keyname>
- <gpg.passphrase>${env.MYPASSP}</gpg.passphrase>
- </properties>
- </profile>
- </profiles>
-</settings>
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100755
index 2718024..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-sudo: required
-
-addons:
- sonarcloud:
- organization: "apache"
- token:
- secure: "gkKQ9reEfrFp34+U2xR38WJkzqrKCppiWtBWkC68pV3JBG/uMf9wq6rt/6PbnAVM19jcJUdZwJ+mWXtTnPNy2GNtHOPX1zERfWKiCsYGTMzntqr7fflKJk1sdUVD5ssbIO0Wt6kImqGSDXS/GYKUb6pow7H1N9wFZAF5vAoBYtG14CkUKPpHWBX9FothsP4zUI4IHZEs4jnMvGj/OA61riUR+mfw3qRqp1hkEKh2bXcIaLCzRfMib693JzzRDpkRaRSVUdwVNPRqTzZUv7ePOOflRI0yvcjjeDQpYPbVu03NryiUC0z+lOA2WLopqIup0rmi2Q7z1dfGvg5ot8URfDzKRW7VStDkoQRq8nq70mMCCuMt8BCmGJvtGDxkIHPBulEYQXnCW1NPghkfKD8WMy+gZy1Wf5+eB9ntUy9MhGFzicFqcVPJU0SAbk6adV+J39ueCG+Cqx5UcIkFT69XKy3C0dtY2s/5zYiXOhZfZVXli0GHOQ4KVczU7l/KcgBwn7HuW/FW5OElr+kWniqT7IYyGk12W+4HrndmfagL0AWx3WKRM/At8FQtGRWqDkJusF2PJJA4gKFcHiqz5ib3OXkvGzN5cgSMT9b5+H3c517E/yHzwk56bhr/qNqhB1c/8lGPQcQTJRHzizZUCoXTdQ8q8XkLdiChzdtERhrwKsI="
-
-cache:
- directories:
- - "$HOME/.m2"
-language: java
-
-# SonarCloud give a warning if using shallow clone (default), so we disable it
-git:
- depth: false
-
-install: true
-jdk:
-- openjdk8
-script: ./scripts/test.sh
-after_success:
-- if [ "$TRAVIS_EVENT_TYPE" == "cron" ]; then bash -x scripts/deploy.sh ; fi
diff --git a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature
index af02262..68aa554 100644
--- a/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature
+++ b/acceptance-tests/acceptance-pack-akka-spring-demo/src/test/resources/alpha_records_transaction_events.feature
@@ -185,6 +185,7 @@
| booking | SagaAbortedEvent |
| car | TxCompensateAckFailedEvent |
| car | TxCompensateAckFailedEvent |
+ | car | TxCompensateAckFailedEvent |
Then Car Service contains the following booking orders
| id | name | amount | confirmed | cancelled |
diff --git a/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/pack/omega/connector/grpc/saga/SagaLoadBalancedSenderTest.java b/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/pack/omega/connector/grpc/saga/SagaLoadBalancedSenderTest.java
index 02cef1a..b1af68c 100644
--- a/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/pack/omega/connector/grpc/saga/SagaLoadBalancedSenderTest.java
+++ b/omega/omega-connector/omega-connector-grpc/src/test/java/org/apache/servicecomb/pack/omega/connector/grpc/saga/SagaLoadBalancedSenderTest.java
@@ -268,7 +268,7 @@
thread.start();
// we don't want to keep sending on cluster down
- await().atMost(10, SECONDS).until(new Callable<Boolean>() {
+ await().atMost(30, SECONDS).until(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return thread.getState().equals(TERMINATED);
@@ -284,7 +284,13 @@
startServerOnPort(8080);
startServerOnPort(8090);
- messageSender.send(event);
+ await().atMost(10,SECONDS).until(new Callable<Boolean>() {
+ @Override
+ public Boolean call() throws Exception {
+ return messageSender.pickMessageSender()!=null;
+ }
+ });
+ messageSender.send(event);
await().atMost(2, SECONDS).until(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
diff --git a/scripts/deploy.sh b/scripts/deploy.sh
deleted file mode 100644
index 719fe9d..0000000
--- a/scripts/deploy.sh
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-#bin/sh
-
-echo "Deploy a Non-Signed Staging Release"
- mvn deploy -B -Ddocker.skip -DskipTests --settings .travis.settings.xml
- if [ $? == 0 ]; then
- echo "${green}Snapshot Deployment is Success, please log on to Nexus Repo to see the snapshot release..${reset}"
- else
- echo "${red}Snapshot deployment failed.${reset}"
- # No need to exit 1 here as the snapshot depoyment will fail for private builds as decryption of password is allowed for ServiceComb repo and not forked repo's.
- fi
-echo "Deployment Completed"
diff --git a/scripts/test.sh b/scripts/test.sh
deleted file mode 100755
index bc9cdf7..0000000
--- a/scripts/test.sh
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env bash
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements. See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License. You may obtain a copy of the License at
-##
-## http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-#bin/sh
-echo "$TRAVIS_EVENT_TYPE"
-if [[ "$TRAVIS_EVENT_TYPE" == "cron" ]]
-then
- echo "Don't do anything here for the cron job!"
-else
- echo "Running the unit tests and integration tests here!"
- echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- echo "Not a pull request build, running build with sonar"
- mvn clean install -B -Pjacoco -Pdocker coveralls:report \
- && mvn clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs \
- && mvn clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
- else
- echo "Pull request build or local build"
- mvn clean install -B -Pjacoco -Pdocker coveralls:report \
- && mvn clean verify -B -f demo -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs \
- && mvn clean verify -B -f acceptance-tests -Pdemo -Pdocker -Ddocker.useColor=false -Ddocker.showLogs
- fi;
-fi