1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #21511 from tiborvass/fix-release-scripts

Fix release scripts
This commit is contained in:
Arnaud Porterie 2016-03-25 10:34:09 -07:00
commit ed95d753b4
8 changed files with 21 additions and 25 deletions

View file

@ -38,9 +38,11 @@ RUN echo deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty main > /etc/apt/s
# Packaged dependencies # Packaged dependencies
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
apparmor \ apparmor \
apt-utils \
aufs-tools \ aufs-tools \
automake \ automake \
bash-completion \ bash-completion \
bsdmainutils \
btrfs-tools \ btrfs-tools \
build-essential \ build-essential \
clang-3.8 \ clang-3.8 \
@ -64,12 +66,12 @@ RUN apt-get update && apt-get install -y \
python-mock \ python-mock \
python-pip \ python-pip \
python-websocket \ python-websocket \
s3cmd=1.5.0* \
ubuntu-zfs \ ubuntu-zfs \
xfsprogs \ xfsprogs \
libzfs-dev \ libzfs-dev \
tar \ tar \
--no-install-recommends \ --no-install-recommends \
&& pip install awscli==1.10.15 \
&& ln -snf /usr/bin/clang-3.8 /usr/local/bin/clang \ && ln -snf /usr/bin/clang-3.8 /usr/local/bin/clang \
&& ln -snf /usr/bin/clang++-3.8 /usr/local/bin/clang++ && ln -snf /usr/bin/clang++-3.8 /usr/local/bin/clang++
@ -187,13 +189,6 @@ RUN git clone https://github.com/docker/docker-py.git /docker-py \
&& git checkout -q $DOCKER_PY_COMMIT \ && git checkout -q $DOCKER_PY_COMMIT \
&& pip install -r test-requirements.txt && pip install -r test-requirements.txt
# Setup s3cmd config
RUN { \
echo '[default]'; \
echo 'access_key=$AWS_ACCESS_KEY'; \
echo 'secret_key=$AWS_SECRET_KEY'; \
} > ~/.s3cfg
# Set user.email so crosbymichael's in-container merge commits go smoothly # Set user.email so crosbymichael's in-container merge commits go smoothly
RUN git config --global user.email 'docker-dummy@example.com' RUN git config --global user.email 'docker-dummy@example.com'

View file

@ -136,13 +136,6 @@ RUN git clone https://github.com/docker/docker-py.git /docker-py \
&& git checkout -q $DOCKER_PY_COMMIT \ && git checkout -q $DOCKER_PY_COMMIT \
&& pip install -r test-requirements.txt && pip install -r test-requirements.txt
# Setup s3cmd config
RUN { \
echo '[default]'; \
echo 'access_key=$AWS_ACCESS_KEY'; \
echo 'secret_key=$AWS_SECRET_KEY'; \
} > ~/.s3cfg
# Set user.email so crosbymichael's in-container merge commits go smoothly # Set user.email so crosbymichael's in-container merge commits go smoothly
RUN git config --global user.email 'docker-dummy@example.com' RUN git config --global user.email 'docker-dummy@example.com'

View file

@ -20,7 +20,7 @@ set -e
# To update this script on https://get.docker.com, # To update this script on https://get.docker.com,
# use hack/release.sh during a normal release, # use hack/release.sh during a normal release,
# or the following one-liner for script hotfixes: # or the following one-liner for script hotfixes:
# s3cmd put --acl-public -P hack/install.sh s3://get.docker.com/index # aws s3 cp --acl public-read hack/install.sh s3://get.docker.com/index
# #
url="https://get.docker.com/" url="https://get.docker.com/"

View file

@ -9,6 +9,13 @@ if ! command -v docker &> /dev/null; then
false false
fi fi
if [ -z "$DOCKER_TEST_HOST" ]; then
if docker version &> /dev/null; then
echo >&2 'skipping daemon start, since daemon appears to be already started'
return
fi
fi
# intentionally open a couple bogus file descriptors to help test that they get scrubbed in containers # intentionally open a couple bogus file descriptors to help test that they get scrubbed in containers
exec 41>&1 42>&2 exec 41>&1 42>&2

View file

@ -14,6 +14,7 @@ set -e
# #
# ... and so on and so forth for the builds created by hack/make/build-deb # ... and so on and so forth for the builds created by hack/make/build-deb
source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch" source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch"
: ${DOCKER_RELEASE_DIR:=$DEST} : ${DOCKER_RELEASE_DIR:=$DEST}

View file

@ -14,6 +14,7 @@ set -e
# #
# ... and so on and so forth for the builds created by hack/make/build-rpm # ... and so on and so forth for the builds created by hack/make/build-rpm
source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch" source "$(dirname "$BASH_SOURCE")/.detect-daemon-osarch"
: ${DOCKER_RELEASE_DIR:=$DEST} : ${DOCKER_RELEASE_DIR:=$DEST}

View file

@ -43,7 +43,7 @@ cd /go/src/github.com/docker/docker
[ -x hack/make.sh ] || usage [ -x hack/make.sh ] || usage
export AWS_DEFAULT_REGION export AWS_DEFAULT_REGION
: ${AWS_DEFAULT_REGION:=us-west-2} : ${AWS_DEFAULT_REGION:=us-west-1}
RELEASE_BUNDLES=( RELEASE_BUNDLES=(
binary binary
@ -79,8 +79,6 @@ fi
setup_s3() { setup_s3() {
echo "Setting up S3" echo "Setting up S3"
# TODO: Move to Dockerfile
pip install awscli==1.10.15
# Try creating the bucket. Ignore errors (it might already exist). # Try creating the bucket. Ignore errors (it might already exist).
aws s3 mb "s3://$BUCKET" 2>/dev/null || true aws s3 mb "s3://$BUCKET" 2>/dev/null || true
# Check access to the bucket. # Check access to the bucket.
@ -104,8 +102,7 @@ s3_url() {
echo "https://$BUCKET_PATH" echo "https://$BUCKET_PATH"
;; ;;
*) *)
# TODO: remove s3cmd dependency BASE_URL="http://${BUCKET}.s3-website-${AWS_DEFAULT_REGION}.amazonaws.com"
BASE_URL=$( s3cmd ws-info s3://$BUCKET | awk -v 'FS=: +' '/http:\/\/'$BUCKET'/ { gsub(/\/+$/, "", $2); print $2 }' )
if [[ -n "$AWS_S3_BUCKET_PATH" ]] ; then if [[ -n "$AWS_S3_BUCKET_PATH" ]] ; then
echo "$BASE_URL/$AWS_S3_BUCKET_PATH" echo "$BASE_URL/$AWS_S3_BUCKET_PATH"
else else

View file

@ -270,8 +270,9 @@ docker build -t docker .
# static binaries are still pushed to s3 # static binaries are still pushed to s3
docker run \ docker run \
-e AWS_S3_BUCKET=test.docker.com \ -e AWS_S3_BUCKET=test.docker.com \
-e AWS_ACCESS_KEY \ -e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_KEY \ -e AWS_SECRET_ACCESS_KEY \
-e AWS_DEFAULT_REGION \
-i -t --privileged \ -i -t --privileged \
docker \ docker \
hack/release.sh hack/release.sh
@ -434,8 +435,9 @@ docker build -t docker .
# static binaries are still pushed to s3 # static binaries are still pushed to s3
docker run \ docker run \
-e AWS_S3_BUCKET=get.docker.com \ -e AWS_S3_BUCKET=get.docker.com \
-e AWS_ACCESS_KEY \ -e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_KEY \ -e AWS_SECRET_ACCESS_KEY \
-e AWS_DEFAULT_REGION \
-i -t --privileged \ -i -t --privileged \
docker \ docker \
hack/release.sh hack/release.sh