Skip to content

Commit

Permalink
Add team selection for log-fly
Browse files Browse the repository at this point in the history
  • Loading branch information
ogrand committed Feb 1, 2019
1 parent c99c90b commit b40525b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/log-fly
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,21 @@ if [ $? != 0 ] ; then
fi
fi

#--- Choose which team to access
flag=0
while [ ${flag} = 0 ] ; do
flag=1
printf "\n%bTeam concourse :%b\n\n" "${REVERSE}${GREEN}" "${STD}"
printf "%b1%b : main\n" "${GREEN}${BOLD}" "${STD}"
printf "%b2%b : upload\n" "${GREEN}${BOLD}" "${STD}"
printf "\n%bYour choice :%b " "${GREEN}${BOLD}" "${STD}" ; read choice
case "${choice}" in
1) TEAM="main" ;;
2) TEAM="upload" ;;
*) flag=0 ; clear ;;
esac
done

#--- Log to fly
if [ ${flagError} = 0 ] ; then
getCredhub "OPS_DOMAIN" "/secrets/cloudfoundry_ops_domain"
Expand All @@ -50,7 +65,7 @@ if [ ${flagError} = 0 ] ; then
fi
done
fi
fly login -c https://elpaaso-concourse-micro.${OPS_DOMAIN} -k -u atc -p ${FLY_PASSWORD}
fly login -c https://elpaaso-concourse-micro.${OPS_DOMAIN} -k -u atc -p ${FLY_PASSWORD} -n ${TEAM}
if [ $? != 0 ] ; then
FLY_PASSWORD=""
printf "\n\n%bERROR : Connexion failed.%b\n\n" "${RED}" "${STD}"
Expand Down

0 comments on commit b40525b

Please sign in to comment.