Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autonomy-payload
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SASC
autonomy-payload
Commits
a94992d9
Commit
a94992d9
authored
8 years ago
by
Kevin DeMarco
Browse files
Options
Downloads
Patches
Plain Diff
check git repo SHAs
parent
a49a06fa
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
deploy/multi/common.sh
+0
-16
0 additions, 16 deletions
deploy/multi/common.sh
deploy/multi/multiple-uav-check.sh
+54
-1
54 additions, 1 deletion
deploy/multi/multiple-uav-check.sh
deploy/multi/multiple-uav-update.sh
+1
-1
1 addition, 1 deletion
deploy/multi/multiple-uav-update.sh
with
55 additions
and
18 deletions
deploy/multi/common.sh
+
0
−
16
View file @
a94992d9
...
...
@@ -55,22 +55,6 @@ function wait_for_procs()
done
}
function
get_repo
()
{
DIR_NAME
=
"
$1
"
REPO_URL
=
"
$2
"
# Clone the repo if it doesn't exist yet
if
[
!
-d
"
${
DIR_NAME
}
"
]
;
then
git clone
"
${
REPO_URL
}
"
${
DIR_NAME
}
fi
pushd
${
DIR_NAME
}
git checkout master
git remote set-url origin
"
${
REPO_URL
}
"
>
/dev/null 2>&1
git fetch origin
git reset
--hard
origin/master
popd
}
check_fail
()
{
STATUS
=
$?
...
...
This diff is collapsed.
Click to expand it.
deploy/multi/multiple-uav-check.sh
+
54
−
1
View file @
a94992d9
...
...
@@ -12,6 +12,25 @@ print_error()
echo
}
git_sha_compare
()
{
REPO_NAME
=
"
$1
"
ODROID_SSH
=
"
$2
"
SERVER_SSH
=
"
$3
"
SHA_ODROID
=
$(
git ls-remote
${
ODROID_SSH
}
|
head
-n
1 |
awk
'{print $1}'
)
SHA_SERVER
=
$(
git ls-remote
${
SERVER_SSH
}
|
head
-n
1 |
awk
'{print $1}'
)
if
[
"
$SHA_ODROID
"
!=
"
$SHA_SERVER
"
]
;
then
print_error
echo
"The payload's git SHA for
${
REPO_NAME
}
is old."
echo
"
${
REPO_NAME
}
ODROID's SHA:
${
SHA_ODROID
}
"
echo
"
${
REPO_NAME
}
SERVER's SHA:
${
SHA_SERVER
}
"
exit
-1
else
echo
"
${
REPO_NAME
}
is up-to-date."
fi
}
function
usage
()
{
cat
<<
EOF
...
...
@@ -60,7 +79,9 @@ if [ ! -e ${IPS_FILE} ]; then
fi
pushd
${
ACS_ROOT
}
/acs_ros_ws/src/autonomy-payload
>
& /dev/null
git pull origin master
git pull origin
git checkout master ./ap_master/launch/master.launch
git checkout master ./ap_tasks/src/task_runner.py
if
[
!
-f
./ap_master/launch/master.launch
]
;
then
echo
"Local master.launch file doesn't exist"
exit
-1
...
...
@@ -113,6 +134,22 @@ do
echo
"Checking status of
${
AIRCRAFT_TYPE
}
:
${
ODROID_USER
}
@
${
ODROID_IP
}
"
if
[
!
-e
./keys/authorized_keys
]
;
then
echo
"./keys/authorized_keys file doesn't exist"
echo
"Add your public ssh key to the file and retry."
exit
-1
fi
if
[
!
-e
./keys/
${
TEAM_NAME
}
/.ssh/id_rsa
]
;
then
echo
"Private ssh key doesn't exist at:"
echo
"./keys/
${
TEAM_NAME
}
/.ssh/id_rsa"
echo
"Add your team's ssh key folder"
exit
-1
fi
scp ./keys/authorized_keys
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/.ssh/authorized_keys
scp
-r
./keys/
${
TEAM_NAME
}
/.ssh
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/
if
[
"
${
AIRCRAFT_TYPE
}
"
==
"copter"
]
;
then
# Check master.launch
scp
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/acs_ros_ws/src/autonomy-payload/ap_master/launch/master.launch .master.launch.remote
>
& /dev/null
...
...
@@ -155,6 +192,22 @@ do
fi
fi
git_sha_compare
"autonomy-payload"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/acs_ros_ws/src/autonomy-payload"
"git@gitlab.nps.edu:sasc/autonomy-payload.git"
git_sha_compare
"autopilot_bridge"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/acs_ros_ws/src/autopilot_bridge"
"git@gitlab.nps.edu:sasc/autopilot_bridge.git"
git_sha_compare
"autonomy_itar"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/acs_ros_ws/src/autonomy_itar"
"git@gitlab.nps.edu:sasc-itar/autonomy_itar.git"
#git_sha_compare "pymavlink" "syllogismrxs@192.168.130.18:~/ACS/mavlink/pymavlink" "git://github.com/ArduPilot/pymavlink.git"
if
[
"
${
TEAM_NAME
}
"
=
'usafa'
]
;
then
git_sha_compare
"usafa"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/scrimmage/usafa"
"git@gitlab.nps.edu:C17Alexander.Fulton_usafa.edu/scrimmage-templates.git"
elif
[
"
${
TEAM_NAME
}
"
=
'usna'
]
;
then
git_sha_compare
"usna"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/scrimmage/usna"
"git@gitlab.nps.edu:dawkins_usna.edu/scrimmage-templates.git"
elif
[
"
${
TEAM_NAME
}
"
=
'usma'
]
;
then
git_sha_compare
"usma"
"
${
ODROID_USER
}
@
${
ODROID_IP
}
:~/scrimmage/usma"
"git@gitlab.nps.edu:todd.brick_usma.edu/scrimmage-templates.git"
else
print_error
echo
"Invalid team name for checking tactics repo:
${
TEAM_NAME
}
"
fi
ssh
${
ODROID_USER
}
@
${
ODROID_IP
}
'bash --login -s'
--
< onboard-check.sh
${
ODROID_IP
}
${
AIRCRAFT_TYPE
}
check_fail
"ssh failed"
done
<
${
IPS_FILE
}
...
...
This diff is collapsed.
Click to expand it.
deploy/multi/multiple-uav-update.sh
+
1
−
1
View file @
a94992d9
...
...
@@ -119,7 +119,7 @@ do
echo
"Add your public ssh key to the file and retry."
exit
-1
fi
if
[
!
-e
./keys/
${
TEAM_NAME
}
/.ssh/id_rsa
]
;
then
echo
"Private ssh key doesn't exist at:"
echo
"./keys/
${
TEAM_NAME
}
/.ssh/id_rsa"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment