Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
R3
school
courses
Commits
325e30c4
Verified
Commit
325e30c4
authored
Jul 01, 2020
by
Laurent Heirendt
✈
Browse files
swap version
parent
111b75cc
Pipeline
#29246
passed with stages
in 2 minutes and 40 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.ci/deploy.sh
View file @
325e30c4
...
...
@@ -9,6 +9,14 @@ echo $rootDir
rm
-rf
$rootDir
/public
mkdir
$rootDir
/public
if
[[
$CI_COMMIT_BRANCH
==
"develop"
]]
;
then
version
=
"latest"
;
elif
[[
$CI_COMMIT_BRANCH
==
"master"
]]
;
then
version
=
"stable"
;
else
version
=
"unstable"
;
fi
# loop through all the presentations
nBlades
=
0
for
d
in
$(
find
.
-maxdepth
1
-type
d
)
...
...
@@ -44,7 +52,7 @@ do
yarn
install
grunt dist
mv
public/
*
$rootDir
/public/
$BLADE
/.
mv
public/
*
$rootDir
/public/
$BLADE
/
$version
/
.
echo
" > latest built for file set
${
BLADE
}
"
...
...
.gitlab-ci.yml
View file @
325e30c4
...
...
@@ -25,14 +25,6 @@ production:
stage
:
deploy
image
:
alpine:3.1
before_script
:
# define the branch
-
if [[ $CI_COMMIT_BRANCH == "develop" ]]; then
version="latest";
elif [[ $CI_COMMIT_BRANCH == "master" ]]; then
version="stable";
else
version="unstable";
fi
-
'
which
ssh-agent
||
(
apk
add
--update
openssh
)'
-
eval $(ssh-agent -s)
-
echo "$B64SSHPRIVKEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
...
...
@@ -43,6 +35,4 @@ production:
rules
:
-
if
:
'
$CI_COMMIT_BRANCH
==
"develop"'
script
:
-
ssh -p $SSHPORT $SSHCONNECT "rm -rf ~/web/latest/*"
-
ssh -p $SSHPORT $SSHCONNECT "mkdir ~/web/latest/$version"
-
scp -P $SSHPORT -r public/* $SSHCONNECT:~/web/latest/$version
-
scp -P $SSHPORT -r public/* $SSHCONNECT:~/web/latest
Write
Preview
Markdown
is supported
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