diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aad0e960c85ac77c46a9617a93ac55e34af40e62..594dbc3fb8c6100dc0360cc8bfd711f3d77f5bd7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,14 @@ image: docker.io/alopeziri/labrobotica + + before_script: + - which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y ) + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan -p 2202 gitlab.iri.upc.edu >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + - ssh -p 2202 git@gitlab.iri.upc.edu #test stages: - build @@ -30,3 +40,5 @@ - "ssh irilabo@147.83.76.226 -i /root/.ssh/iriLabKeyNopwd -tt /home/irilabo/repo_scripts/update_repo.sh battery-monitor" only: - tags + + \ No newline at end of file diff --git a/scripts/undo_unbind_ftdi_udev.sh b/scripts/undo_unbind_ftdi_udev.sh index 5196d080f6f78e4d086d1bc77e505440adb3ac95..47c25d9863797e72c30442481fea151645141ee6 100755 --- a/scripts/undo_unbind_ftdi_udev.sh +++ b/scripts/undo_unbind_ftdi_udev.sh @@ -34,8 +34,10 @@ echo "Undo addition of udev rule so VENDOR:PRODUCT:SERIAL=${VENDOR}:${PRODUCT}:$ echo "Removing all lines containing SERIAL=${SERIAL} from file: ${FILE}" LINE0=${SERIAL} - sudo sed -i "/${LINE0}/d" $FILE +sed -i -E "/idVendor.*$VENDOR.*idProduct.*$PRODUCT.*serial.*$SERIAL.*MODE.*0666\"/d" $FILE +sed -i -E "/idVendor.*$VENDOR.*idProduct.*$PRODUCT.*serial.*$SERIAL.*RUN.*ftdi_sio\/unbind/d" $FILE + sudo service udev restart echo "Need to unplug-plug devices for changes to take effect" \ No newline at end of file