Move docker dep commands to earlier in the build
This will let Docker cache the results of the vendor dependencies. Making re-builds during testing faster. Also clean-up spurious test & rm in ./configure
This commit is contained in:
		
							parent
							
								
									d7e88a4718
								
							
						
					
					
						commit
						816c2a6da9
					
				|  | @ -31,6 +31,7 @@ | ||||||
| 
 | 
 | ||||||
| ## Changes since v3.2.0 | ## Changes since v3.2.0 | ||||||
| 
 | 
 | ||||||
|  | - [#209](https://github.com/pusher/outh2_proxy/pull/209) Improve docker build caching of layers (@dekimsey) | ||||||
| - [#186](https://github.com/pusher/oauth2_proxy/pull/186) Make config consistent (@JoelSpeed) | - [#186](https://github.com/pusher/oauth2_proxy/pull/186) Make config consistent (@JoelSpeed) | ||||||
| - [#187](https://github.com/pusher/oauth2_proxy/pull/187) Move root packages to pkg folder (@JoelSpeed) | - [#187](https://github.com/pusher/oauth2_proxy/pull/187) Move root packages to pkg folder (@JoelSpeed) | ||||||
| - [#65](https://github.com/pusher/oauth2_proxy/pull/65) Improvements to authenticate requests with a JWT bearer token in the `Authorization` header via | - [#65](https://github.com/pusher/oauth2_proxy/pull/65) Improvements to authenticate requests with a JWT bearer token in the `Authorization` header via | ||||||
|  |  | ||||||
|  | @ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s | ||||||
| 
 | 
 | ||||||
| # Copy sources | # Copy sources | ||||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||||
| COPY . . |  | ||||||
| 
 | 
 | ||||||
| # Fetch dependencies | # Fetch dependencies | ||||||
|  | COPY Gopkg.toml Gopkg.lock ./ | ||||||
| RUN dep ensure --vendor-only | RUN dep ensure --vendor-only | ||||||
| 
 | 
 | ||||||
|  | # Now pull in our code | ||||||
|  | COPY . . | ||||||
|  | 
 | ||||||
| # Build binary and make sure there is at least an empty key file. | # Build binary and make sure there is at least an empty key file. | ||||||
| #  This is useful for GCP App Engine custom runtime builds, because | #  This is useful for GCP App Engine custom runtime builds, because | ||||||
| #  you cannot use multiline variables in their app.yaml, so you have to | #  you cannot use multiline variables in their app.yaml, so you have to | ||||||
|  |  | ||||||
|  | @ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s | ||||||
| 
 | 
 | ||||||
| # Copy sources | # Copy sources | ||||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||||
| COPY . . |  | ||||||
| 
 | 
 | ||||||
| # Fetch dependencies | # Fetch dependencies | ||||||
|  | COPY Gopkg.toml Gopkg.lock ./ | ||||||
| RUN dep ensure --vendor-only | RUN dep ensure --vendor-only | ||||||
| 
 | 
 | ||||||
|  | # Now pull in our code | ||||||
|  | COPY . . | ||||||
|  | 
 | ||||||
| # Build binary and make sure there is at least an empty key file. | # Build binary and make sure there is at least an empty key file. | ||||||
| #  This is useful for GCP App Engine custom runtime builds, because | #  This is useful for GCP App Engine custom runtime builds, because | ||||||
| #  you cannot use multiline variables in their app.yaml, so you have to | #  you cannot use multiline variables in their app.yaml, so you have to | ||||||
|  |  | ||||||
|  | @ -7,11 +7,14 @@ RUN curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.s | ||||||
| 
 | 
 | ||||||
| # Copy sources | # Copy sources | ||||||
| WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | WORKDIR $GOPATH/src/github.com/pusher/oauth2_proxy | ||||||
| COPY . . |  | ||||||
| 
 | 
 | ||||||
| # Fetch dependencies | # Fetch dependencies | ||||||
|  | COPY Gopkg.toml Gopkg.lock ./ | ||||||
| RUN dep ensure --vendor-only | RUN dep ensure --vendor-only | ||||||
| 
 | 
 | ||||||
|  | # Now pull in our code | ||||||
|  | COPY . . | ||||||
|  | 
 | ||||||
| # Build binary and make sure there is at least an empty key file. | # Build binary and make sure there is at least an empty key file. | ||||||
| #  This is useful for GCP App Engine custom runtime builds, because | #  This is useful for GCP App Engine custom runtime builds, because | ||||||
| #  you cannot use multiline variables in their app.yaml, so you have to | #  you cannot use multiline variables in their app.yaml, so you have to | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue