Upload artifacts as part of the Travis build
This commit is contained in:
parent
0ffe859513
commit
233843bcb6
2 changed files with 18 additions and 5 deletions
13
.travis.yml
13
.travis.yml
|
@ -2,6 +2,13 @@ language: c
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
|
addons:
|
||||||
|
artifacts:
|
||||||
|
target_paths:
|
||||||
|
- /dumb-init/${TRAVIS_BUILD_NUMBER}/${ITEST_TARGET}
|
||||||
|
paths:
|
||||||
|
- $(find dist -type f | tr "\n" ':')
|
||||||
|
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- ITEST_TARGET=itest_trusty
|
- ITEST_TARGET=itest_trusty
|
||||||
|
@ -13,3 +20,9 @@ env:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- make "$ITEST_TARGET"
|
- make "$ITEST_TARGET"
|
||||||
|
|
||||||
|
after_script:
|
||||||
|
- if [ -n "${ARTIFACTS_SECRET:-}" ]; then
|
||||||
|
echo 'Build artifacts are available at:';
|
||||||
|
find dist -type f | xargs --replace echo "* https://yelp-travis-artifacts.s3.amazonaws.com/dumb-init/${TRAVIS_BUILD_NUMBER}/${ITEST_TARGET}/{}";
|
||||||
|
fi
|
||||||
|
|
10
Makefile
10
Makefile
|
@ -4,6 +4,7 @@ CFLAGS=-std=gnu99 -static -s -Wall -Werror -O3
|
||||||
TEST_PACKAGE_DEPS := build-essential python python-pip procps python-dev python-setuptools
|
TEST_PACKAGE_DEPS := build-essential python python-pip procps python-dev python-setuptools
|
||||||
|
|
||||||
DOCKER_RUN_TEST := docker run -v $(PWD):/mnt:ro
|
DOCKER_RUN_TEST := docker run -v $(PWD):/mnt:ro
|
||||||
|
VERSION = $(shell cat VERSION)
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: VERSION.h
|
build: VERSION.h
|
||||||
|
@ -24,11 +25,6 @@ clean-tox:
|
||||||
|
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: python-dists builddeb-docker
|
release: python-dists builddeb-docker
|
||||||
$(eval VERSION := $(shell cat VERSION))
|
|
||||||
# extract the built binary from the Debian package
|
|
||||||
dpkg-deb --fsys-tarfile dist/dumb-init_$(VERSION)_amd64.deb | \
|
|
||||||
tar -C dist --strip=3 -xvf - ./usr/bin/dumb-init
|
|
||||||
mv dist/dumb-init dist/dumb-init_$(VERSION)_amd64
|
|
||||||
cd dist && \
|
cd dist && \
|
||||||
sha256sum --binary dumb-init_$(VERSION)_amd64.deb dumb-init_$(VERSION)_amd64 \
|
sha256sum --binary dumb-init_$(VERSION)_amd64.deb dumb-init_$(VERSION)_amd64 \
|
||||||
> sha256sums
|
> sha256sums
|
||||||
|
@ -50,6 +46,10 @@ builddeb:
|
||||||
debuild --set-envvar=CC=musl-gcc -us -uc -b
|
debuild --set-envvar=CC=musl-gcc -us -uc -b
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
mv ../dumb-init_*.deb dist/
|
mv ../dumb-init_*.deb dist/
|
||||||
|
# Extract the built binary from the Debian package
|
||||||
|
dpkg-deb --fsys-tarfile dist/dumb-init_$(VERSION)_$(shell dpkg --print-architecture).deb | \
|
||||||
|
tar -C dist --strip=3 -xvf - ./usr/bin/dumb-init
|
||||||
|
mv dist/dumb-init dist/dumb-init_$(VERSION)_$(shell dpkg --print-architecture)
|
||||||
|
|
||||||
.PHONY: builddeb-docker
|
.PHONY: builddeb-docker
|
||||||
builddeb-docker: docker-image
|
builddeb-docker: docker-image
|
||||||
|
|
Loading…
Reference in a new issue