Skip to content

Commit

Permalink
Display the source branch/commit when using --use-current-branch
Browse files Browse the repository at this point in the history
Signed-off-by: Romain Arnaud <[email protected]>
  • Loading branch information
Roming22 authored and Bharath Nallapeta committed Feb 15, 2023
1 parent c99ad93 commit 864506c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions developer/openshift/dev_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ install_pipeline_service() {
echo "- Installing local postgres DB for tekton results:"
kubectl apply -f developer/local/postgres | indent 4


echo "- Deploy applications:"
if [ -n "${USE_CURRENT_BRANCH:-}" ]; then
echo -n " - Source: "
manifest_dir="$(find "$WORK_DIR/environment/compute" -mindepth 1 -maxdepth 1 -type d)"
repo_url="$(git remote get-url origin | sed "s|[email protected]:|https://github.com/|")"
branch="$(git branch --show-current)"
Expand All @@ -287,9 +290,8 @@ install_pipeline_service() {
kubectl create -k "$manifest_dir" --dry-run=client -o yaml >"$manifest_dir/pipeline-service.yaml"
yq -i ".spec.source.repoURL=\"$repo_url\" | .spec.source.targetRevision=\"$branch\"" "$manifest_dir/pipeline-service.yaml"
yq -i '.resources[0]="pipeline-service.yaml"' "$manifest_dir/kustomization.yaml"
echo "$(echo "$repo_url" | sed "s:\.git$::")/tree/$branch"
fi

echo "- Deploy applications:"
"$PROJECT_DIR/operator/images/cluster-setup/content/bin/install.sh" \
${DEBUG:+"$DEBUG"} \
--workspace-dir "$WORK_DIR" | indent 2
Expand Down
2 changes: 1 addition & 1 deletion operator/images/cluster-setup/content/bin/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ fetch_bitwarden_secrets() {
setx_on

if [ ! -e "$BITWARDEN_CRED" ]; then
echo "No BW secrets"
echo "- No Bitwarden secrets"
return
fi

Expand Down

0 comments on commit 864506c

Please sign in to comment.