Skip to content

Commit

Permalink
Add a Jenkinsfile
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Nephin <[email protected]>
  • Loading branch information
dnephin committed Aug 16, 2017
1 parent b5cb5ee commit 63d7606
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
12 changes: 12 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
wrappedNode(label: 'linux && x86_64', cleanWorkspace: true) {
timeout(time: 60, unit: 'MINUTES') {
stage "Git Checkout"
checkout scm

stage "Run end-to-end test suite"
sh "docker version"
sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
IMAGE_TAG=clie2e${BUILD_NUMBER} \
make -f docker.Makefile test-e2e"
}
}
10 changes: 5 additions & 5 deletions docker.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
# Makefile for developing using Docker
#

DEV_DOCKER_IMAGE_NAME = docker-cli-dev
LINTER_IMAGE_NAME = docker-cli-lint
CROSS_IMAGE_NAME = docker-cli-cross
VALIDATE_IMAGE_NAME = docker-cli-shell-validate
DEV_DOCKER_IMAGE_NAME = docker-cli-dev$(IMAGE_TAG)
LINTER_IMAGE_NAME = docker-cli-lint$(IMAGE_TAG)
CROSS_IMAGE_NAME = docker-cli-cross$(IMAGE_TAG)
VALIDATE_IMAGE_NAME = docker-cli-shell-validate$(IMAGE_TAG)
MOUNTS = -v "$(CURDIR)":/go/src/github.com/docker/cli
VERSION = $(shell cat VERSION)
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT
Expand Down Expand Up @@ -91,6 +91,6 @@ yamldocs: build_docker_image
shellcheck: build_shell_validate_image
docker run -ti --rm $(ENVVARS) $(MOUNTS) $(VALIDATE_IMAGE_NAME) make shellcheck

.PHONY: test-e2e:
.PHONY: test-e2e
test-e2e: binary
./scripts/test/e2e/wrapper
6 changes: 4 additions & 2 deletions dockerfiles/Dockerfile.test-e2e-env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ FROM docker/compose:1.15.0

RUN apk add -U bash curl

RUN curl -Ls https://download.docker.com/linux/static/edge/x86_64/docker-17.06.0-ce.tgz | \
ARG DOCKER_CHANNEL=edge
ARG DOCKER_VERSION=17.06.0-ce
RUN export URL=https://download.docker.com/linux/static; \
curl -Ls $URL/$DOCKER_CHANNEL/x86_64/docker-$DOCKER_VERSION.tgz | \
tar -xz docker/docker && \
mv docker/docker /usr/local/bin/ && \
rmdir docker
Expand All @@ -12,4 +15,3 @@ COPY scripts/test/e2e scripts/test/e2e
COPY e2e/compose-env.yaml e2e/compose-env.yaml

ENTRYPOINT ["bash", "/work/scripts/test/e2e/run"]
CMD []
2 changes: 1 addition & 1 deletion e2e/compose-env.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '3.3'
version: '2.1'

services:
registry:
Expand Down

0 comments on commit 63d7606

Please sign in to comment.