mirror of
https://github.com/docker/compose.git
synced 2025-07-21 12:44:54 +02:00
Merge pull request #2145 from dnephin/update_release_scripts
Update release scripts for release image
This commit is contained in:
commit
c8cd618df9
@ -7,9 +7,7 @@ RUN apk -U add \
|
|||||||
COPY requirements.txt /code/requirements.txt
|
COPY requirements.txt /code/requirements.txt
|
||||||
RUN pip install -r /code/requirements.txt
|
RUN pip install -r /code/requirements.txt
|
||||||
|
|
||||||
ENV VERSION 1.4.0dev
|
ADD dist/docker-compose-release.tar.gz /code/docker-compose
|
||||||
|
RUN pip install /code/docker-compose/docker-compose-*
|
||||||
COPY dist/docker-compose-$VERSION.tar.gz /code/docker-compose/
|
|
||||||
RUN pip install /code/docker-compose/docker-compose-$VERSION/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/bin/docker-compose"]
|
ENTRYPOINT ["/usr/bin/docker-compose"]
|
||||||
|
@ -68,7 +68,7 @@ To install Compose, do the following:
|
|||||||
Compose can also be run inside a container, from a small bash script wrapper.
|
Compose can also be run inside a container, from a small bash script wrapper.
|
||||||
To install compose as a container run:
|
To install compose as a container run:
|
||||||
|
|
||||||
$ curl -L https://github.com/docker/compose/releases/download/1.5.0/compose-run > /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
|
||||||
|
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ When prompted build the non-linux binaries and test them.
|
|||||||
|
|
||||||
...release notes go here...
|
...release notes go here...
|
||||||
|
|
||||||
5. Attach the binaries.
|
5. Attach the binaries and `script/run.sh`
|
||||||
|
|
||||||
6. If everything looks good, it's time to push the release.
|
6. If everything looks good, it's time to push the release.
|
||||||
|
|
||||||
|
16
script/build-image
Executable file
16
script/build-image
Executable file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
>&2 echo "First argument must be image tag."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TAG=$1
|
||||||
|
VERSION="$(python setup.py --version)"
|
||||||
|
|
||||||
|
python setup.py sdist
|
||||||
|
cp dist/docker-compose-$VERSION.tar.gz dist/docker-compose-release.tar.gz
|
||||||
|
docker build -t docker/compose:$TAG -f Dockerfile.run .
|
||||||
|
|
@ -5,6 +5,19 @@
|
|||||||
|
|
||||||
. "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
|
. "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
|
||||||
|
|
||||||
|
function usage() {
|
||||||
|
>&2 cat << EOM
|
||||||
|
Build binaries for the release.
|
||||||
|
|
||||||
|
This script requires that 'git config branch.${BRANCH}.release' is set to the
|
||||||
|
release version for the release branch.
|
||||||
|
|
||||||
|
EOM
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||||
|
VERSION="$(git config "branch.${BRANCH}.release")" || usage
|
||||||
REPO=docker/compose
|
REPO=docker/compose
|
||||||
|
|
||||||
# Build the binaries
|
# Build the binaries
|
||||||
@ -16,6 +29,9 @@ script/build-linux
|
|||||||
# TODO: build or fetch the windows binary
|
# TODO: build or fetch the windows binary
|
||||||
echo "You need to build the osx/windows binaries, that step is not automated yet."
|
echo "You need to build the osx/windows binaries, that step is not automated yet."
|
||||||
|
|
||||||
|
echo "Building the container distribution"
|
||||||
|
script/build-image $VERSION
|
||||||
|
|
||||||
echo "Create a github release"
|
echo "Create a github release"
|
||||||
# TODO: script more of this https://developer.github.com/v3/repos/releases/
|
# TODO: script more of this https://developer.github.com/v3/repos/releases/
|
||||||
browser https://github.com/$REPO/releases/new
|
browser https://github.com/$REPO/releases/new
|
||||||
|
@ -46,6 +46,9 @@ git push $GITHUB_REPO $VERSION
|
|||||||
echo "Uploading sdist to pypi"
|
echo "Uploading sdist to pypi"
|
||||||
python setup.py sdist
|
python setup.py sdist
|
||||||
|
|
||||||
|
echo "Uploading the docker image"
|
||||||
|
docker push docker/compose:$VERSION
|
||||||
|
|
||||||
if [ "$(command -v twine 2> /dev/null)" ]; then
|
if [ "$(command -v twine 2> /dev/null)" ]; then
|
||||||
twine upload ./dist/docker-compose-${VERSION}.tar.gz
|
twine upload ./dist/docker-compose-${VERSION}.tar.gz
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user