Merge pull request #2154 from dnephin/publish_master_builds

Publish master builds to bintray
This commit is contained in:
mnowster 2015-10-13 14:50:25 +01:00
commit 4b845746ef
14 changed files with 119 additions and 7 deletions

View File

@ -5,6 +5,7 @@
- id: check-docstring-first - id: check-docstring-first
- id: check-merge-conflict - id: check-merge-conflict
- id: check-yaml - id: check-yaml
- id: check-json
- id: debug-statements - id: debug-statements
- id: end-of-file-fixer - id: end-of-file-fixer
- id: flake8 - id: flake8

29
.travis.yml Normal file
View File

@ -0,0 +1,29 @@
sudo: required
language: python
services:
- docker
matrix:
include:
- os: linux
- os: osx
language: generic
install: ./script/travis/install
script:
- ./script/travis/ci
- ./script/travis/build-binary
before_deploy:
- "./script/travis/render-bintray-config.py < ./script/travis/bintray.json.tmpl > ./bintray.json"
deploy:
provider: bintray
user: docker-compose-roleuser
key: '$BINTRAY_API_KEY'
file: ./bintray.json
skip_cleanup: true

View File

@ -9,12 +9,20 @@ install:
# Build the binary after tests # Build the binary after tests
build: false build: false
environment:
BINTRAY_USER: "docker-compose-roleuser"
BINTRAY_PATH: "docker-compose/master/windows/master/docker-compose-Windows-x86_64.exe"
test_script: test_script:
- "tox -e py27,py34 -- tests/unit" - "tox -e py27,py34 -- tests/unit"
after_test:
- ps: ".\\script\\build-windows.ps1" - ps: ".\\script\\build-windows.ps1"
deploy_script:
- "curl -sS
-u \"%BINTRAY_USER%:%BINTRAY_API_KEY%\"
-X PUT \"https://api.bintray.com/content/%BINTRAY_PATH%?override=1&publish=1\"
--data-binary @dist\\docker-compose-Windows-x86_64.exe"
artifacts: artifacts:
- path: .\dist\docker-compose-Windows-x86_64.exe - path: .\dist\docker-compose-Windows-x86_64.exe
name: "Compose Windows binary" name: "Compose Windows binary"

View File

@ -71,6 +71,13 @@ To install compose as a container run:
$ curl -L https://github.com/docker/compose/releases/download/1.5.0/run.sh > /usr/local/bin/docker-compose $ curl -L https://github.com/docker/compose/releases/download/1.5.0/run.sh > /usr/local/bin/docker-compose
$ chmod +x /usr/local/bin/docker-compose $ chmod +x /usr/local/bin/docker-compose
## Master builds
If you're interested in trying out a pre-release build you can download a
binary from https://dl.bintray.com/docker-compose/master/. Pre-release
builds allow you to try out new features before they are released, but may
be less stable.
## Upgrading ## Upgrading

View File

@ -13,4 +13,3 @@ VERSION="$(python setup.py --version)"
python setup.py sdist python setup.py sdist
cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz
docker build -t docker/compose:$TAG -f Dockerfile.run . docker build -t docker/compose:$TAG -f Dockerfile.run .

View File

@ -5,7 +5,7 @@ set -ex
./script/clean ./script/clean
TAG="docker-compose" TAG="docker-compose"
docker build -t "$TAG" . docker build -t "$TAG" . | tail -n 200
docker run \ docker run \
--rm --entrypoint="script/build-linux-inner" \ --rm --entrypoint="script/build-linux-inner" \
-v $(pwd)/dist:/code/dist \ -v $(pwd)/dist:/code/dist \

View File

@ -3,7 +3,6 @@ set -ex
PATH="/usr/local/bin:$PATH" PATH="/usr/local/bin:$PATH"
./script/clean
rm -rf venv rm -rf venv
virtualenv -p /usr/local/bin/python venv virtualenv -p /usr/local/bin/python venv

View File

@ -29,7 +29,6 @@
# .\script\build-windows.ps1 # .\script\build-windows.ps1
$ErrorActionPreference = "Stop" $ErrorActionPreference = "Stop"
Set-PSDebug -trace 1
# Remove virtualenv # Remove virtualenv
if (Test-Path venv) { if (Test-Path venv) {

View File

@ -24,7 +24,7 @@ if !(which brew); then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi fi
brew update brew update > /dev/null
if !(python_version | grep "$desired_python_version"); then if !(python_version | grep "$desired_python_version"); then
if brew list | grep python; then if brew list | grep python; then

View File

@ -0,0 +1,29 @@
{
"package": {
"name": "${TRAVIS_OS_NAME}",
"repo": "master",
"subject": "docker-compose",
"desc": "Automated build of master branch from travis ci.",
"website_url": "https://github.com/docker/compose",
"issue_tracker_url": "https://github.com/docker/compose/issues",
"vcs_url": "https://github.com/docker/compose.git",
"licenses": ["Apache-2.0"]
},
"version": {
"name": "master",
"desc": "Automated build of the master branch.",
"released": "${DATE}",
"vcs_tag": "master"
},
"files": [
{
"includePattern": "dist/(.*)",
"excludePattern": ".*\.tar.gz",
"uploadPattern": "$1",
"matrixParams": { "override": 1 }
}
],
"publish": true
}

13
script/travis/build-binary Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
set -ex
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
script/build-linux
script/build-image master
# TODO: requires auth
# docker push docker/compose:master
else
script/prepare-osx
script/build-osx
fi

10
script/travis/ci Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
tox -e py27,py34 -- tests/unit
else
# TODO: we could also install py34 and test against it
python -m tox -e py27 -- tests/unit
fi

9
script/travis/install Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -ex
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
pip install tox==2.1.1
else
pip install --user tox==2.1.1
fi

View File

@ -0,0 +1,9 @@
#!/usr/bin/env python
import datetime
import os.path
import sys
os.environ['DATE'] = str(datetime.date.today())
for line in sys.stdin:
print os.path.expandvars(line),