Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update targets and images to use our internal golang 1.9 images #129

Merged
merged 1 commit into from
Nov 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM buildpack-deps:jessie-scm
FROM gcr.io/heptio-images/golang:1.9-alpine3.6
MAINTAINER Timothy St. Clair "tstclair@heptio.com"

RUN apt-get update && apt-get -y --no-install-recommends install \
ca-certificates \
&& rm -rf /var/cache/apt/* \
&& rm -rf /var/lib/apt/lists/*
ADD sonobuoy /sonobuoy
RUN apk add --no-cache ca-certificates
ADD sonobuoy /sonobuoy
ADD scripts/run_master.sh /run_master.sh
#USER nobody:nobody
# TODO - Verify execution is fine as nobody user to drop privs
# USER nobody:nobody

CMD ["/bin/sh", "-c", "/run_master.sh"]
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ IMAGE_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD | sed 's/\///g')
GIT_REF = $(shell git rev-parse --short=8 --verify HEAD)

BUILDMNT = /go/src/$(GOTARGET)
BUILD_IMAGE ?= golang:1.8
BUILD_IMAGE ?= gcr.io/heptio-images/golang:1.9-alpine3.6
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this change should have a little more pomp and circumstance than it does. Maybe a note in the changelog about "targetting Go 1.9 now?"

BUILDCMD = go build -o $(TARGET) -v -ldflags "-X github.com/heptio/sonobuoy/pkg/buildinfo.Version=$(GIT_VERSION) -X github.com/heptio/sonobuoy/pkg/buildinfo.DockerImage=$(REGISTRY)/$(TARGET):$(GIT_REF)"
BUILD = $(BUILDCMD) $(GOTARGET)/cmd/sonobuoy

Expand All @@ -44,16 +44,15 @@ TEST = go test $(TEST_PKGS) $(TESTARGS)
VET = go vet $(TEST_PKGS)

# Vendor this someday
INSTALL_GOLINT = go get -u github.com/golang/lint/golint
GOLINT_FLAGS ?= -set_exit_status
LINT = $(INSTALL_GOLINT) && golint $(GOLINT_FLAGS) $(TEST_PKGS)
LINT = golint $(GOLINT_FLAGS) $(TEST_PKGS)

WORKDIR ?= /sonobuoy
RBAC_ENABLED ?= 1
KUBECFG_CMD = $(DOCKER) run \
-v $(DIR):$(WORKDIR) \
--workdir $(WORKDIR) \
- --rm \
--rm \
$(KSONNET_BUILD_IMAGE) \
kubecfg show -o yaml -V RBAC_ENABLED=$(RBAC_ENABLED) -J $(WORKDIR) -o yaml $< > $@

Expand Down