Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
labrobotica
drivers
battery_monitor
Commits
0466b323
Commit
0466b323
authored
Jul 25, 2019
by
Fernando Herrero
Browse files
CI: add before_script to manage ssh key. Modified script to remove lines from udev rule.
parent
79a0425b
Pipeline
#4049
failed with stages
in 2 minutes and 53 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
0466b323
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
scripts/undo_unbind_ftdi_udev.sh
View file @
0466b323
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment