Skip to content

Commit

Permalink
Remove .git suffix on repository name
Browse files Browse the repository at this point in the history
* Repository name is extracted from URL and used as WORKDIR.
  It leads to error when the repository URL is provided with ".git"
  "https://github.com/airshipit/airshipctl.git"

* Remove the ".git suffix when present in repository URL

Closes: #653
Change-Id: If154873f4126cedd85aa7f5deac13e17726a732c
  • Loading branch information
sirajyasin committed Oct 13, 2021
1 parent 4bce04c commit 3ca5d82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/deployment/23_generate_secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export AIRSHIP_CONFIG_MANIFEST_DIRECTORY=${AIRSHIP_CONFIG_MANIFEST_DIRECTORY:-"/
export AIRSHIP_CONFIG_PHASE_REPO_URL=${AIRSHIP_CONFIG_PHASE_REPO_URL:-"https://review.opendev.org/airship/airshipctl"}
export EXTERNAL_KUBECONFIG=${EXTERNAL_KUBECONFIG:-""}
export SITE=${SITE:-"test-site"}
export WORKDIR="${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}/$(basename ${AIRSHIP_CONFIG_PHASE_REPO_URL})"
REPO_NAME=$(basename ${AIRSHIP_CONFIG_PHASE_REPO_URL})
# Remove .git from repository if present
REPO_NAME=${REPO_NAME%.git}
export WORKDIR="${AIRSHIP_CONFIG_MANIFEST_DIRECTORY}/${REPO_NAME}"

if [[ -z "$EXTERNAL_KUBECONFIG" ]]; then
# we want to take config from bundle - remove kubeconfig file so
Expand Down

0 comments on commit 3ca5d82

Please sign in to comment.