Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
zkci-bitrix
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Карнаухов Константин
zkci-bitrix
Commits
c1538b62
Commit
c1538b62
authored
Nov 13, 2016
by
Тест Карнаухов
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(artifacts): demo scripts for bitrix and upload dirs backup
#1
parent
65d4df8b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
backup_bitrix.sh
backup_bitrix.sh
+5
-0
gitlab-ci.yml
gitlab-ci.yml
+5
-6
restore_bitrix.sh
restore_bitrix.sh
+5
-0
No files found.
backup_bitrix.sh
0 → 100644
View file @
c1538b62
#!/bin/bash
export
ARTIFACTS_PATH
=
"
$HOME
/localartifacts/
$CI_PROJECT_NAMESPACE
/
$CI_PROJECT_NAME
/
$CI_PIPELINE_ID
/"
mkdir
-p
$ARTIFACTS_PATH
tar
-czf
bitrix.tar.gz www/bitrix/ www/upload/
mv
bitrix.tar.gz
$ARTIFACTS_PATH
gitlab-ci.yml
View file @
c1538b62
...
@@ -9,18 +9,14 @@ variables:
...
@@ -9,18 +9,14 @@ variables:
save_user_data
:
save_user_data
:
stage
:
startup
stage
:
startup
script
:
script
:
-
echo 'Create artifacts for Bitrix core'
-
bash backup_bitrix.sh
# - export
variables
:
variables
:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
cache
:
cache
:
paths
:
paths
:
-
www/bitrix/
-
www/bitrix/
-
www/upload/
-
www/upload/
artifacts
:
paths
:
-
www/bitrix/
-
www/upload/
expire_in
:
1 day
startup
:
startup
:
stage
:
startup
stage
:
startup
...
@@ -43,6 +39,7 @@ startup:
...
@@ -43,6 +39,7 @@ startup:
.migrations
:
.migrations
:
stage
:
build
stage
:
build
script
:
script
:
-
bash restore_bitrix.sh
-
docker-compose exec -T bitrix bash -c 'composer update'
-
docker-compose exec -T bitrix bash -c 'composer update'
-
docker-compose exec -T bitrix bash -c 'php migrator migrate'
-
docker-compose exec -T bitrix bash -c 'php migrator migrate'
cache
:
cache
:
...
@@ -52,7 +49,9 @@ startup:
...
@@ -52,7 +49,9 @@ startup:
deploy
:
deploy
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
bash restore_bitrix.sh
-
echo 'Get all artifacts from previous stages, so site working properly'
-
echo 'Get all artifacts from previous stages, so site working properly'
# - export
.restore_bitrix
:
.restore_bitrix
:
stage
:
build
stage
:
build
...
...
restore_bitrix.sh
0 → 100644
View file @
c1538b62
#!/bin/bash
export
ARTIFACTS_PATH
=
"
$HOME
/localartifacts/
$CI_PROJECT_NAMESPACE
/
$CI_PROJECT_NAME
/
$CI_PIPELINE_ID
/"
cp
$ARTIFACTS_PATH
/bitrix.tar.gz
.
tar
-xzvf
bitrix.tar.gz
rm
-f
bitrix.tar.gz
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