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
2a0b3b58
Commit
2a0b3b58
authored
Mar 25, 2017
by
Карнаухов Константин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ci): update continuous integration config
add environments, rename jobs
parent
2bcb2480
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
41 deletions
+26
-41
gitlab-ci.yml
gitlab-ci.yml
+26
-41
No files found.
gitlab-ci.yml
View file @
2a0b3b58
...
@@ -5,68 +5,53 @@ stages:
...
@@ -5,68 +5,53 @@ stages:
variables
:
variables
:
BUILD_PATH
:
"
www/dist"
BUILD_PATH
:
"
www/dist"
STAGING_URL
:
"
http://staging.1.dev.1119.zolotoykod.ru"
PRODUCTION_URL
:
"
http://production.1.dev.1119.zolotoykod.ru"
s
ave_user_data
:
s
tatus
:
stage
:
startup
stage
:
startup
script
:
script
:
-
bash backup_bitrix.sh
-
git status
variables
:
variables
:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
only
:
-
master
startup
:
docker
:
stage
:
startup
stage
:
startup
script
:
script
:
-
docker-compose up -d
-
docker-compose up -d
only
:
-
master
.build_assets
:
staging
:
stage
:
build
stage
:
build
script
:
script
:
-
docker-compose exec -T bitrix
bash -c 'yarn install'
-
docker-compose exec -T bitrix
/bin/bash /link_bx.sh /home/bitrix/site
-
docker-compose exec -T bitrix
bash -c 'gulp'
-
docker-compose exec -T bitrix
/bin/bash /build.sh
cache
:
cache
:
paths
:
paths
:
-
www/node_modules/
-
www/node_modules/
-
www/vendor/
environment
:
name
:
staging
url
:
$STAGING_URL
artifacts
:
artifacts
:
paths
:
paths
:
-
$BUILD_PATH
-
$BUILD_PATH
expire_in
:
1 day
expire_in
:
1 day
only
:
-
master
.migrations
:
production
:
stage
:
build
script
:
-
bash restore_bitrix.sh
-
docker-compose exec -T bitrix bash -c 'composer update'
-
docker-compose exec -T bitrix bash -c 'php migrator migrate'
cache
:
paths
:
-
www/vendor/
deploy
:
stage
:
deploy
stage
:
deploy
script
:
script
:
-
bash restore_bitrix.sh
-
export
-
echo 'Get all artifacts from previous stages, so site working properly'
-
echo 'Deploy to production soon'
.restore_bitrix
:
stage
:
build
variables
:
GIT_STRATEGY
:
none
script
:
-
docker-compose exec -T bitrix bash -c 'cp /home/bitrix/backup/bitrix.tar.gz .'
-
docker-compose exec -T bitrix bash -c 'tar -xzvf bitrix.tar.gz'
-
docker-compose exec -T bitrix bash -c 'rm -f bitrix.tar.gz'
when
:
manual
.backup_bitrix
:
stage
:
build
variables
:
variables
:
GIT_STRATEGY
:
none
GIT_STRATEGY
:
none
script
:
environment
:
-
tar -czf bitrix.tar.gz bitrix/ upload/
name
:
production
-
mv bitrix.tar.gz /tmp/
url
:
$PRODUCTION_URL
artifacts
:
only
:
paths
:
-
tags
-
www/bitrix/
-
www/upload/
expire_in
:
1 day
when
:
manual
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