Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
howto-cards
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
R3
howto-cards
Commits
f455f450
Commit
f455f450
authored
Jul 24, 2020
by
Laurent Heirendt
✈
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
harmonize rules See merge request
!166
parents
6c3c4082
c5733932
Pipeline
#30397
passed with stages
in 2 minutes and 4 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
.gitlab-ci.yml
.gitlab-ci.yml
+8
-12
No files found.
.gitlab-ci.yml
View file @
f455f450
...
...
@@ -15,7 +15,7 @@ prepare:index:
image
:
python
stage
:
prepare
rules
:
-
if
:
$CI_COMMIT_
BRANCH
-
if
:
$CI_COMMIT_
REF_NAME
-
if
:
'
$CI_PIPELINE_SOURCE
==
"merge_request_event"
&&
$CI_COMMIT_MESSAGE
!~
/tmpBranch/
&&
$CI_COMMIT_MESSAGE
!~
/Update
index/'
script
:
-
python .ci/generateIndex.py
...
...
@@ -72,7 +72,7 @@ build:pages:
paths
:
-
build
rules
:
-
if
:
$CI_COMMIT_
BRANCH
-
if
:
$CI_COMMIT_
REF_NAME
-
if
:
$CI_MERGE_REQUEST_ID
before_script
:
-
apt-get -qq update
...
...
@@ -104,9 +104,6 @@ generate:searchIndex:
script
:
-
bash .ci/build_indices.sh
-
mv build processed_build
rules
:
-
if
:
$CI_COMMIT_BRANCH
-
if
:
$CI_MERGE_REQUEST_ID
artifacts
:
expire_in
:
1 day
paths
:
...
...
@@ -120,8 +117,7 @@ pages:
image
:
alpine:3.11.3
stage
:
deploy
rules
:
-
if
:
'
$CI_PROJECT_NAMESPACE
!=
"R3"
&&
$CI_PROJECT_NAMESPACE
!=
"R3-core"'
-
if
:
$CI_MERGE_REQUEST_ID
-
if
:
'
$CI_MERGE_REQUEST_ID
&&
$CI_PROJECT_NAMESPACE
!=
"R3"
&&
$CI_PROJECT_NAMESPACE
!=
"R3-core"'
script
:
-
mv processed_build public
artifacts
:
...
...
@@ -142,10 +138,10 @@ deploy:vm:
-
echo "$KNOWNHOSTS" > ~/.ssh/known_hosts
-
chmod 644 ~/.ssh/known_hosts
rules
:
-
if
:
'
$CI_
COMMIT_BRANCH
==
"develop"
&&
$CI_PROJECT_PATH
==
"R3/howto-cards"'
-
if
:
'
$CI_
COMMIT_BRANCH
==
"master"
&&
$CI_PROJECT_PATH
==
"R3/howto-cards"'
-
if
:
'
$CI_
PIPELINE_SOURCE
!=
"merge_request_event"
&&
$CI_COMMIT_REF_NAME
==
"develop"
&&
$CI_PROJECT_PATH
==
"R3/howto-cards"'
-
if
:
'
$CI_
PIPELINE_SOURCE
!=
"merge_request_event"
&&
$CI_COMMIT_REF_NAME
==
"master"
&&
$CI_PROJECT_PATH
==
"R3/howto-cards"'
script
:
-
ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/$CI_COMMIT_
BRANCH/sources/public/$CI_JOB_ID ~/$CI_COMMIT_BRANCH
/public"
-
scp -P $SSHPORT -r processed_build/* $SSHCONNECT:~/$CI_COMMIT_
BRANCH
/sources/public/$CI_JOB_ID
-
ssh -p $SSHPORT $SSHCONNECT "cd ~/$CI_COMMIT_
BRANCH/public && ln -fs ../sources/public/$CI_JOB_ID/* . && cd ~/$CI_COMMIT_BRANCH
/sources/public/ && find . -type d -not -newermt '-1 minutes' -exec rm -rf {} +;"
-
ssh -p $SSHPORT $SSHCONNECT "mkdir -p ~/$CI_COMMIT_
REF_NAME/sources/public/$CI_JOB_ID ~/$CI_COMMIT_REF_NAME
/public"
-
scp -P $SSHPORT -r processed_build/* $SSHCONNECT:~/$CI_COMMIT_
REF_NAME
/sources/public/$CI_JOB_ID
-
ssh -p $SSHPORT $SSHCONNECT "cd ~/$CI_COMMIT_
REF_NAME/public && ln -fs ../sources/public/$CI_JOB_ID/* . && cd ~/$CI_COMMIT_REF_NAME
/sources/public/ && find . -type d -not -newermt '-1 minutes' -exec rm -rf {} +;"
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