-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from estafette/add-official-helm-chart
Add official helm chart
- Loading branch information
Showing
24 changed files
with
436 additions
and
379 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ builder: | |
track: dev | ||
|
||
labels: | ||
app-group: estafette-various | ||
app-group: estafette-controllers | ||
team: estafette-team | ||
language: golang | ||
|
||
version: | ||
semver: | ||
major: 1 | ||
minor: 0 | ||
minor: 2 | ||
|
||
stages: | ||
build: | ||
|
@@ -35,10 +35,62 @@ stages: | |
action: push | ||
repositories: | ||
- estafette | ||
when: | ||
status == 'succeeded' && | ||
branch == 'master' && | ||
server == 'gocd' | ||
|
||
lint-helm-chart: | ||
image: alpine/helm:2.15.1 | ||
commands: | ||
- helm lint ${ESTAFETTE_GIT_NAME} | ||
|
||
package-helm-chart: | ||
image: alpine/helm:2.15.1 | ||
commands: | ||
- helm package --save=false --app-version ${ESTAFETTE_BUILD_VERSION} --version ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0-pre-${ESTAFETTE_BUILD_VERSION_PATCH} ${ESTAFETTE_GIT_NAME} | ||
|
||
test-helm-chart: | ||
services: | ||
- name: kubernetes | ||
image: bsycorp/kind:latest-1.12 | ||
ports: | ||
- port: 8443 | ||
- port: 10080 | ||
readiness: | ||
path: /kubernetes-ready | ||
timeoutSeconds: 180 | ||
image: alpine/helm:2.15.1 | ||
env: | ||
KUBERNETES_HOST: kubernetes | ||
commands: | ||
- apk add sed | ||
- mkdir -p ~/.kube | ||
- wget -q -O - http://${KUBERNETES_HOST}:10080/config | sed -e "s/localhost/${KUBERNETES_HOST}/" > ~/.kube/config | ||
- wget -O /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.15.1/bin/linux/amd64/kubectl | ||
- chmod +x /usr/local/bin/kubectl | ||
- kubectl version | ||
- kubectl -n kube-system create serviceaccount tiller | ||
- kubectl create clusterrolebinding tiller --clusterrole=cluster-admin --serviceaccount=kube-system:tiller | ||
- helm init --service-account tiller --wait | ||
- helm template --name ${ESTAFETTE_GIT_NAME} ${ESTAFETTE_GIT_NAME}-${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0-pre-${ESTAFETTE_BUILD_VERSION_PATCH}.tgz --namespace estafette | ||
- helm upgrade --install ${ESTAFETTE_GIT_NAME} ${ESTAFETTE_GIT_NAME}-${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0-pre-${ESTAFETTE_BUILD_VERSION_PATCH}.tgz --namespace estafette --wait --timeout 120 || (kubectl logs -l app.kubernetes.io/name=${ESTAFETTE_GIT_NAME},app.kubernetes.io/instance=${ESTAFETTE_GIT_NAME} -n estafette && exit 1) | ||
- kubectl logs -l app.kubernetes.io/name=${ESTAFETTE_GIT_NAME},app.kubernetes.io/instance=${ESTAFETTE_GIT_NAME} -n estafette | ||
|
||
clone-charts-repo: | ||
image: extensions/git-clone:dev | ||
repo: helm-charts | ||
branch: master | ||
|
||
publish-helm-chart: | ||
image: alpine/helm:2.15.1 | ||
commands: | ||
- apk add git | ||
- mkdir -p helm-charts/charts | ||
- cp *.tgz helm-charts/charts | ||
- cd helm-charts | ||
- helm repo index --url https://helm.estafette.io/ --merge index.yaml . | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Estafette bot" | ||
- git add --all | ||
- git commit --allow-empty -m "${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0-pre-${ESTAFETTE_BUILD_VERSION_PATCH}" | ||
- git push origin master | ||
|
||
slack-notify: | ||
image: extensions/slack-build-status:dev | ||
|
@@ -47,4 +99,37 @@ stages: | |
- '#build-status' | ||
when: | ||
status == 'succeeded' || | ||
status == 'failed' | ||
status == 'failed' | ||
|
||
releases: | ||
release: | ||
clone: true | ||
stages: | ||
package-helm-chart: | ||
image: alpine/helm:2.15.1 | ||
commands: | ||
- helm package --save=false --app-version ${ESTAFETTE_BUILD_VERSION} --version ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0 ${ESTAFETTE_GIT_NAME} | ||
|
||
clone-charts-repo: | ||
image: extensions/git-clone:dev | ||
repo: helm-charts | ||
branch: master | ||
|
||
publish-helm-chart: | ||
image: alpine/helm:2.15.1 | ||
commands: | ||
- apk add git | ||
- mkdir -p helm-charts/charts | ||
- cp *.tgz helm-charts/charts | ||
- cd helm-charts | ||
- helm repo index --url https://helm.estafette.io/ --merge index.yaml . | ||
- git config --global user.email "[email protected]" | ||
- git config --global user.name "Estafette bot" | ||
- git add --all | ||
- git commit --allow-empty -m "${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0" | ||
- git push origin master | ||
|
||
create-github-release: | ||
image: extensions/github-release:dev | ||
version: ${ESTAFETTE_BUILD_VERSION_MAJOR}.${ESTAFETTE_BUILD_VERSION_MINOR}.0 | ||
closeMilestone: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
chart/estafette-gke-preemptible-killer/templates/_helpers.tpl
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
chart/estafette-gke-preemptible-killer/templates/clusterrole.yaml
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
chart/estafette-gke-preemptible-killer/templates/clusterrolebinding.yaml
This file was deleted.
Oops, something went wrong.
62 changes: 0 additions & 62 deletions
62
chart/estafette-gke-preemptible-killer/templates/deployment.yaml
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
chart/estafette-gke-preemptible-killer/templates/secret.yaml
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
chart/estafette-gke-preemptible-killer/templates/serviceaccount.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.