From 832cbf4aecd5d6c0185fc19e96b05b696a196f74 Mon Sep 17 00:00:00 2001 From: Jakub Mikusek Date: Fri, 18 Jan 2019 16:27:14 +0100 Subject: [PATCH] Deployment and Makefile update --- Makefile | 11 +++++------ deploy/operator.yaml | 6 ++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 0ccd99d4..2595ccd4 100644 --- a/Makefile +++ b/Makefile @@ -149,12 +149,10 @@ e2e: build docker-build ## Runs e2e tests cat deploy/role.yaml >> deploy/namespace-init.yaml cat deploy/role_binding.yaml >> deploy/namespace-init.yaml cat deploy/operator.yaml >> deploy/namespace-init.yaml - sed -i 's|REPLACE_IMAGE|$(REPO):$(GITCOMMIT)|g' deploy/namespace-init.yaml + sed -i 's|\(image:\).*|\1 $(REPO):$(GITCOMMIT)|g' deploy/namespace-init.yaml ifeq ($(ENVIRONMENT),minikube) - sed -i 's|imagePullPolicy: IfNotPresent|imagePullPolicy: Never|g' deploy/namespace-init.yaml - sed -i 's|REPLACE_ARGS|args: ["--minikube"]|g' deploy/namespace-init.yaml -else - sed -i 's|REPLACE_ARGS||g' deploy/namespace-init.yaml + sed -i 's|\(imagePullPolicy\): IfNotPresent|\1: Never|g' deploy/namespace-init.yaml + sed -i 's|\(args:\).*|\1\ ["--minikube"\]|' deploy/namespace-init.yaml endif @RUNNING_TESTS=1 go test -parallel=1 "./test/e2e/" -tags "$(BUILDTAGS) cgo" -v -timeout 30m \ @@ -331,7 +329,8 @@ bump-version: ## Bump the version in the version file. Set BUMP to [ patch | maj echo $(NEW_VERSION) > VERSION.txt @echo "Updating version from $(VERSION) to $(NEW_VERSION) in README.md" sed -i s/$(VERSION)/$(NEW_VERSION)/g README.md - git add VERSION.txt README.md + sed -i s/$(VERSION)/$(NEW_VERSION)/g deploy/operator.yaml + git add VERSION.txt README.md deploy/operator.yaml git commit -vaem "Bump version to $(NEW_VERSION)" @echo "Run make tag to create and push the tag for new version $(NEW_VERSION)" diff --git a/deploy/operator.yaml b/deploy/operator.yaml index 9d67650b..7e1404cd 100644 --- a/deploy/operator.yaml +++ b/deploy/operator.yaml @@ -16,15 +16,13 @@ spec: serviceAccountName: jenkins-operator containers: - name: jenkins-operator - # replace this with the built or official image -# image: virtuslab/jenkins-operator:latest - image: REPLACE_IMAGE + image: virtuslab/jenkins-operator:v0.0.3 ports: - containerPort: 60000 name: metrics command: - jenkins-operator - REPLACE_ARGS + args: [] imagePullPolicy: IfNotPresent env: - name: WATCH_NAMESPACE