This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- .git
21* .dockerapp
32* .tar.gz
43_build /
Original file line number Diff line number Diff line change @@ -18,6 +18,9 @@ RUN curl -Ls https://download.docker.com/linux/static/$DOCKERCLI_CHANNEL/x86_64/
1818WORKDIR /go/src/github.com/docker/app/
1919
2020FROM build AS dev
21+ ARG DEP_VERSION=v0.4.1
22+ RUN curl -o /usr/bin/dep -L https://github.com/golang/dep/releases/download/${DEP_VERSION}/dep-linux-amd64 && \
23+ chmod +x /usr/bin/dep
2124COPY . .
2225
2326FROM dev AS docker-app
Original file line number Diff line number Diff line change @@ -11,37 +11,51 @@ pipeline {
1111
1212 stages {
1313 stage(' Build' ) {
14- agent {
15- label ' linux '
16- }
17- steps {
18- dir( ' src/github.com/docker/app ' ) {
19- script {
20- try {
14+ parallel {
15+ stage( " Validate " ) {
16+ agent {
17+ label ' linux '
18+ }
19+ steps {
20+ dir( ' src/github.com/docker/app ' ) {
2121 checkout scm
22- sh ' docker image prune -f'
2322 sh ' make -f docker.Makefile lint'
24- sh ' make -f docker.Makefile cross e2e-cross tars'
25- dir(' bin' ) {
26- stash name : ' binaries'
27- }
28- dir(' e2e' ) {
29- stash name : ' e2e'
30- }
31- if (! (env. BRANCH_NAME ==~ " PR-\\ d+" )) {
32- stash name : ' artifacts' , includes : ' bin/*.tar.gz' , excludes : ' bin/*-e2e-*'
33- archiveArtifacts ' bin/*.tar.gz'
34- }
35- } finally {
36- def clean_images = / docker image ls --format "{{.ID}}\t {{.Tag}}" | grep $(git describe --always --dirty) | awk '{print $1}' | xargs docker image rm -f/
37- sh clean_images
23+ sh ' make -f docker.Makefile vendor'
3824 }
3925 }
4026 }
41- }
42- post {
43- always {
44- deleteDir()
27+ stage(" Binaries" ){
28+ agent {
29+ label ' linux'
30+ }
31+ steps {
32+ dir(' src/github.com/docker/app' ) {
33+ script {
34+ try {
35+ checkout scm
36+ sh ' make -f docker.Makefile cross e2e-cross tars'
37+ dir(' bin' ) {
38+ stash name : ' binaries'
39+ }
40+ dir(' e2e' ) {
41+ stash name : ' e2e'
42+ }
43+ if (! (env. BRANCH_NAME ==~ " PR-\\ d+" )) {
44+ stash name : ' artifacts' , includes : ' bin/*.tar.gz' , excludes : ' bin/*-e2e-*'
45+ archiveArtifacts ' bin/*.tar.gz'
46+ }
47+ } finally {
48+ def clean_images = / docker image ls --format "{{.ID}}\t {{.Tag}}" | grep $(git describe --always --dirty) | awk '{print $1}' | xargs docker image rm -f/
49+ sh clean_images
50+ }
51+ }
52+ }
53+ }
54+ post {
55+ always {
56+ deleteDir()
57+ }
58+ }
4559 }
4660 }
4761 }
Original file line number Diff line number Diff line change 6868 $(call rm,_build)
6969 $(call rm,docker-app-* .tar.gz)
7070
71- .PHONY : cross e2e-cross test check lint test-unit test-e2e coverage coverage-bin coverage-test-unit coverage-test-e2e clean
71+ vendor :
72+ $(call rm,vendor)
73+ dep ensure -v
74+
75+ .PHONY : cross e2e-cross test check lint test-unit test-e2e coverage coverage-bin coverage-test-unit coverage-test-e2e clean vendor
7276.DEFAULT : all
Original file line number Diff line number Diff line change @@ -82,8 +82,12 @@ gradle-test:
8282 docker run --rm $(GRADLE_IMAGE_NAME ) bash -c " ./gradlew --stacktrace build && cd example && gradle renderIt"
8383
8484lint :
85- @echo " Linting..."
85+ $( info Linting...)
8686 docker build -t $(LINT_IMAGE_NAME ) $(IMAGE_BUILD_ARGS ) -f Dockerfile.lint .
8787 docker run --rm $(LINT_IMAGE_NAME ) make lint
8888
89- .PHONY : lint test-e2e test-unit test cross e2e-cross coverage gradle-test shell build_dev_image tars
89+ vendor : build_dev_image
90+ $(info Vendoring...)
91+ docker run --rm $(DEV_IMAGE_NAME ) sh -c " make BUILDTIME=${BUILDTIME} vendor && hack/check-git-diff vendor"
92+
93+ .PHONY : lint test-e2e test-unit test cross e2e-cross coverage gradle-test shell build_dev_image tars vendor
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ set -eu
4+
5+ DIFF_PATH=$1
6+ DIFF=$( git status --porcelain -- " $DIFF_PATH " )
7+
8+ if [ " $DIFF " ]; then
9+ echo
10+ echo " These files were changed:"
11+ echo
12+ echo " $DIFF "
13+ echo
14+ exit 1
15+ else
16+ echo " $DIFF_PATH is correct"
17+ fi ;
You can’t perform that action at this time.
0 commit comments