diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile new file mode 100644 index 0000000..e283bab --- /dev/null +++ b/.ci/Jenkinsfile @@ -0,0 +1,42 @@ +properties( + [ + disableConcurrentBuilds() + ] +) + +node('linux && docker') { + try { + stage('Checkout') { + //branch name from Jenkins environment variables + echo "My branch is: ${env.BRANCH_NAME}" + + // this doesn't grab tags pointing to this branch + //checkout scm + // this hack does... https://issues.jenkins.io/browse/JENKINS-45164 + checkout([ + $class: 'GitSCM', + branches: [[name: 'refs/heads/'+env.BRANCH_NAME]], + extensions: [[$class: 'CloneOption', noTags: false, shallow: false, depth: 0, reference: '']], + userRemoteConfigs: scm.userRemoteConfigs, + ]) + sh ''' + set -euxo pipefail + git checkout "$BRANCH_NAME" -- + git reset --hard "origin/$BRANCH_NAME" + ''' + } + + stage('Build + Deploy') { + sh 'curl --compressed -sL https://code.moparisthebest.com/moparisthebest/self-ci/raw/branch/master/build-ci.sh | bash' + } + + currentBuild.result = 'SUCCESS' + } catch (Exception err) { + currentBuild.result = 'FAILURE' + } finally { + stage('Email') { + step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'admin.jenkins@moparisthebest.com', sendToIndividuals: true]) + } + deleteDir() + } +} diff --git a/.ci/build.sh b/.ci/build.sh new file mode 100755 index 0000000..a883b8c --- /dev/null +++ b/.ci/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash +set -euxo pipefail + +[ $JAVA_VERSION -lt 6 -o $JAVA_VERSION -gt 7 ] && echo "build does not support JAVA_VERSION: $JAVA_VERSION" && exit 0 + +echo "starting build for JAVA_VERSION: $JAVA_VERSION" + +# grab all deps with java 8 +run-java 8 mvn dependency:go-offline +# build-helper-maven-plugin additionally requires these 2, no idea why +run-java 8 mvn dependency:get -Dartifact=junit:junit:4.10:jar +run-java 8 mvn dependency:get -Dartifact=org.apache.maven:maven-plugin-api:2.0.1:jar + +# install deps +mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V + +# clean and test +mvn clean test -B + +# publish only from java 6 and master branch +if [ "$BRANCH_NAME" == "master" -a $JAVA_VERSION -eq 6 ] +then + echo 'deploying to maven' + # java 6 cannot do modern SSL, use java 8 to deploy + run-java 8 mvn deploy -Dmaven.test.skip=true -B + + mkdir -p release + find -type f -name '*.jar' -print0 | xargs -0n1 -I {} mv '{}' 'release/' +fi + +echo 'build success!' +exit 0 diff --git a/.travis-settings.xml b/.travis-settings.xml deleted file mode 100644 index a9a9c68..0000000 --- a/.travis-settings.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - sonatype-nexus-snapshots - ${env.SONATYPE_USERNAME} - ${env.SONATYPE_PASSWORD} - - - \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 44f65e9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: java -sudo: false -dist: trusty - -addons: - apt: - packages: - - ca-certificates-java - - openjdk-7-jre-headless - -jdk: - - openjdk7 - -after_success: - - if [[ "${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}" == 'master' ]]; then - mvn deploy --settings .travis-settings.xml -DskipTests=true -B || travis_terminate 1; - fi - -cache: - directories: - - $HOME/.m2 diff --git a/README.md b/README.md new file mode 100644 index 0000000..a525274 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +Beehive +------- + +[![Build Status](https://ci.moparisthe.best/job/moparisthebest/job/beehive/job/master/badge/icon%3Fstyle=plastic)](https://ci.moparisthe.best/job/moparisthebest/job/beehive/job/master/) + +Releases are available on maven central, snapshots on oss.sonatype.org + +This is a (barely) maintained fork of beehive that still works with modern java, for legacy applications that still need beehive. You should NEVER use this in a new application, please use Spring or anything else. + +Whether you use this or not, I recommend [JdbcMapper](https://github.com/moparisthebest/JdbcMapper) as a drop-in, modern, safe replacement for beehive JdbcControls. + +Original README.txt +------------------- + +Welcome to Beehive! + +If you've come here to learn more about Beehive, here are a few +starting points: + +BUILDING.txt: How to build Beehive on your machine. +DEVELOPING.txt Technical notes on contributing/committing files. +LICENSE.txt: The Apache License and any other relevant licenses for this software. +NOTICE.txt: Attribution notices required by various contributions. + +The Apache Beehive website is located at: + + http://beehive.apache.org + +And, the Beehive wiki is located at: + + http://wiki.apache.org/beehive + +Both of these contain additionl resources for getting started +with developing or using Beehive. + diff --git a/README.txt b/README.txt deleted file mode 100644 index c3b3960..0000000 --- a/README.txt +++ /dev/null @@ -1,21 +0,0 @@ -Welcome to Beehive! - -If you've come here to learn more about Beehive, here are a few -starting points: - -BUILDING.txt: How to build Beehive on your machine. -DEVELOPING.txt Technical notes on contributing/committing files. -LICENSE.txt: The Apache License and any other relevant licenses for this software. -NOTICE.txt: Attribution notices required by various contributions. - -The Apache Beehive website is located at: - - http://beehive.apache.org - -And, the Beehive wiki is located at: - - http://wiki.apache.org/beehive - -Both of these contain additionl resources for getting started -with developing or using Beehive. -