Skip to content

Commit

Permalink
added debug output und reduced build steps for debugging build issues…
Browse files Browse the repository at this point in the history
… on travis
  • Loading branch information
cstettler committed Apr 22, 2018
1 parent 3787911 commit 27efeb5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ script:
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then docker login -u $DOCKER_HUB_USERNAME -p $DOCKER_HUB_PASSWORD; fi
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then docker run -d -p8090:8090 -p8091:8091 --name=confluence-publisher-it confluencepublisher/confluence-publisher-it:6.0.5; fi
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./waitForConfluenceStartup.sh confluence-publisher-it 300; fi
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./mvnw -Pintegration-tests failsafe:integration-test failsafe:verify -nsu; fi
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./mvnw -pl asciidoc-confluence-publisher-doc asciidoc-confluence-publisher:publish -nsu; fi
# - if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./mvnw -Pintegration-tests failsafe:integration-test failsafe:verify -nsu; fi
# - if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./mvnw -pl asciidoc-confluence-publisher-doc asciidoc-confluence-publisher:publish -nsu; fi
- if ( [ "$TRAVIS_SECURE_ENV_VARS" == "true" ] ); then ./publishWithDockerImage.sh; fi
- if ( [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] ) || [ -n "$TRAVIS_TAG" ]; then ./mvnw -s .settings.xml jar:jar source:jar javadoc:jar gpg:sign deploy:deploy -Possrh -nsu; fi
- if [ -n "$TRAVIS_TAG" ]; then ./mvnw -Dusername=$CONFLUENCE_USERNAME -D"password=$CONFLUENCE_PASSWORD" -DrootConfluenceUrl=$CONFLUENCE_URL -DspaceKey=$CONFLUENCE_SPACE_KEY -DancestorId=$CONFLUENCE_ANCESTOR_ID -pl asciidoc-confluence-publisher-doc asciidoc-confluence-publisher:publish -nsu; fi
Expand Down
10 changes: 7 additions & 3 deletions publishWithDockerImage.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
#!/bin/bash

projectVersion=`mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep -e "^\d\.\d\.\d.*"`
runnerHost=`hostname`
echo "project version: ${projectVersion}"

docker run --rm -e ROOT_CONFLUENCE_URL=http://$runnerHost:8090 \
runnerHostIp=`ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p`
echo "runner host ip : ${runnerHostIp}"
docker run --rm \
-e ROOT_CONFLUENCE_URL=http://${runnerHostIp}:8090 \
-e USERNAME=confluence-publisher-it \
-e PASSWORD=1234 \
-e SPACE_KEY=CPI \
-e ANCESTOR_ID=327706 \
-e PAGE_TITLE_PREFIX="Docker - " \
-e PAGE_TITLE_SUFFIX=" - Test" \
-v `pwd`/asciidoc-confluence-publisher-doc/etc/docs:/var/asciidoc-root-folder \
confluencepublisher/confluence-publisher:$projectVersion
confluencepublisher/confluence-publisher:${projectVersion}

0 comments on commit 27efeb5

Please sign in to comment.