os: linux dist: bionic language: java jdk: - openjdk11 addons: sonarcloud: organization: $SONAR_ORGANIZATION git: #depth false needed by sonarcloud for deep comparison depth: false services: - docker cache: directories: - $HOME/.m2 - web/node_modules branches: except: - /dependabot.*/ stages: - name: Compile - name: Test - name: Release / Deploy if: repo = 'Taskana/taskana' AND (tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ OR branch = master) AND type != pull_request env: global: - NODE_VERSION=12.10.0 jobs: - DB=H2 - DB=DB2_11_1 install: skip # include SONAR_PROJECT_KEY as a second parameter if this is not a pull request script: ci/test.sh "$DB" "$([ "false" = "$TRAVIS_PULL_REQUEST" ] && echo "$SONAR_PROJECT_KEY")" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" jobs: include: # We are using the environment variable 'MODULE' to force travis into using a different cache for each build. # See https://docs.travis-ci.com/user/caching/#caches-and-build-matrices for detailed information on # which characteristics determine the cache selection. - stage: Compile name: taskana-web language: node_js node_js: $NODE_VERSION install: skip env: MODULE=WEB script: ci/compile.sh "$MODULE" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Compile name: taskana-common + taskana-lib install: skip env: MODULE=LIB script: ci/compile.sh COMMON && ci/compile.sh "$MODULE" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Compile name: taskana-rest install: skip env: MODULE=REST script: ci/compile.sh "$MODULE" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Compile name: taskana-history install: skip env: MODULE=HISTORY script: ci/compile.sh "$MODULE" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Test install: skip env: DB=POSTGRES_10 script: ci/test.sh "$DB" && export JAVA_HOME=/usr/local/lib/jvm/openjdk8 && ci/test.sh WILDFLY before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Test before_script: nvm install $NODE_VERSION install: skip env: DB=WEB script: ci/test.sh "$DB" before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" - stage: Release / Deploy name: release / deploy / commit # This is necessary in order to fix some gpg issues (for signing the artifacts which will be released) # More details: https://discuss.circleci.com/t/error-sending-to-agent-inappropriate-ioctl-for-device/17465/7 before_install: | echo use-agent >> ~/.gnupg/gpg.conf \ && echo pinentry-mode loopback >> ~/.gnupg/gpg.conf \ && echo allow-loopback-pinentry >> ~/.gnupg/gpg-agent.conf \ && echo RELOADAGENT | gpg-connect-agent \ && openssl aes-256-cbc -K "$encrypted_21a5d40e43a3_key" -iv "$encrypted_21a5d40e43a3_iv" \ -in "ci/codesigning.asc.enc" -out "ci/codesigning.asc" -d \ && gpg --batch --no-tty --yes --import "ci/codesigning.asc" \ && nvm install "$NODE_VERSION" install: ci/change_version.sh -m . && ( cd web && npm install ) && ( cd web && npm run build:prod-silent ) && ./mvnw -q install -B -T 2C -pl :taskana-rest-spring-example-boot,:taskana-cdi -am -DskipTests -Dcheckstyle.skip -Dasciidoctor.skip && ./mvnw -q prepare-package -B -T 2C -pl :taskana-rest-spring && ./mvnw -q install -B -T 2C -f history -DskipTests -Dmaven.javadoc.skip -Dcheckstyle.skip && ./mvnw -q install -B -T 2C -pl :taskana-rest-spring-example-boot -P history.plugin -DskipTests -Dcheckstyle.skip before_script: ci/verify_docs_jar.sh script: | ./mvnw deploy -B -T 2C -P `[[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "release" || echo "snapshot"` \ --settings ci/mvnsettings.xml -DskipTests -Dcheckstyle.skip \ -pl :taskana-parent,\ :taskana-common-parent,:taskana-common,:taskana-common-data,:taskana-common-test,\ :taskana-lib-parent,:taskana-core,:taskana-cdi,:taskana-spring,\ :taskana-rest-parent,:taskana-web,:taskana-rest-spring,\ :taskana-history-parent,:taskana-simplehistory-provider,:taskana-simplehistory-rest-spring,:taskana-loghistory-provider before_cache: rm -rf "$HOME/.m2/repository/pro/taskana" # travis_terminate is necessary since after_success is a job phase which can change the build result. # it is not documented, so this is a little hack. see: https://docs.travis-ci.com/user/job-lifecycle/#breaking-the-build after_success: ci/change_version.sh -i -m . && ci/commitPoms.sh || travis_terminate 1 deploy: provider: cloudfoundry username: $BLUEMIX_ACCOUNT password: $BLUEMIX_ACCOUNT_PASSWORD api: https://api.ng.bluemix.net organization: "NovaTec Consulting GmbH" space: Taskana on: all_branches: true # travis_terminate is necessary since after_deploy is a job phase which can change the build result. # it is not documented, so this is a little hack. see: https://docs.travis-ci.com/user/job-lifecycle/#breaking-the-build after_deploy: ci/verify_docs_alive.sh || travis_terminate 1