Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
courses
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nene Barry
courses
Commits
6989ff55
Verified
Commit
6989ff55
authored
4 years ago
by
Laurent Heirendt
Browse files
Options
Downloads
Patches
Plain Diff
adaptations for new deployment system
parent
4dc89e3a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.ci/deploy.sh
+1
-22
1 addition, 22 deletions
.ci/deploy.sh
.gitlab-ci.yml
+10
-1
10 additions, 1 deletion
.gitlab-ci.yml
with
11 additions
and
23 deletions
.ci/deploy.sh
+
1
−
22
View file @
6989ff55
...
@@ -9,15 +9,6 @@ echo $rootDir
...
@@ -9,15 +9,6 @@ echo $rootDir
rm
-rf
$rootDir
/public
rm
-rf
$rootDir
/public
mkdir
$rootDir
/public
mkdir
$rootDir
/public
# define the branch
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
# loop through all the presentations
nBlades
=
0
nBlades
=
0
for
d
in
$(
find
.
-maxdepth
1
-type
d
)
for
d
in
$(
find
.
-maxdepth
1
-type
d
)
...
@@ -35,7 +26,6 @@ do
...
@@ -35,7 +26,6 @@ do
# create the required folders in public
# create the required folders in public
mkdir
$rootDir
/public/
$BLADE
mkdir
$rootDir
/public/
$BLADE
mkdir
$rootDir
/public/
$BLADE
/
$version
# change to the blade directory to be built
# change to the blade directory to be built
cd
$BLADE
cd
$BLADE
...
@@ -54,21 +44,10 @@ do
...
@@ -54,21 +44,10 @@ do
yarn
install
yarn
install
grunt dist
grunt dist
mv
public/
*
$rootDir
/public/
$BLADE
/
$version
/
.
mv
public/
*
$rootDir
/public/
$BLADE
/.
echo
" > latest built for file set
${
BLADE
}
"
echo
" > latest built for file set
${
BLADE
}
"
# auto redirect file to the stable version
echo
'<html>\n
<head>\n
<meta http-equiv="refresh" content="0; url='
$PAGEURL
'/'
$BLADE
'/stable"/>\n
</head>\n
<body>\n
</bod>\n
</html>\n'
>
$rootDir
/public/
$BLADE
/index.html
echo
"autoredirect file set"
# move back out
# move back out
cd
..
cd
..
echo
" > -----------------------------------------------------"
echo
" > -----------------------------------------------------"
...
...
This diff is collapsed.
Click to expand it.
.gitlab-ci.yml
+
10
−
1
View file @
6989ff55
...
@@ -25,6 +25,14 @@ production:
...
@@ -25,6 +25,14 @@ production:
stage
:
deploy
stage
:
deploy
image
:
alpine:3.1
image
:
alpine:3.1
before_script
:
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
)'
-
'
which
ssh-agent
||
(
apk
add
--update
openssh
)'
-
eval $(ssh-agent -s)
-
eval $(ssh-agent -s)
-
echo "$B64SSHPRIVKEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
-
echo "$B64SSHPRIVKEY" | base64 -d | tr -d '\r' | ssh-add - > /dev/null
...
@@ -36,4 +44,5 @@ production:
...
@@ -36,4 +44,5 @@ production:
-
if
:
'
$CI_COMMIT_BRANCH
==
"develop"'
-
if
:
'
$CI_COMMIT_BRANCH
==
"develop"'
script
:
script
:
-
ssh -p $SSHPORT $SSHCONNECT "rm -rf ~/web/latest/*"
-
ssh -p $SSHPORT $SSHCONNECT "rm -rf ~/web/latest/*"
-
scp -P $SSHPORT -r public/* $SSHCONNECT:~/web/latest
-
ssh -p $SSHPORT $SSHCONNECT "mkdir ~/web/latest/$version"
-
scp -P $SSHPORT -r public/* $SSHCONNECT:~/web/latest/$version
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