Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123344
deploy.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
834 B
Subscribers
None
deploy.sh
View Options
#!/bin/bash
# deploy.sh: deploy a new version of our puppet environment from git
#
# Merges r10k and other repositories for private stuff
#
set
-e
PUPPET_ENV_PATH
=
$(
puppet
config
print
environmentpath
)
declare
-A
GIT_REPOS_TO_MERGE
GIT_REPOS_TO_MERGE
+=(
[
"data/private"
]=
"git@forge.softwareheritage.org:/source/puppet-swh-private-data.git"
)
/usr/bin/r10k
deploy
environment
-p
"
$@
"
for
environmentdir
in
$PUPPET_ENV_PATH
/*
;
do
cd
$environmentdir
for
dest
in
${
!GIT_REPOS_TO_MERGE[@]
}
;
do
if
[
-d
$dest
/.git
]
;
then
cd
$dest
/usr/bin//git
reset
--hard
HEAD
/usr/bin/git
pull
cd
$environmentdir
else
/usr/bin/git
clone
${
GIT_REPOS_TO_MERGE
[
${
dest
}
]
}
$dest
fi
done
cd
..
done
cp
$PUPPET_ENV_PATH
/production/deploy.sh
/usr/local/bin
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Jun 21, 5:20 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3295424
Attached To
rSPSITE puppet-swh-site
Event Timeline
Log In to Comment