diff --git a/Makefile b/Makefile index db4a22e..b993805 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,35 @@ #---------------------------------------------------------------------------------- # Compare dependencies against GlooE #---------------------------------------------------------------------------------- -GLOOE_VERSION=dev +# Export all variables to sub-makes +export + +GLOOE_VERSION=0.18.6 +BUILD_ID := $(BUILD_ID) +RELEASE := "true" +ifeq ($(TAGGED_VERSION),) + TAGGED_VERSION := v$(BUILD_ID) + RELEASE := "false" +endif +VERSION ?= $(shell echo $(TAGGED_VERSION) | cut -c 2-) .PHONY: compare-deps -compare-deps: Gopkg.lock GlooE-Gopkg.lock +compare-deps: Gopkg.lock GlooE-Gopkg.lock print-info go run scripts/compare_dependencies.go Gopkg.lock GlooE-Gopkg.lock GlooE-Gopkg.lock: - curl -o GlooE-Gopkg.lock http://storage.googleapis.com/gloo-ee-dependencies/$(GLOOE_VERSION)/Gopkg.lock \ No newline at end of file + curl -o GlooE-Gopkg.lock http://storage.googleapis.com/gloo-ee-dependencies/$(GLOOE_VERSION)/Gopkg.lock + +# TODO: remove +.PHONY: print-info +print-info: + @echo BUILD_ID: $(BUILD_ID) + @echo TAGGED_VERSION: $(TAGGED_VERSION) + @echo VERSION: $(VERSION) + @echo RELEASE: $(RELEASE) + +#---------------------------------------------------------------------------------- +# Build and publish example plugin implementations +#---------------------------------------------------------------------------------- +publish-example-plugins: + $(MAKE) -C examples \ No newline at end of file diff --git a/cloudbuild.yaml b/cloudbuild.yaml new file mode 100644 index 0000000..28a53cd --- /dev/null +++ b/cloudbuild.yaml @@ -0,0 +1,25 @@ +steps: +# Using dep container from github.com/solo-io/cloud-builders/dep +# This copies files into the proper workspace layout and so must be run before other tasks +# Subsequent steps should set GOPATH variable to avoid setting up unnecessary sym link +- name: 'gcr.io/$PROJECT_ID/dep' + args: ['ensure'] + id: 'dep' + env: + - 'PROJECT_ROOT=github.com/solo-io/ext-auth-plugins' + +- name: 'gcr.io/$PROJECT_ID/go-make:0.1.13' &make + args: ['compare-deps'] + env: &envs + - 'PROJECT_ROOT=github.com/solo-io/ext-auth-plugins' + - 'GOPATH=/workspace/gopath' + - 'TAGGED_VERSION=$TAG_NAME' + - 'BUILD_ID=$BUILD_ID' + dir: './gopath/src/github.com/solo-io/ext-auth-plugins' &dir + id: 'compare-dependencies' + +- name: *make + args: ['publish-example-plugins'] + env: *envs + dir: *dir + id: 'publish-examples' \ No newline at end of file diff --git a/examples/Makefile b/examples/Makefile index 347386a..41febfe 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -3,12 +3,11 @@ #---------------------------------------------------------------------------------- REPO_ROOT=./.. SOURCES=$(shell find . -name "*.go" | grep -v test) -TAG := test-plugin-1 .PHONY: publish-examples publish-examples: test-examples - cd $(REPO_ROOT) && docker build -t quay.io/solo-io/ext-auth-plugins:$(TAG) . - docker push quay.io/solo-io/ext-auth-plugins:$(TAG) + cd $(REPO_ROOT) && docker build -t quay.io/solo-io/ext-auth-plugins:$(VERSION) . + docker push quay.io/solo-io/ext-auth-plugins:$(VERSION) .PHONY: test-examples test-examples: build-examples-for-tests diff --git a/solo-project.yaml b/solo-project.yaml new file mode 100644 index 0000000..2f45eff --- /dev/null +++ b/solo-project.yaml @@ -0,0 +1,2 @@ +gcloud: + projectId: solo-public