Skip to content

Commit

Permalink
(azure) use ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Mar 20, 2023
1 parent 4341c8e commit ee839a8
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,24 @@ jobs:
condition: and(succeeded(), not(canceled()))
- task: Bash@3
displayName: Install
env:
SSH_KNOWN_HOSTS: "github.com"
SSH_DEPLOY_KEY: $(SSH_DEPLOY_KEY_BLA)
inputs:
targetType: inline
script: |
bash install-package.sh --package=$PACKAGE --branch=$BRANCH --commit=$BUILD_SOURCEVERSION --pullrequest=${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false} --image="tuerobotics/tue-env-ros-noetic"
mkdir -p "${HOME}"/.ssh
echo "${SSH_DEPLOY_KEY_BLA}" > "${HOME}"/.ssh/ci_ssh_key
echo "${HOME}/.ssh/ci_ssh_key: $(cat "${HOME}"/.ssh/ci_ssh_key)"
if [[ -n "${SSH_KNOWN_HOSTS}" ]]
then
for host in ${SSH_KNOWN_HOSTS}
do
echo -e "\e[35m\e[1mssh-keyscan -t rsa -H \"${host}\" 2>&1 | tee -a ${HOME}/.ssh/known_hosts\e[0m"
ssh-keyscan -t rsa -H "${host}" 2>&1 | tee -a "${HOME}"/.ssh/known_hosts
done
fi
bash install-package.sh --package=$PACKAGE --branch=$BRANCH --commit=$BUILD_SOURCEVERSION --pullrequest=${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-false} --image="tuerobotics/tue-env-ros-noetic" --ssh --ssh-key="${HOME}"/.ssh/ci_ssh_key
condition: and(succeeded(), not(canceled()))
- task: Bash@3
displayName: Build
Expand Down

0 comments on commit ee839a8

Please sign in to comment.