Skip to content

Commit

Permalink
build: Remove the release-builder image
Browse files Browse the repository at this point in the history
The release-builder image is no longer required because we only need
the base Go image to build the OPA binaries. The nodejs dependency was
only required for the docs which are handled by netlify now.

Signed-off-by: Torin Sandall <[email protected]>
  • Loading branch information
tsandall committed Aug 14, 2019
1 parent f99a240 commit 0093dca
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 40 deletions.
21 changes: 0 additions & 21 deletions Dockerfile_release-builder.in

This file was deleted.

16 changes: 3 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ BUILD_COMMIT := $(shell ./build/get-build-commit.sh)
BUILD_TIMESTAMP := $(shell ./build/get-build-timestamp.sh)
BUILD_HOSTNAME := $(shell ./build/get-build-hostname.sh)

RELEASE_BUILDER_VERSION := 1.3
RELEASE_BUILD_IMAGE := golang:$(GOVERSION)

LDFLAGS := "-X github.com/open-policy-agent/opa/version.Version=$(VERSION) \
-X github.com/open-policy-agent/opa/version.Vcs=$(BUILD_COMMIT) \
Expand Down Expand Up @@ -204,30 +204,20 @@ docs-%:
#
######################################################

.PHONY: release-builder
release-builder:
sed -e s/GOVERSION/$(GOVERSION)/g Dockerfile_release-builder.in > .Dockerfile_release-builder
docker build -f .Dockerfile_release-builder -t $(REPOSITORY)/release-builder:$(RELEASE_BUILDER_VERSION) -t $(REPOSITORY)/release-builder:latest .

.PHONY: push-release-builder
push-release-builder:
docker push $(REPOSITORY)/release-builder:latest
docker push $(REPOSITORY)/release-builder:$(RELEASE_BUILDER_VERSION)

.PHONY: release
release:
docker run -it --rm \
-v $(PWD)/_release/$(VERSION):/_release/$(VERSION) \
-v $(PWD):/_src \
$(REPOSITORY)/release-builder:$(RELEASE_BUILDER_VERSION) \
$(RELEASE_BUILD_IMAGE) \
/_src/build/build-release.sh --version=$(VERSION) --output-dir=/_release/$(VERSION) --source-url=/_src

.PHONY: release-local
release-local:
docker run -it --rm \
-v $(PWD)/_release/$(VERSION):/_release/$(VERSION) \
-v $(PWD):/_src \
$(REPOSITORY)/release-builder:$(RELEASE_BUILDER_VERSION) \
$(RELEASE_BUILD_IMAGE) \
/_src/build/build-release.sh --output-dir=/_release/$(VERSION) --source-url=/_src

.PHONY: release-patch
Expand Down
11 changes: 5 additions & 6 deletions docs/devel/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,8 @@ code is kept in the repository so that commands such as `go get` work.
## Go
If you need to update the version of Go that OPA's CI and release
builder use, update the Go version in the Makefile and .travis.yml
files. You will also need to bump the version of the release builder
and re-build it using the `release-builder` target. Note, you will
need push access on the openpolicyagent DockerHub account to release
the new version of the `release-builder` as this is not automated yet.
If you need to update the version of Go used to build OPA you must update two
files in the root of this repository:
* `.travis.yml` which is used to configure the Travis CI build environment.
* `Makefile`- which is used to produce releases locally. Update the `GOVERSION` variable.

0 comments on commit 0093dca

Please sign in to comment.