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
b5c600da
Commit
b5c600da
authored
1 week ago
by
Sebastian Pisula
Browse files
Options
Downloads
Patches
Plain Diff
feature(core): simplify GitLab CI variables and update build paths
parent
210b5032
No related branches found
No related tags found
1 merge request
!26
feature(core): simplify GitLab CI variables and update build paths
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gitlab-ci.yml
+3
-6
3 additions, 6 deletions
gitlab-ci.yml
with
3 additions
and
6 deletions
gitlab-ci.yml
+
3
−
6
View file @
b5c600da
...
@@ -17,13 +17,11 @@ stages:
...
@@ -17,13 +17,11 @@ stages:
when
:
always
when
:
always
variables
:
variables
:
APP_ENV
:
"
staging"
APP_ENV
:
"
staging"
SHOPIFY_APP_CLIENT_ID
:
$STAGING_SHOPIFY_APP_CLIENT_ID
MANTLE_PIXEL_TOKEN
:
$STAGING_MANTLE_PIXEL_TOKEN
MANTLE_PIXEL_TOKEN
:
$STAGING_MANTLE_PIXEL_TOKEN
-
if
:
'
$CI_COMMIT_TAG'
-
if
:
'
$CI_COMMIT_TAG'
when
:
always
when
:
always
variables
:
variables
:
APP_ENV
:
"
production"
APP_ENV
:
"
production"
SHOPIFY_APP_CLIENT_ID
:
$PRODUCTION_SHOPIFY_APP_CLIENT_ID
MANTLE_PIXEL_TOKEN
:
$PRODUCTION_MANTLE_PIXEL_TOKEN
MANTLE_PIXEL_TOKEN
:
$PRODUCTION_MANTLE_PIXEL_TOKEN
.template
:
&deploy-rules
.template
:
&deploy-rules
...
@@ -69,11 +67,11 @@ build web frontend:
...
@@ -69,11 +67,11 @@ build web frontend:
image
:
node:latest
image
:
node:latest
artifacts
:
artifacts
:
paths
:
paths
:
-
web/
frontend/dist
-
web/
backend/public/build
stage
:
build
stage
:
build
before_script
:
before_script
:
-
if [ "$APP_ENV" == "" ]; then echo "APP_ENV is empty" ; exit 1; fi
-
if [ "$APP_ENV" == "" ]; then echo "APP_ENV is empty" ; exit 1; fi
-
if [ "$
SHOPIFY_APP_CLIENT_ID
" == "" ]; then echo "
SHOPIFY_APP_CLIENT_ID
is empty" ; exit 1; fi
-
if [ "$
MANTLE_PIXEL_TOKEN
" == "" ]; then echo "
MANTLE_PIXEL_TOKEN
is empty" ; exit 1; fi
-
echo $APP_ENV;
-
echo $APP_ENV;
-
node -v
-
node -v
-
cd web/frontend
-
cd web/frontend
...
@@ -108,7 +106,6 @@ deploy web:
...
@@ -108,7 +106,6 @@ deploy web:
-
ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts
-
ssh-keyscan -H -p $DEPLOY_PORT $DEPLOY_HOST >> ~/.ssh/known_hosts
-
export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs"
-
export RSYNC_RSH="ssh -p $DEPLOY_PORT -v -i ~/.ssh/id_rsa_demo_fs"
-
rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
-
rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/backend/.distignore ${CI_PROJECT_DIR}/web/backend/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR
-
rsync -v --delete -rlDe "$RSYNC_RSH" --exclude-from=web/frontend/.distignore ${CI_PROJECT_DIR}/web/frontend/dist/ $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_DIR/public
-
ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY"
-
ssh -p $DEPLOY_PORT -i ~/.ssh/id_rsa_demo_fs $DEPLOY_USER@$DEPLOY_HOST "cd $DEPLOY_DIR && php bin/console doctrine:migrations:migrate --no-interaction && php bin/console cache:clear && $RUN_AFTER_DEPLOY"
after_script
:
after_script
:
-
$DEPLOY_AFTER_SCRIPT
-
$DEPLOY_AFTER_SCRIPT
...
@@ -121,5 +118,5 @@ deploy app:
...
@@ -121,5 +118,5 @@ deploy app:
image
:
node:latest
image
:
node:latest
stage
:
deploy
stage
:
deploy
script
:
script
:
-
npm ci
-
npm ci
--prefer-offline --no-audit
-
npm run deploy -- --force --version=$RELEASE_VERSION --config=$SHOPIFY_APP_CONFIG
-
npm run deploy -- --force --version=$RELEASE_VERSION --config=$SHOPIFY_APP_CONFIG
\ No newline at end of file
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