Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gitlab-ci
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
wpdesk
Predators
Shopify
Tools
gitlab-ci
Commits
55bd0736
Commit
55bd0736
authored
1 year ago
by
Grzegorz Rola
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/deploy-port' into 'main'
feature(deploy): port See merge request
!18
parents
961a43c4
fee5ca13
No related branches found
No related tags found
1 merge request
!18
feature(deploy): port
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab-ci.yml
+7
-3
7 additions, 3 deletions
gitlab-ci.yml
with
7 additions
and
3 deletions
gitlab-ci.yml
+
7
−
3
View file @
55bd0736
...
...
@@ -4,10 +4,12 @@ variables:
GIT_STRATEGY
:
fetch
PRODUCTION_SHOPIFY_API_KEY
:
"
"
PRODUCTION_DEPLOY_HOST
:
s125.cyber-folks.pl
PRODUCTION_DEPLOY_PORT
:
222
PRODUCTION_DEPLOY_USER
:
wlgmnfabmq
PRODUCTION_DEPLOY_DIR
:
"
"
STAGE_SHOPIFY_API_KEY
:
"
"
STAGE_DEPLOY_HOST
:
s125.cyber-folks.pl
STAGE_DEPLOY_PORT
:
222
STAGE_DEPLOY_USER
:
wlgmnfabmq
STAGE_DEPLOY_DIR
:
"
"
RUN_AFTER_DEPLOY
:
"
pwd"
...
...
@@ -53,9 +55,9 @@ stages:
-
if [ "$DEPLOY_USER" ] == "" ]; then echo "DEPLOY_USER is empty" ; exit 1; fi
-
if [ "$DEPLOY_DIR" ] == "" ]; then echo "DEPLOY_DIR is empty" ; exit 1; fi
-
ls -al
-
ssh-keyscan -H -p
222
$DEPLOY_HOST >> ~/.ssh/known_hosts
-
rsync -v --delete -rlDe 'ssh -p
222
-v -i ~/.ssh/id_rsa_demo_fs' --exclude-from=.distignore ${CI_PROJECT_DIR}/web/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
-
ssh -p
222
-i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php82 bin/console doctrine:migrations:migrate --no-interaction && php82 bin/console cache:clear && $RUN_AFTER_DEPLOY"
-
ssh-keyscan -H -p
$DEPLOY_PORT
$DEPLOY_HOST >> ~/.ssh/known_hosts
-
rsync -v --delete -rlDe 'ssh -p
$DEPLOY_PORT
-v -i ~/.ssh/id_rsa_demo_fs' --exclude-from=.distignore ${CI_PROJECT_DIR}/web/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
-
ssh -p
$DEPLOY_PORT
-i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && mv frontend/dist/assets/ public/ && mv frontend/dist/index.html public/index.html && php82 bin/console doctrine:migrations:migrate --no-interaction && php82 bin/console cache:clear && $RUN_AFTER_DEPLOY"
after_script
:
-
$DEPLOY_AFTER_SCRIPT
...
...
@@ -63,6 +65,7 @@ stages:
<<
:
*deploy-template
variables
:
DEPLOY_HOST
:
$STAGE_DEPLOY_HOST
DEPLOY_PORT
:
$STAGE_DEPLOY_PORT
DEPLOY_USER
:
$STAGE_DEPLOY_USER
DEPLOY_DIR
:
$STAGE_DEPLOY_DIR
dependencies
:
...
...
@@ -73,6 +76,7 @@ stages:
<<
:
*deploy-template
variables
:
DEPLOY_HOST
:
$PRODUCTION_DEPLOY_HOST
DEPLOY_PORT
:
$PRODUCTION_DEPLOY_PORT
DEPLOY_USER
:
$PRODUCTION_DEPLOY_USER
DEPLOY_DIR
:
$PRODUCTION_DEPLOY_DIR
dependencies
:
...
...
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