Abandon travis-ci for jenkins

This commit is contained in:
Travis Burtrum 2020-11-23 16:38:56 -05:00
parent 5b79867caa
commit 3ec5970836
4 changed files with 59 additions and 10 deletions

42
.ci/Jenkinsfile vendored Normal file
View File

@ -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()
}
}

16
.ci/build.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -exo pipefail
echo "starting build for TARGET $TARGET"
DISABLE_TESTS=${DISABLE_TESTS:-0}
cross build --target $TARGET
if [ $DISABLE_TESTS -ne 1 ]
then
cross test --target $TARGET
fi
echo 'build success!'
exit 0

View File

@ -1,9 +0,0 @@
language: rust
matrix:
include:
- rust: stable
- rust: beta
- rust: nightly
script:
- cargo test

View File

@ -1,6 +1,6 @@
# die
[![Build Status](https://travis-ci.com/moparisthebest/die.svg?branch=master)](https://travis-ci.com/moparisthebest/die)
[![Build Status](https://ci.moparisthe.best/job/moparisthebest/job/die/job/master/badge/icon%3Fstyle=plastic)](https://ci.moparisthe.best/job/moparisthebest/job/die/job/master/)
[![Latest Version](https://img.shields.io/crates/v/die.svg)](https://crates.io/crates/die)
[![Documentation](https://docs.rs/die/badge.svg)](https://docs.rs/die)