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

Commit

Permalink
Merge pull request #4 from keptn/release-0.2.x
Browse files Browse the repository at this point in the history
Release 0.2.x
  • Loading branch information
Jürgen Etzlstorfer authored Apr 9, 2019
2 parents e766991 + cc7f84f commit 20ce99f
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 30 deletions.
11 changes: 11 additions & 0 deletions buildAndDeploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
REGISTRY_URI=$(kubectl describe svc docker-registry -n keptn | grep IP: | sed 's~IP:[ \t]*~~')

rm -f config/gen/servicenow-service-build.yaml

cat config/servicenow-service-build.yaml | \
sed 's~REGISTRY_URI_PLACEHOLDER~'"$REGISTRY_URI"'~' >> config/gen/servicenow-service-build.yaml

kubectl delete -f config/gen/servicenow-service-build.yaml --ignore-not-found

kubectl apply -f config/gen/servicenow-service-build.yaml
53 changes: 53 additions & 0 deletions config/servicenow-service-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: serving.knative.dev/v1alpha1
kind: Service
metadata:
name: servicenow-service
namespace: keptn
spec:
runLatest:
configuration:
build:
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
name: servicenow-builder
namespace: keptn
spec:
serviceAccountName: build-bot
source:
git:
url: https://github.com/keptn/servicenow-service.git
revision: master
template:
name: kaniko
arguments:
- name: IMAGE
value: docker-registry.keptn.svc.cluster.local:5000/keptn/servicenow-service:latest
- name: DOCKERFILE
value: /Dockerfile
revisionTemplate:
spec:
container:
image: REGISTRY_URI_PLACEHOLDER:5000/keptn/servicenow-service:latest
imagePullPolicy: Always
env:


---
apiVersion: eventing.knative.dev/v1alpha1
kind: Subscription
metadata:
name: servicenow-sub
namespace: keptn
spec:
channel:
apiVersion: eventing.knative.dev/v1alpha1
kind: Channel
name: problem
subscriber:
ref:
apiVersion: serving.knative.dev/v1alpha1
kind: Service
name: servicenow-service


21 changes: 1 addition & 20 deletions config/servicenow-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,10 @@ metadata:
spec:
runLatest:
configuration:
build:
apiVersion: build.knative.dev/v1alpha1
kind: Build
metadata:
name: servicenow-builder
namespace: keptn
spec:
serviceAccountName: build-bot
source:
git:
url: https://github.com/keptn/servicenow-service.git
revision: master
template:
name: kaniko
arguments:
- name: IMAGE
value: docker-registry.keptn.svc.cluster.local:5000/keptn/servicenow-service:latest
- name: DOCKERFILE
value: /Dockerfile
revisionTemplate:
spec:
container:
image: REGISTRY_URI_PLACEHOLDER:5000/keptn/servicenow-service:latest
image: keptn/servicenow-service:0.1.0
imagePullPolicy: Always
env:

Expand Down
12 changes: 2 additions & 10 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
#!/bin/sh
REGISTRY_URI=$(kubectl describe svc docker-registry -n keptn | grep IP: | sed 's~IP:[ \t]*~~')

rm -f config/gen/servicenow-service.yaml

cat config/servicenow-service.yaml | \
sed 's~REGISTRY_URI_PLACEHOLDER~'"$REGISTRY_URI"'~' >> config/gen/servicenow-service.yaml

kubectl delete -f config/gen/servicenow-service.yaml --ignore-not-found

kubectl apply -f config/gen/servicenow-service.yaml
kubectl delete -f config/servicenow-service.yaml --ignore-not-found
kubectl apply -f config/servicenow-service.yaml

0 comments on commit 20ce99f

Please sign in to comment.