Skip to content

Commit

Permalink
adding preview chart for csharp projects - issue jenkins-x#43
Browse files Browse the repository at this point in the history
  • Loading branch information
paolocarta committed Aug 14, 2018
1 parent 4a8a20c commit 44a8cec
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packs/csharp/preview/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
description: A Helm chart for Kubernetes
name: preview
icon: https://raw.githubusercontent.com/jenkins-x/jenkins-x-platform/master/images/python.png
version: 0.1.0-SNAPSHOT
22 changes: 22 additions & 0 deletions packs/csharp/preview/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
OS := $(shell uname)

preview:
helm init --client-only
helm repo add chartmuseum http://jenkins-x-chartmuseum:8080
helm repo add chartmuseum https://chartmuseum.build.cd.jenkins-x.io
ifeq ($(OS),Darwin)
sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml
sed -i "" -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml
sed -i "" -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml
else ifeq ($(OS),Linux)
sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" Chart.yaml
sed -i -e "s/version:.*/version: $(PREVIEW_VERSION)/" ../*/Chart.yaml
sed -i -e "s|repository: *|repository: $(JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST):$(JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT)/REPLACE_ME_ORG/REPLACE_ME_APP_NAME|" values.yaml
sed -i -e "s/tag: .*/tag: $(PREVIEW_VERSION)/" values.yaml
else
echo "platfrom $(OS) not supported to release from"
exit -1
endif
echo " version: $(PREVIEW_VERSION)" >> requirements.yaml
helm dependency build
helm lint
13 changes: 13 additions & 0 deletions packs/csharp/preview/requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

dependencies:
- alias: expose
name: exposecontroller
repository: https://chartmuseum.build.cd.jenkins-x.io
version: 2.3.56
- alias: cleanup
name: exposecontroller
repository: https://chartmuseum.build.cd.jenkins-x.io
version: 2.3.56
- alias: preview
name: REPLACE_ME_APP_NAME
repository: file://../REPLACE_ME_APP_NAME
22 changes: 22 additions & 0 deletions packs/csharp/preview/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

expose:
Annotations:
helm.sh/hook: post-install,post-upgrade
helm.sh/hook-delete-policy: hook-succeeded
config:
exposer: Ingress
http: true
tlsacme: false

cleanup:
Args:
- --cleanup
Annotations:
helm.sh/hook: pre-delete
helm.sh/hook-delete-policy: hook-succeeded

preview:
image:
repository:
tag:
pullPolicy: IfNotPresent

0 comments on commit 44a8cec

Please sign in to comment.