-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c9727a9
commit dd139dd
Showing
31 changed files
with
276 additions
and
213 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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "_infra/helm"] | ||
path = _infra/helm | ||
url = https://github.com/andrescosta/todo-charts |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: todosvc | ||
spec: | ||
destination: | ||
name: '' | ||
namespace: default | ||
server: https://kubernetes.default.svc | ||
source: | ||
path: '' | ||
repoURL: https://andrescosta.github.io/todo-charts | ||
targetRevision: '>=0.4.0' | ||
chart: todo-svc-jobico | ||
syncPolicy: | ||
automated: {} | ||
sources: [] | ||
project: default | ||
--- | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Application | ||
metadata: | ||
name: todoweb | ||
spec: | ||
destination: | ||
name: '' | ||
namespace: default | ||
server: https://kubernetes.default.svc | ||
source: | ||
path: '' | ||
repoURL: https://andrescosta.github.io/todo-charts | ||
targetRevision: '*' | ||
chart: todo-web-jobico | ||
sources: [] | ||
project: default | ||
syncPolicy: | ||
automated: | ||
prune: false | ||
selfHeal: false |
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 |
---|---|---|
@@ -0,0 +1,173 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: svc-builder-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: nfs-csi | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
--- | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: web-builder-pvc | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: nfs-csi | ||
resources: | ||
requests: | ||
storage: 1Gi | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: svc-builder | ||
spec: | ||
template: | ||
spec: | ||
imagePullSecrets: | ||
- name: reg-cred-secret | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
fsGroup: 1000 | ||
initContainers: | ||
- name: init-svc | ||
image: reg.jobico.org/buildah | ||
command: | ||
- /script/build.sh | ||
- init | ||
- --repository=https://github.com/andrescosta/todo-jobico-cloud | ||
- --branch=argocd-helm | ||
- --build-dir=todo-svc/ | ||
- --registry=reg.jobico.org | ||
- --image-name=todosvc | ||
- --current-version=1.1 | ||
- --work-dir=/repo | ||
- --helm-repository=https://oauth2:{token}@github.com/andrescosta/todo-charts | ||
- --helm-branch=main | ||
- --helm-chart=todo-svc-jobico | ||
- --helm-version=0.4 | ||
- --git-user=builder | ||
- --git-email=builder@git | ||
- --frequency=30 | ||
- --token-file=/token/token_git_hub.private | ||
- --first-build | ||
- --verbose | ||
volumeMounts: | ||
- name: builder-vol | ||
mountPath: "/repo" | ||
- name: script | ||
mountPath: "/script" | ||
- name: github-token | ||
mountPath: /token | ||
containers: | ||
- name: svc-builder | ||
image: reg.jobico.org/buildah | ||
securityContext: | ||
privileged: true | ||
command: | ||
- /repo/todo-svc-jobico.sh | ||
volumeMounts: | ||
- name: script | ||
mountPath: "/script" | ||
- name: builder-vol | ||
mountPath: "/repo" | ||
- name: ca | ||
mountPath: "/etc/containers/certs.d/reg.jobico.org" | ||
- name: github-token | ||
mountPath: /token | ||
volumes: | ||
- name: script | ||
configMap: | ||
name: build-map | ||
defaultMode: 0050 | ||
- name: builder-vol | ||
persistentVolumeClaim: | ||
claimName: svc-builder-pvc | ||
- name: ca | ||
configMap: | ||
name: kube-root-ca.crt | ||
- name: github-token | ||
secret: | ||
secretName: github-token | ||
restartPolicy: Never | ||
--- | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: web-builder | ||
spec: | ||
template: | ||
spec: | ||
imagePullSecrets: | ||
- name: reg-cred-secret | ||
securityContext: | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
fsGroup: 1000 | ||
initContainers: | ||
- name: init-web | ||
image: reg.jobico.org/buildah | ||
command: | ||
- /script/build.sh | ||
- init | ||
- --repository=https://github.com/andrescosta/todo-jobico-cloud | ||
- --branch=argocd-helm | ||
- --build-dir=todo-web/ | ||
- --registry=reg.jobico.org | ||
- --image-name=todoweb | ||
- --current-version=1.1 | ||
- --work-dir=/repo | ||
- --helm-repository=https://oauth2:{token}@github.com/andrescosta/todo-charts | ||
- --helm-branch=main | ||
- --helm-chart=todo-web-jobico | ||
- --helm-version=0.4 | ||
- --git-user=builder | ||
- --git-email=builder@git | ||
- --frequency=30 | ||
- --token-file=/token/token_git_hub.private | ||
- --first-build | ||
- --verbose | ||
volumeMounts: | ||
- name: script | ||
mountPath: "/script" | ||
- name: builder-vol | ||
mountPath: "/repo" | ||
- name: github-token | ||
mountPath: /token | ||
containers: | ||
- name: web-builder | ||
image: reg.jobico.org/buildah | ||
securityContext: | ||
privileged: true | ||
command: | ||
- /repo/todo-web-jobico.sh | ||
volumeMounts: | ||
- name: script | ||
mountPath: "/script" | ||
- name: builder-vol | ||
mountPath: "/repo" | ||
- name: ca | ||
mountPath: "/etc/containers/certs.d/reg.jobico.org" | ||
- name: github-token | ||
mountPath: /token | ||
volumes: | ||
- name: script | ||
configMap: | ||
name: build-map | ||
defaultMode: 0050 | ||
- name: builder-vol | ||
persistentVolumeClaim: | ||
claimName: web-builder-pvc | ||
- name: ca | ||
configMap: | ||
name: kube-root-ca.crt | ||
- name: github-token | ||
secret: | ||
secretName: github-token | ||
restartPolicy: Never |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
docker build ../../todo-svc/ -t reg.jobico.org/todosvc:latest | ||
docker push reg.jobico.org/todosvc:latest | ||
version=$1 | ||
docker build ../../todo-svc/ -t reg.jobico.org/todosvc:$version | ||
docker push reg.jobico.org/todosvc:$version |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
docker build ../../todo-web/ -t reg.jobico.org/todoweb:latest | ||
docker push reg.jobico.org/todoweb:latest | ||
version=${1:-$(date +"%Y%m%d%H%M%S")} | ||
docker build ../../todo-web/ -t reg.jobico.org/todoweb:$version | ||
docker push reg.jobico.org/todoweb:$version |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pushd ../ | ||
kubectl delete -f ../argocd/jobs.yaml | ||
kubectl delete -f ../argocd/apps.yaml -n argocd | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pushd ../ | ||
kubectl create secret generic github-token --from-file=../id/token_git_hub.private | ||
kubectl apply -f ../argocd/jobs.yaml | ||
kubectl apply -f ../argocd/apps.yaml -n argocd | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pushd ../ | ||
version=$(date +"%Y%m%d%H%M%S") | ||
./build-push-svc.sh $version | ||
helm upgrade todosvc ../helm/charts/todo-svc-jobico/ --set=image.tag=$version | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
pushd ../ | ||
version=$(date +"%Y%m%d%H%M%S") | ||
./build-push-web.sh $version | ||
helm upgrade todoweb ../helm/charts/todo-web-jobico/ --set=image.tag=$version | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
pushd ../ | ||
version=$(date +"%Y%m%d%H%M%S") | ||
./build-push-svc.sh $version | ||
./build-push-web.sh $version | ||
helm install todosvc ../helm/charts/todo-svc-jobico/ --set=image.tag=$version | ||
helm install todoweb ../helm/charts/todo-web-jobico/ --set=image.tag=$version | ||
popd |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pushd ../ | ||
./build-push-svc.sh 1.0 | ||
popd | ||
helm upgrade todosvc oci://reg.jobico.org/helm-charts/todo-svc-jobico |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
pushd ../ | ||
./build-push-web.sh 1.0 | ||
popd | ||
helm upgrade todoweb oci://reg.jobico.org/helm-charts/todo-web-jobico |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
version=1.0 | ||
pushd ../ | ||
./build-push-web.sh $version | ||
./build-push-svc.sh $version | ||
popd | ||
helm install todosvc oci://reg.jobico.org/helm-charts/todo-svc-jobico --set mode.dev.enabled=true --set=image.tag=$version | ||
helm install todoweb oci://reg.jobico.org/helm-charts/todo-web-jobico --set mode.dev.enabled=true --set=image.tag=$version |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
version=1.0 | ||
helm package ../../helm/charts/todo-web-jobico/ -d ../../charts --version=$version --app-version=$version | ||
helm package ../../helm/charts/todo-svc-jobico/ -d ../../charts --version=$version --app-version=$version | ||
helm push ../../charts/todo-svc-jobico-${version}.tgz oci://reg.jobico.org/helm-charts | ||
helm push ../../charts/todo-web-jobico-${version}.tgz oci://reg.jobico.org/helm-charts |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.