Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Update golang and minikube versions (#8)
Browse files Browse the repository at this point in the history
* Update

* Fix test

* Upgrade kubecfg

* Update build image

* Change link

* Fix typo
  • Loading branch information
Andres Martinez Gotor authored Jun 27, 2019
1 parent 372a5fa commit 584fe99
Show file tree
Hide file tree
Showing 9,212 changed files with 507 additions and 3,969,639 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
18 changes: 9 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,19 @@ defaults: &defaults
working_directory: /home/circleci/.go_workspace/src/github.com/kubeless/nats-trigger
environment:
GOPATH: /home/circleci/.go_workspace
CONTROLLER_IMAGE_NAME: bitnami/kubeless-controller-manager
NATS_CONTROLLER_IMAGE_NAME: bitnami/nats-trigger-controller
NATS_CONTROLLER_IMAGE_NAME: kubeless/nats-trigger-controller
CGO_ENABLED: "0"
TEST_DEBUG: "1"
GKE_VERSION: 1.8.10-gke.0
MINIKUBE_VERSION: v0.25.2
MINIKUBE_VERSION: v1.2.0
MANIFESTS: nats
GO111MODULE: "on"
exports: &exports
# It is not possible to resolve env vars in the environment section:
# https://discuss.circleci.com/t/using-environment-variables-in-config-yml-not-working/14237
run: |
CONTROLLER_TAG=${CIRCLE_TAG:-build-$CIRCLE_WORKFLOW_ID}
echo "export CONTROLLER_TAG=${CONTROLLER_TAG}" >> $BASH_ENV
echo "export CONTROLLER_IMAGE=${CONTROLLER_IMAGE_NAME}:${CONTROLLER_TAG}" >> $BASH_ENV
echo "export NATS_CONTROLLER_IMAGE=${NATS_CONTROLLER_IMAGE_NAME}:${CONTROLLER_TAG}" >> $BASH_ENV
echo "export KUBECFG_JPATH=/home/circleci/src/github.com/kubeless/kubeless/ksonnet-lib" >> $BASH_ENV
echo "export PATH=$(pwd)/bats/libexec:$PATH" >> $BASH_ENV
Expand Down Expand Up @@ -80,7 +79,7 @@ jobs:
build:
<<: *defaults
docker:
- image: circleci/golang:1.9
- image: circleci/golang:1.12
steps:
- checkout
- <<: *exports
Expand All @@ -102,7 +101,7 @@ jobs:
- run: |
IFS=' ' read -r -a manifests <<< "$MANIFESTS"
for f in "${manifests[@]}"; do
sed -i.bak 's/:latest/'":${CONTROLLER_TAG}"'/g' ${f}.yaml
sed -E -i.bak 's/image: .*\/nats-trigger-controller:.*/image: kubeless\/nats-trigger-controller:'"${CONTROLLER_TAG}"'/g' ${f}.yaml
cp ${f}.yaml build-manifests/
done
- persist_to_workspace:
Expand All @@ -116,7 +115,8 @@ jobs:
path: build-manifests
minikube_nats:
<<: *defaults
machine: true
machine:
image: ubuntu-1604:201903-01
steps:
- <<: *should_test
- checkout
Expand All @@ -130,7 +130,7 @@ jobs:
push_latest_images:
<<: *defaults
docker:
- image: circleci/golang:1.9
- image: circleci/golang:1.12
steps:
- <<: *exports
- setup_remote_docker
Expand All @@ -148,7 +148,7 @@ jobs:
release:
<<: *defaults
docker:
- image: circleci/golang:1.9
- image: circleci/golang:1.12
steps:
- <<: *exports
- checkout
Expand Down
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ GO_FLAGS =
GOFMT = gofmt
KUBECFG = kubecfg
DOCKER = docker
CONTROLLER_IMAGE = kubeless-controller-manager:latest
NATS_CONTROLLER_IMAGE = nats-trigger-controller:latest
OS = linux
ARCH = amd64
Expand All @@ -16,22 +15,11 @@ export PATH := $(PATH):$(CURDIR)/bats/bin

.PHONY: all

KUBELESS_ENVS := \
-e OS_PLATFORM_ARG \
-e OS_ARCH_ARG \

default: binary

all:
CGO_ENABLED=1 ./script/make.sh

binary:
CGO_ENABLED=1 ./script/binary

binary-cross:
./script/binary-cli


%.yaml: %.jsonnet
$(KUBECFG) show -o yaml $< > $@.tmp
mv $@.tmp $@
Expand All @@ -56,7 +44,6 @@ test:
$(GO) test $(GO_FLAGS) $(GO_PACKAGES)

validation:
./script/validate-vet
./script/validate-lint
./script/validate-gofmt
./script/validate-git-marks
Expand All @@ -65,9 +52,6 @@ integration-tests:
./script/integration-tests minikube deployment
./script/integration-tests minikube basic

minikube-rbac-test:
./script/integration-test-rbac minikube

fmt:
$(GOFMT) -s -w $(GO_FILES)

Expand All @@ -81,10 +65,9 @@ ksonnet-lib:
bootstrap: bats ksonnet-lib

go get github.com/mitchellh/gox
go get github.com/golang/lint/golint

@if ! which kubecfg >/dev/null; then \
sudo wget -q -O /usr/local/bin/kubecfg https://github.com/ksonnet/kubecfg/releases/download/v0.6.0/kubecfg-$$(go env GOOS)-$$(go env GOARCH); \
sudo wget -q -O /usr/local/bin/kubecfg https://github.com/ksonnet/kubecfg/releases/download/v0.9.0/kubecfg-$$(go env GOOS)-$$(go env GOARCH); \
sudo chmod +x /usr/local/bin/kubecfg; \
fi

Expand All @@ -93,6 +76,3 @@ bootstrap: bats ksonnet-lib
sudo wget -q -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/$$KUBECTL_VERSION/bin/$$(go env GOOS)/$$(go env GOARCH)/kubectl; \
sudo chmod +x /usr/local/bin/kubectl; \
fi

build_and_test:
./script/start-test-environment.sh "make binary && make controller-image CONTROLLER_IMAGE=bitnami/kubeless-controller-manager:latest && make integration-tests"
Loading

0 comments on commit 584fe99

Please sign in to comment.