Skip to content

Commit

Permalink
Add several CI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmanv committed Aug 15, 2019
1 parent 0041a02 commit 32763e2
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
17 changes: 8 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,17 @@ branches:
env:
- CHANGE_MINIKUBE_NONE_USER=true GO111MODULE=on

before_install:
- wget --progress=dot:mega https://storage.googleapis.com/kubernetes-release/release/v1.15.0/bin/linux/amd64/kubectl
- sudo chmod +x kubectl
- sudo mv kubectl /usr/local/bin/kubectl
cache:
directories:
- .go/pkg/mod/

script:
- go mod download
- sudo make build
- make docs
- docker run -ti --rm --net host -e GOPATH=/go -v ${GOPATH}:/go -v /var/run/docker.sock:/var/run/docker.sock -v ${HOME}/.kube:/root/.kube -v $(pwd):/data -w /data --entrypoint="bash" kanisterio/build:v0.0.1 -c "bash build/local_kubernetes.sh start_localkube"
- sudo make test
- make go-mod-download
- make build
- make start-kind
- make test

after_script:
- docker run -ti --rm --net host -e GOPATH=/go -v ${GOPATH}:/go -v /var/run/docker.sock:/var/run/docker.sock -v ${HOME}/.kube:/root/.kube -v $(pwd):/data -w /data --entrypoint="bash" kanisterio/build:v0.0.1 -c "bash build/local_kubernetes.sh stop_localkube"
- make stop-kind

13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ IMAGE_NAME := $(BIN)

IMAGE := $(REGISTRY)/$(IMAGE_NAME)

BUILD_IMAGE ?= kanisterio/build:v0.0.1
BUILD_IMAGE ?= kanisterio/build:v0.0.2
DOCS_BUILD_IMAGE ?= kanisterio/docker-sphinx

DOCS_RELEASE_BUCKET ?= s3://docs.kanister.io
Expand Down Expand Up @@ -147,7 +147,7 @@ push-name:
version:
@echo $(VERSION)

.PHONY: deploy test codegen build-dirs run clean container-clean bin-clean vendor-clean docs start-kind stop-kind
.PHONY: deploy test codegen build-dirs run clean container-clean bin-clean docs start-kind stop-kind release-snapshot go-mod-download

deploy: release-controller .deploy-$(DOTFILE_IMAGE)
.deploy-$(DOTFILE_IMAGE):
Expand Down Expand Up @@ -211,7 +211,7 @@ endif
clean: dotfile-clean bin-clean

dotfile-clean:
rm -rf .container-* .dockerfile-* .push-* .vendor .deploy-*
rm -rf .container-* .dockerfile-* .push-* .deploy-*

bin-clean:
rm -rf .go bin
Expand All @@ -236,8 +236,15 @@ release-helm:
release-kanctl:
@$(MAKE) run CMD='-c "./build/release_kanctl.sh"'

release-snapshot:
@$(MAKE) run CMD='-c "goreleaser --debug release --rm-dist --snapshot"'

go-mod-download:
@$(MAKE) run CMD='-c "go mod download"'

start-kind:
@$(MAKE) run CMD='-c "./build/local_kubernetes.sh start_localkube"'

stop-kind:
@$(MAKE) run CMD='-c "./build/local_kubernetes.sh stop_localkube"'

6 changes: 3 additions & 3 deletions docker/build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM golang:1.12.4-alpine3.9
FROM golang:1.12-alpine3.10
MAINTAINER Tom Manville <tom@kasten.io>

RUN apk add --update --no-cache ca-certificates bash git \
RUN apk add --update --no-cache ca-certificates bash git docker jq \
&& update-ca-certificates \
&& rm -rf /var/cache/apk/*

COPY --from=bitnami/kubectl:1.13.4 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/

COPY --from=goreleaser/goreleaser:v0.112.2 /bin/goreleaser /usr/local/bin/
COPY --from=goreleaser/goreleaser:v0.115.0 /bin/goreleaser /usr/local/bin/

ENV CGO_ENABLED=0 \
GO111MODULE="on" \
Expand Down
4 changes: 2 additions & 2 deletions helm/kanister-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
image:
repository: kanisterio/controller
tag: 0.20.0
repository: tdmanville/kanister-controller
tag: 0.0.0
pullPolicy: IfNotPresent
rbac:
create: true
Expand Down

0 comments on commit 32763e2

Please sign in to comment.