diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b95f26fcce9..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ -cache: - directories: - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ -language: groovy -branches: - only: - - 6.1.x -jdk: -- openjdk8 -- openjdk11 -- openjdk14 -dist: trusty -env: - global: - - TERM=dumb - - MALLOC_ARENA_MAX=1 - - GRADLE_OPTS="-Xmx768m -Xms256m -XX:MaxPermSize=256m" - - GIT_NAME="Graeme Rocher" - - GIT_EMAIL="graeme.rocher@gmail.com" - - secure: RB91TbokXRArer1GQD3AGfEWK/asNS0L/+d5NtQImik5dxQyj6purtg69Gi5MXOMgVJDlrv8IgxAQQyGKI96hvDZ5UpYPPYrod4lKcStLSwjihSualK8dNZ/4PAbNoGrszvWFJs5gzRYfkctpZ275CD/60F+IBOdYf0rgMQdnU0= - - secure: T4Fs4Yp9r90nml1MAIncLtSDXwBng7V8XIhayDAiGrRAtP9bYsRUqb22V1vFvUQi9tPbpJy/d1LwDGqvEpfnWOOj6ScrtzhuhYbEbkK7kxZiYgRxkOtaI5gOhy88FvhSf7MPv/6ZLz3gnoNF8/y3JaZgSMdOOZZIh7rCuq0SCzE= - - secure: b3nwej9yLrLlXlnQ4hnnJNJ9cyBhx88EvcUGyTIzBGFYKG5NtOEDlknHVsiYqjNEBmjPSJyPxfZI897QuKm4T8lV0ZCrT3EG2TvIKZsn77ovdiIjwSWxxrJ6XrYCIKsf1Giezdxyb5wMAKoOZQ5kQzd0EnO0n0qG1gTF4wcx6Eg= - - secure: E/VSNK3SwUJUORlDi7akJo4FjBajaxgg4DhuXokaKaJD6jdqJ4S2CPKk0AY957oqbox1i9l8I7Wx+NUKjADmVIppwcbY/h90bhZJRgOPdmtLd+iab8SM8YRYNjTpFKMh3qKa8WG5yP5oKiqCoL4j8XPops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YJ/huCFM= - - secure: U5U+rh3TugxMuTkpetfBj28f6uACKjD88jsQR5cd0B7gV5j0RAkq3skFpHu1F43y/RmofRcAqeSsYVT8+qRCEBDZjYBwTnT5+N+ItBzGNpv486oEyIhMUCr9bpfibfHz+1uqlPBFF9E+5X2lT5hSIXyIiBa+l/LpwhHsb0wSzH0= - - secure: V7Dwj9pqJWmjeYJYWHdNGlujNhFwvEc5YbTv5AO9Xn+iUgaaQEmrv43a5I+4m+EGVraD3Pg6ENPBEc7e0/cD7GoocQ0uXwGkfe+dJISvp3s18lDMm7EtdxmTkiKVH5sgsHnGbbEHV4Ku1c9k1u4DKEjmPzfpoNr/vI2yKU9I5EM= - - secure: XXFQBgzpIYV8boZo/ZeEq300zDLrWzD09vSTh3A9BvPsTTJgGlPBF008zFP2WD2XacBHbCFMPd0hPrO25SSCwX4P8C/PhhRRkrhuYaM1OeYzi6Xxbtnc1gpdUdxm9Z/cZlvLTEKL3cq+9XqbKOkcumM9pxY1mWkoeLVuv/9dsXw= -matrix: - fast_finish: true -install: true -script: ./travis-build.sh -notifications: - slack: - secure: eSyvdf/vA0KGAyiITwe7ooD6BCX94PCy7o35HSkbfUbHB5XPJq/SkqRjjIeiwrgywVph+qGBPYmzIdep4BQwH+JFEfPu0gQoNWKeGAVmJ9LeFaP4vaXWvuRugunO9zUla4JT2cfmsxKVEoTfI1NIfT15hYBMHi+8CfgFlx2zOdk= diff --git a/build.gradle b/build.gradle index c79d23075c1..e8132c73fce 100644 --- a/build.gradle +++ b/build.gradle @@ -12,7 +12,7 @@ buildscript { ext { // overall project version - isCiBuild = System.getenv().get("TRAVIS") == 'true' || System.getenv().get("CI") as Boolean + isCiBuild = System.getenv().get("CI") as Boolean isSnapshot = project.projectVersion.endsWith("-SNAPSHOT") isReleaseVersion = !isSnapshot diff --git a/grails-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DetachedCriteriaSpec.groovy b/grails-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DetachedCriteriaSpec.groovy index 51cb396df0a..343d73e577d 100644 --- a/grails-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DetachedCriteriaSpec.groovy +++ b/grails-datastore-gorm-tck/src/main/groovy/grails/gorm/tests/DetachedCriteriaSpec.groovy @@ -83,8 +83,6 @@ class DetachedCriteriaSpec extends GormDatastoreSpec { criteria.asBoolean() == true } - // Ignore on Travis infrastructure which doesn't support MongoDB 26 - @IgnoreIf({ System.getenv("TRAVIS")}) void "Test updateAll method"() { given:"A bunch of people" createPeople() diff --git a/travis-build.sh b/travis-build.sh deleted file mode 100755 index eb3c2db702c..00000000000 --- a/travis-build.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -EXIT_STATUS=0 - -./gradlew --stop - -if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then - - echo "Tagged Release Skipping Tests for Publish" - ./travis-publish.sh || EXIT_STATUS=$? -else - ./gradlew --no-daemon compileTestGroovy || EXIT_STATUS=$? - if [[ $EXIT_STATUS -eq 0 ]]; then - ./gradlew --no-daemon --refresh-dependencies check || EXIT_STATUS=$? - if [[ $EXIT_STATUS -eq 0 && $TRAVIS_PULL_REQUEST == 'false' ]]; then - echo "Travis Branch $TRAVIS_BRANCH" - if ([[ -n $TRAVIS_TAG ]] || [[ $TRAVIS_BRANCH =~ ^master|[7]\..\.x$ ]] && [[ "${TRAVIS_JDK_VERSION}" != "openjdk11" ]]); then - ./travis-publish.sh || EXIT_STATUS=$? - fi - fi - fi -fi - -exit $EXIT_STATUS diff --git a/travis-publish.sh b/travis-publish.sh deleted file mode 100755 index c6b5e78db26..00000000000 --- a/travis-publish.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -echo "Publishing for branch $TRAVIS_BRANCH JDK: $TRAVIS_JDK_VERSION" - -EXIT_STATUS=0 -TAG_BRANCH=master - -# Only JDK8 execution will publish the release -if [[ "${TRAVIS_JDK_VERSION}" == "openjdk11" || "${TRAVIS_JDK_VERSION}" == "openjdk14" ]]; then - exit $EXIT_STATUS -fi - -if [[ $TRAVIS_REPO_SLUG == "grails/grails-data-mapping" && $TRAVIS_PULL_REQUEST == 'false' && $EXIT_STATUS -eq 0 ]]; then - - echo "Publishing archives" - echo "org.gradle.jvmargs=-XX\:MaxPermSize\=1024m -Xmx1500m -Dfile.encoding\=UTF-8 -Duser.country\=US -Duser.language\=en -Duser.variant" >> ~/.gradle/gradle.properties - echo "org.gradle.daemon=false" >> ~/.gradle/gradle.properties - ./gradlew --stop - - export GRADLE_OPTS="-XX:MaxPermSize=1024m -Xmx1500m -Dfile.encoding=UTF-8" - - if [[ -n $TRAVIS_TAG ]]; then - ./gradlew publish bintrayUpload --no-daemon --stacktrace || EXIT_STATUS=$? - else - ./gradlew publish --no-daemon --stacktrace || EXIT_STATUS=$? - fi - - if [[ $EXIT_STATUS -eq 0 ]]; then - git config --global user.name "$GIT_NAME" - git config --global user.email "$GIT_EMAIL" - git config --global credential.helper "store --file=~/.git-credentials" - echo "https://$GH_TOKEN:@github.com" > ~/.git-credentials - - echo "Triggering Hibernate 5 build" - git clone -b $TAG_BRANCH https://${GH_TOKEN}@github.com/grails/gorm-hibernate5.git gorm-hibernate5 - cd gorm-hibernate5 - echo "$(date)" > .snapshot - git add .snapshot - git commit -m "New Core Snapshot: $(date)" - git push - cd .. - - echo "Triggering Neo4j build" - git clone -b $TAG_BRANCH https://${GH_TOKEN}@github.com/grails/gorm-neo4j.git gorm-neo4j - cd gorm-neo4j - echo "$(date)" > .snapshot - git add .snapshot - git commit -m "New Core Snapshot: $(date)" - git push - cd .. - - echo "Triggering MongoDB build" - git clone -b $TAG_BRANCH https://${GH_TOKEN}@github.com/grails/gorm-mongodb.git gorm-mongodb - cd gorm-mongodb - echo "$(date)" > .snapshot - git add .snapshot - git commit -m "New Core Snapshot: $(date)" - - git push - cd .. - - # If there is a tag present then this becomes the latest - if [[ $TRAVIS_TAG =~ ^v[[:digit:]] ]]; then - echo "Triggering documentation build" - git clone -b $TAG_BRANCH https://${GH_TOKEN}@github.com/grails/gorm-docs.git gorm-docs - cd gorm-docs - - if [[ $TRAVIS_TAG =~ [M\d|RC\d] ]]; then - echo "gormVersion=${TRAVIS_TAG:1}" > gradle.properties - else - echo "gormVersion=${TRAVIS_TAG:1}.RELEASE" > gradle.properties - fi - - git add gradle.properties - git commit -m "Release $TRAVIS_TAG docs" - git tag $TRAVIS_TAG - git push --tags - git push - cd .. - - if [[ $EXIT_STATUS -eq 0 ]]; then - ./gradlew synchronizeWithMavenCentral --no-daemon - fi - fi - - else - echo "Error occured during publishing, skipping docs" - fi - -fi - -if [[ $EXIT_STATUS -eq 0 ]]; then - echo "Publishing Successful." -fi -exit $EXIT_STATUS diff --git a/travis/junit-errors-to-stdout.sh b/travis/junit-errors-to-stdout.sh deleted file mode 100755 index 03c7014d79f..00000000000 --- a/travis/junit-errors-to-stdout.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -IFS=' -' -DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -if [ "$TRAVIS" = "true" ]; then - echo 'Installing xml-twig-tools and xsltproc....' - sudo apt-get install -qq -y --force-yes xml-twig-tools xsltproc > /dev/null -fi -ROOTDIR="$1" -if [ -z "$ROOTDIR" ]; then - ROOTDIR="." -fi -echo 'Formatting results...' -FILES=$(find "$ROOTDIR" -path '*/build/test-results/*.xml' | xargs --no-run-if-empty xml_grep --files --cond 'testsuite[@failures > 0 or @errors > 0]') -if [ -n "$FILES" ]; then - for file in $FILES; do - echo "Formatting $file" - if [ -f "$file" ]; then - echo '=====================================================' - xsltproc "$DIR/junit-xml-format-errors.xsl" "$file" - fi - done - echo '=====================================================' -else - echo 'No */build/test-results/*.xml files found with failing tests.' -fi diff --git a/travis/junit-xml-format-errors.xsl b/travis/junit-xml-format-errors.xsl deleted file mode 100644 index 5f27accb659..00000000000 --- a/travis/junit-xml-format-errors.xsl +++ /dev/null @@ -1,60 +0,0 @@ - - - - - Testsuite: - -Tests run: - - , Failures: - - , Errors: - - , Time elapsed: - - sec - ---------- ----------- --------- - - - - - - - -Testcase: - - took - - - FAILURE - ERROR - SUCCESS - - - - - - - - - - - - - - - ------- Standard output ------ - - - - - - ------- Error output ------ - - - - - \ No newline at end of file diff --git a/travis/travis_after_all.py b/travis/travis_after_all.py deleted file mode 100644 index 4d144ff1498..00000000000 --- a/travis/travis_after_all.py +++ /dev/null @@ -1,99 +0,0 @@ -# source: https://github.com/dmakhno/travis_after_all/blob/master/travis_after_all.py -# workaround for https://github.com/travis-ci/travis-ci/issues/929 -import os -import json -import time -import logging - -try: - import urllib.request as urllib2 -except ImportError: - import urllib2 - -log = logging.getLogger("travis.leader") -log.addHandler(logging.StreamHandler()) -log.setLevel(logging.INFO) - -TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' -TRAVIS_BUILD_ID = 'TRAVIS_BUILD_ID' -POLLING_INTERVAL = 'LEADER_POLLING_INTERVAL' - -build_id = os.getenv(TRAVIS_BUILD_ID) -polling_interval = int(os.getenv(POLLING_INTERVAL, '5')) - -#assume, first job is the leader -is_leader = lambda job_number: job_number.endswith('.1') - -if not os.getenv(TRAVIS_JOB_NUMBER): - # seems even for builds with only one job, this won't get here - log.fatal("Don't use defining leader for build without matrix") - exit(1) -elif is_leader(os.getenv(TRAVIS_JOB_NUMBER)): - log.info("This is a leader") -else: - #since python is subprocess, env variables are exported back via file - with open(".to_export_back", "w") as export_var: - export_var.write("BUILD_MINION=YES") - log.info("This is a minion") - exit(0) - - -class MatrixElement(object): - def __init__(self, json_raw): - self.is_finished = json_raw['finished_at'] is not None - self.is_succeeded = json_raw['result'] == 0 - self.number = json_raw['number'] - self.is_leader = is_leader(self.number) - - -def matrix_snapshot(): - """ - :return: Matrix List - """ - response = urllib2.build_opener().open("https://api.travis-ci.org/builds/{0}".format(build_id)).read() - raw_json = json.loads(response) - matrix_without_leader = [MatrixElement(element) for element in raw_json["matrix"]] - return matrix_without_leader - - -def wait_others_to_finish(): - def others_finished(): - """ - Dumps others to finish - Leader cannot finish, it is working now - :return: tuple(True or False, List of not finished jobs) - """ - snapshot = matrix_snapshot() - finished = [el.is_finished for el in snapshot if not el.is_leader] - return reduce(lambda a, b: a and b, finished), [el.number for el in snapshot if - not el.is_leader and not el.is_finished] - - while True: - finished, waiting_list = others_finished() - if finished: break - log.info("Leader waits for minions {0}...".format(waiting_list)) # just in case do not get "silence timeout" - time.sleep(polling_interval) - - -try: - wait_others_to_finish() - - final_snapshot = matrix_snapshot() - log.info("Final Results: {0}".format([(e.number, e.is_succeeded) for e in final_snapshot])) - - BUILD_AGGREGATE_STATUS = 'BUILD_AGGREGATE_STATUS' - others_snapshot = [el for el in final_snapshot if not el.is_leader] - if reduce(lambda a, b: a and b, [e.is_succeeded for e in others_snapshot]): - os.environ[BUILD_AGGREGATE_STATUS] = "others_succeeded" - elif reduce(lambda a, b: a and b, [not e.is_succeeded for e in others_snapshot]): - log.error("Others Failed") - os.environ[BUILD_AGGREGATE_STATUS] = "others_failed" - else: - log.warn("Others Unknown") - os.environ[BUILD_AGGREGATE_STATUS] = "unknown" - #since python is subprocess, env variables are exported back via file - with open(".to_export_back", "w") as export_var: - export_var.write("BUILD_LEADER=YES {0}={1}".format(BUILD_AGGREGATE_STATUS, os.environ[BUILD_AGGREGATE_STATUS])) - -except Exception as e: - log.fatal(e) \ No newline at end of file