Skip to content

Commit

Permalink
add repo path to installer
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-codefresh committed Apr 28, 2022
1 parent 80a3e03 commit 00dfa68
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions installer/helm/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: csdp-installer
description: A Helm chart used for installing a CSDP runtime
type: application
version: 0.1.11
appVersion: v0.0.5
version: 0.1.12
appVersion: v0.0.6
6 changes: 5 additions & 1 deletion installer/helm/templates/installer/job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ spec:
- name: CSDP_RUNTIME_NAME
value: {{ .Values.csdpInstaller.runtime.name | quote }}
- name: CSDP_RUNTIME_REPO
value: {{ .Values.csdpInstaller.runtime.repo | quote }}
value: {{ .Values.csdpInstaller.runtime.repoURL }}
{{- if .Values.csdpInstaller.runtime.repoPath }}
- name: CSDP_RUNTIME_REPO_PATH
value: {{ .Values.csdpInstaller.runtime.repoPath }}
{{- end }}
- name: CSDP_RUNTIME_GIT_TOKEN
valueFrom:
secretKeyRef:
Expand Down
2 changes: 2 additions & 0 deletions installer/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ csdpInstaller:
name: some-runtime
# CSDP runtime installation repo url
repoURL: https://github.com/some/user-repo
# CSDP runtime installation repo path to the bootstrap directory
repoPath: ""
# Git authentication token
gitToken:
secretKeyRef:
Expand Down
4 changes: 3 additions & 1 deletion installer/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ CSDP_RUNTIME_VERSION="${CSDP_RUNTIME_VERSION:-latest}"
CSDP_GIT_INTEGRATION_PROVIDER="${CSDP_GIT_INTEGRATION_PROVIDER:-GITHUB}"
CSDP_GIT_INTEGRATION_API_URL="${CSDP_GIT_INTEGRATION_API_URL:-https://api.github.com}"
CSDP_GIT_INTEGRATION_TOKEN="${CSDP_GIT_INTEGRATION_TOKEN:-${CSDP_RUNTIME_GIT_TOKEN}}"
CSDP_RUNTIME_REPO_PATH="${CSDP_RUNTIME_REPO_PATH:-runtimes/${CSDP_RUNTIME_NAME}/bootstrap}"
CSDP_RUNTIME_REPO_CREDS_PATTERN=`echo ${CSDP_RUNTIME_REPO} | grep --color=never -E -o '^http[s]?:\/\/([a-zA-Z0-9\.]*)'`
CSDP_MANAGED_RUNTIME="${CSDP_MANAGED_RUNTIME:-false}"

Expand Down Expand Up @@ -146,7 +147,7 @@ create_bootstrap_application() {
jsonPointers:
- /status
source:
path: base/bootstrap
path: ${CSDP_RUNTIME_REPO_PATH}
repoURL: ${CSDP_RUNTIME_REPO}
targetRevision: HEAD
syncPolicy:
Expand Down Expand Up @@ -290,6 +291,7 @@ echo " namespace: ${NAMESPACE}"
echo " csdp url: ${CSDP_URL}"
echo " csdp token: ****"
echo " runtime repo: ${CSDP_RUNTIME_REPO}"
echo " runtime repo path: ${CSDP_RUNTIME_REPO_PATH}"
echo " runtime repo creds pattern: ${CSDP_RUNTIME_REPO_CREDS_PATTERN}"
echo " runtime git-token: ****"
echo " runtime cluster: ${CSDP_RUNTIME_CLUSTER}"
Expand Down

0 comments on commit 00dfa68

Please sign in to comment.