Skip to content

Commit

Permalink
Abandon travis-ci for jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
moparisthebest committed Nov 27, 2020
1 parent a922e4a commit 9ca4366
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 37 deletions.
42 changes: 42 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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: '[email protected]', sendToIndividuals: true])
}
deleteDir()
}
}
25 changes: 25 additions & 0 deletions .ci/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
set -euxo pipefail

[ $JAVA_VERSION -lt 8 ] && echo "build does not support JAVA_VERSION: $JAVA_VERSION" && exit 0

echo "starting build for JAVA_VERSION: $JAVA_VERSION"

# install deps
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V

# clean and test
mvn clean test -B

# publish only from java 8 and master branch
if [ "$BRANCH_NAME" == "master" -a $JAVA_VERSION -eq 8 ]
then
echo 'deploying to maven'
mvn deploy -Dmaven.test.skip=true -B

mkdir -p release
mv './jDnsProxy-all/target/jDnsProxy-all.jar' 'release/jDnsProxy.jar'
fi

echo 'build success!'
exit 0
9 changes: 0 additions & 9 deletions .travis-settings.xml

This file was deleted.

28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
jDnsProxy
---------

[![Build Status](https://ci.moparisthe.best/job/moparisthebest/job/jDnsProxy/job/master/badge/icon%3Fstyle=plastic)](https://ci.moparisthe.best/job/moparisthebest/job/jDnsProxy/job/master/)

Simple fast and lightweight DNS proxy and cache that listens on TCP or UDP ports and relays the request
to various upstream [DNS-over-TCP](https://tools.ietf.org/html/rfc1035), [DNS-over-TLS](https://tools.ietf.org/html/rfc7858),
or [DNS-over-HTTPS](https://tools.ietf.org/html/draft-hoffman-dns-over-https) servers, optionally over http or socks
Expand Down

0 comments on commit 9ca4366

Please sign in to comment.