Skip to content

Commit

Permalink
fix(travis): add snapshot release + refactor pluginsGroup to existing…
Browse files Browse the repository at this point in the history
… settings.xml
  • Loading branch information
ichbinfrog committed Oct 21, 2019
1 parent 8c77ec7 commit 1115b14
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,26 @@ matrix:
script:
- mvn -e -B -P gradle -Dspring.standalone -Dit.test='!IT01_PatchAnalyzerIT, IT*, *IT, *ITCase' -DfailIfNoTests=false --settings .travis/settings.xml clean install
before_deploy:
- cp .travis/settings.xml $HOME/.m2/settings.xml
- set -a; source .travis/.env; set +a;
- echo "VULAS_RELEASE=${VULAS_RELEASE}"
- curl -Lo .travis/skaffold https://storage.googleapis.com/skaffold/releases/v0.40.0/skaffold-linux-amd64
- chmod +x .travis/skaffold
- export JIB=true
- echo "<settings><pluginGroups><pluginGroup>com.google.cloud.tools</pluginGroup></pluginGroups></settings>" > "$HOME/.m2/settings.xml"
deploy:
- provider: script
skip_cleanup: true
script: bash .travis/docker_hub_push_release.sh
script: bash .travis/docker_hub_push_snapshot.sh
on:
branch: master
condition: $TRAVIS_EVENT_TYPE = push

- provider: script
skip_cleanup: true
script: bash .travis/docker_hub_push_release.sh
on:
all_branches: true
condition: tag =~ /^[0-9]+\.[0-9]+\.[0-9]+(\..+)?$/

- name: OpenJDK8 - Create Maven artifacts for JavaDoc and sources
language: java
jdk: openjdk8
Expand Down
6 changes: 5 additions & 1 deletion .travis/docker_hub_push_snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

if [[ $VULAS_RELEASE =~ ^([0-9]+\.[0-9]+\.[0-9]+-SNAPSHOT)$ ]]; then
echo "$DOCKER_HUB_NARAMSIM_PASSWORD" | docker login -u "$DOCKER_HUB_NARAMSIM_USERNAME" --password-stdin
(cd docker && bash push-images.sh -r docker.io -p vulas -v "${VULAS_RELEASE}")
if [ -z "$JIB" ]; then
(cd docker && bash push-images.sh -r docker.io -p vulas -v "${VULAS_RELEASE}")
else
./.travis/skaffold build -f ./.travis/skaffold.yaml
fi
else
echo '[!] Refusing to push non-snapshot version'
echo " VULAS_RELEASE: $VULAS_RELEASE"
Expand Down
1 change: 1 addition & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ under the License.
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
<pluginGroup>com.google.cloud.tools</pluginGroup>
</pluginGroups>

<!-- proxies
Expand Down

0 comments on commit 1115b14

Please sign in to comment.