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 0b1d428 commit f8fa26f
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 59 deletions.
43 changes: 43 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
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 -s -- -l c -b ./build.sh'
}

currentBuild.result = 'SUCCESS'
} catch (Exception err) {
currentBuild.result = 'FAILURE'
} finally {
stage('Email') {
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: '[email protected]', sendToIndividuals: true])
}
sh './bin/build.sh docker-chown'
deleteDir()
}
}
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:mechanical_arm: Static curl :mechanical_arm:
-----------
[![Travis-CI Build Status](https://api.travis-ci.org/moparisthebest/static-curl.svg?branch=master)](https://travis-ci.org/moparisthebest/static-curl)
[![Build Status](https://ci.moparisthe.best/job/moparisthebest/job/static-curl/job/master/badge/icon%3Fstyle=plastic)](https://ci.moparisthe.best/job/moparisthebest/job/static-curl/job/master/)

These are a couple simple scripts to build a fully static curl binary using alpine linux docker containers. Currently it is a featureful build with OpenSSL, libssh2, nghttp2, and zlib, supporting most protocols. Tweak configure options in [build.sh](build.sh#L50) if you need something else (and/or suggest or PR).

Expand All @@ -18,5 +18,4 @@ Development

File explanation:
- [build.sh](build.sh) - runs inside an alpine docker container, downloads curl, verifies it with gpg, and builds it
- [docker_build.sh](docker_build.sh) - runs build.sh inside docker
- [mykey.asc](mykey.asc) - Daniel Stenberg's [GPG key](https://daniel.haxx.se/address.html) used for signing/verifying curl releases
19 changes: 9 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
#!/bin/sh

# to test locally, run one of:
# docker run --rm -v $(pwd):/tmp alpine /tmp/build.sh
# docker run --rm -v $(pwd):/tmp multiarch/alpine:armhf-latest-stable /tmp/build.sh
# docker run --rm -v $(pwd):/tmp i386/alpine /tmp/build.sh
# docker run --rm -v $(pwd):/tmp ALPINE_IMAGE_HERE /tmp/build.sh
# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=amd64 alpine /tmp/build.sh
# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=aarch64 multiarch/alpine:aarch64-latest-stable /tmp/build.sh
# docker run --rm -v $(pwd):/tmp -w /tmp -e ARCH=ARCH_HERE ALPINE_IMAGE_HERE /tmp/build.sh

CURL_VERSION='7.73.0'

[ "$1" != ""] && CURL_VERSION="$1"
[ "$1" != "" ] && CURL_VERSION="$1"

set -exu

# change to the directory this script is in, we assume mykey.asc is there
cd "$(dirname "$0")"

if [ ! -f curl-${CURL_VERSION}.tar.gz ]
then

Expand Down Expand Up @@ -63,5 +59,8 @@ ldd src/curl || true

#./src/curl -v http://www.moparisthebest.com/; ./src/curl -v https://www.moparisthebest.com/ip

# we only want to save curl here, by moving it to /tmp/ for now
mv src/curl /tmp/
# we only want to save curl here
mkdir -p /tmp/release/
mv src/curl "/tmp/release/curl-$ARCH"
cd ..
rm -rf "curl-${CURL_VERSION}/"
21 changes: 0 additions & 21 deletions docker_build.sh

This file was deleted.

0 comments on commit f8fa26f

Please sign in to comment.