Skip to content
Snippets Groups Projects
Unverified Commit d9fdc6b7 authored by Davis Bickford's avatar Davis Bickford
Browse files

Merge branch 'fix-pipeline-failures' of...

Merge branch 'fix-pipeline-failures' of gitlab.com:gitlab-org/ci-cd/docker-machine into dbickford-add-darwin-arm64-build
parents de43e713 f264bcea
No related branches found
No related tags found
No related merge requests found
FROM golang:1.13.15-alpine3.12 FROM golang:1.13.15-alpine3.12
# Force build - 2022-10-03T17:42:00+0000
RUN apk add --no-cache make git py-pip bash curl && \ RUN apk add --no-cache make git py-pip bash curl && \
pip install awscli pip install awscli
...@@ -6,11 +6,18 @@ __aws_s3_sync() { ...@@ -6,11 +6,18 @@ __aws_s3_sync() {
local source="$1" local source="$1"
local target="$2" local target="$2"
local awsDebug=""
if [[ -n "${DEBUG_AWS_CLI}" ]]; then
awsDebug="--debug"
fi
echo -e "\033[32;1mSyncing with ${target}\033[0m"
if [[ "${DEBUG_S3_SYNC}" == "true" ]]; then if [[ "${DEBUG_S3_SYNC}" == "true" ]]; then
set -x set -x
fi fi
aws s3 sync "${source}" "${target}" --acl public-read aws ${awsDebug} --color on s3 sync "${source}" "${target}" --acl public-read
set +x set +x
} }
...@@ -40,9 +47,18 @@ echo "Generated Index page" ...@@ -40,9 +47,18 @@ echo "Generated Index page"
__aws_s3_sync bin "${S3_URL}" __aws_s3_sync bin "${S3_URL}"
set -x
git -c versionsort.prereleaseSuffix="-rc" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1
set +x
# Copy the binaries to the latest directory. # Copy the binaries to the latest directory.
LATEST_STABLE_TAG=$(git -c versionsort.prereleaseSuffix="-rc" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1) LATEST_STABLE_TAG=$(git -c versionsort.prereleaseSuffix="-rc" tag -l "v*.*.*" --sort=-v:refname | awk '!/rc/' | head -n 1)
echo "Latest stable tag is: ${LATEST_STABLE_TAG}"
if [ $(git describe --exact-match --match ${LATEST_STABLE_TAG} >/dev/null 2>&1) ]; then if [ $(git describe --exact-match --match ${LATEST_STABLE_TAG} >/dev/null 2>&1) ]; then
echo "Syncing the 'latest' bucket"
__aws_s3_sync bin "s3://${S3_BUCKET}/latest" __aws_s3_sync bin "s3://${S3_BUCKET}/latest"
fi fi
......
...@@ -7,8 +7,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ...@@ -7,8 +7,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
sshfs \ sshfs \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
RUN GO111MODULE=on go get golang.org/x/lint/golint \ ENV GO111MODULE=on
golang.org/x/tools/cover
RUN go get golang.org/x/tools@v0.1.12
RUN go get golang.org/x/lint/golint
RUN go get golang.org/x/tools/cover
ENV GO111MODULE=off
ENV USER root ENV USER root
WORKDIR /go/src/github.com/docker/machine WORKDIR /go/src/github.com/docker/machine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment