mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-19 01:56:18 +10:00
node: checkout revision in init container
This commit is contained in:
@@ -25,7 +25,7 @@ spec:
|
||||
"name": "git-clone-app",
|
||||
"image": "{{ .Values.image }}",
|
||||
"imagePullPolicy": "{{ .Values.imagePullPolicy }}",
|
||||
"command": [ "/bin/sh", "-c" , "git clone {{ .Values.repository }} /app && git checkout {{ .Values.revision }}" ],
|
||||
"command": [ "/bin/sh", "-c" , "git clone {{ .Values.repository }} /app && git checkout {{ .Values.revision }}" ],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "app",
|
||||
|
||||
@@ -19,7 +19,7 @@ spec:
|
||||
"name": "git-clone-app",
|
||||
"image": "{{ .Values.image }}",
|
||||
"imagePullPolicy": "{{ .Values.imagePullPolicy }}",
|
||||
"command": [ "/bin/sh", "-c" , "git clone {{ .Values.repository }} /app" ],
|
||||
"command": [ "/bin/sh", "-c" , "git clone {{ .Values.repository }} /app && git checkout {{ .Values.revision }}" ],
|
||||
"volumeMounts": [
|
||||
{
|
||||
"name": "node-data",
|
||||
@@ -40,7 +40,6 @@ spec:
|
||||
- "/bin/bash"
|
||||
- "-ec"
|
||||
- |
|
||||
git checkout {{ .Values.revision }}
|
||||
chown -R bitnami:daemon /app
|
||||
su bitnami -c 'PATH=$PATH:/opt/bitnami/node/bin/ npm install'
|
||||
su bitnami -c 'PATH=$PATH:/opt/bitnami/node/bin/ npm start'
|
||||
|
||||
Reference in New Issue
Block a user