Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
832
Issues
832
List
Boards
Labels
Service Desk
Milestones
Merge Requests
71
Merge Requests
71
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
aa6a93b9233c16a32acc1f873268dec5c475fdc9...fc29359a85df46d16ac4e0363cc41173650614d8
Source
fc29359a85df46d16ac4e0363cc41173650614d8
Select Git revision
...
Target
aa6a93b9233c16a32acc1f873268dec5c475fdc9
Select Git revision
Compare
Commits (2)
(feat): staging flow for frontend too
· dac9fd24
Mark Harding
authored
7 hours ago
-subdomain=sgtpepper
dac9fd24
Merge remote-tracking branch 'upstream/master' into sprint/HipsterHedgehog.feat.update-to-angular-8
· fc29359a
Marcelo Rivera
authored
2 hours ago
-subdomain=angular8
fc29359a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
8 deletions
+98
-8
.gitlab-ci.yml
.gitlab-ci.yml
+92
-8
Dockerfile
containers/front-init/Dockerfile
+6
-0
No files found.
.gitlab-ci.yml
View file @
fc29359a
...
...
@@ -6,8 +6,15 @@ services:
stages
:
-
test
-
build
-
prepare
-
deploy
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
dist
policy
:
pull
test
:
image
:
circleci/node:8-browsers
stage
:
test
...
...
@@ -15,7 +22,28 @@ test:
-
npm install
# Should be cached...
-
npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
build
:
build:staging
:
stage
:
build
script
:
-
npm install
# TODO: Why is this needed?
-
npm run postinstall
-
npm install -g gulp-cli
-
gulp build.sass && gulp build.sass
##weird build needs to be run twice for now
-
sh build/base-locale.sh dist
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
dist
policy
:
push
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
except
:
refs
:
-
master
-
test/gitlab-ci
build:production:en
:
stage
:
build
script
:
-
npm install
# TODO: Why is this needed?
...
...
@@ -25,6 +53,7 @@ build:
-
sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
-
sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
dist
policy
:
push
...
...
@@ -33,17 +62,72 @@ build:
-
master
-
test/gitlab-ci
deploy
:
stage
:
deploy
build:production:i18n
:
stage
:
build
script
:
-
apk add --no-cache python py-pip
-
pip install awscli
-
aws s3 sync dist $REPOSITORY_URL
-
aws ecs update-service --service=$SERVICE --force-new-deployment --region us-east-1 --cluster=$CLUSTER
-
npm install
# TODO: Why is this needed?
-
npm run postinstall
-
npm install -g gulp-cli
-
gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en
##weird build needs to be run twice for now
-
sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
cache
:
key
:
"
$CI_COMMIT_REF_SLUG"
paths
:
-
dist
policy
:
pull
policy
:
push
only
:
refs
:
-
master
-
test/gitlab-ci
prepare
:
stage
:
prepare
image
:
minds/ci:latest
script
:
-
docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
-
docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF -f containers/front-init/Dockerfile dist/.
-
docker push $CI_REGISTRY_IMAGE/front-init:$CI_BUILD_REF
environment
:
name
:
staging
except
:
refs
:
-
master
-
test/gitlab-ci
deploy:staging
:
stage
:
deploy
image
:
minds/helm-eks:latest
script
:
-
aws eks update-kubeconfig --name=sandbox
-
STAGING_SUBDOMAIN=$(echo $CI_COMMIT_MESSAGE | sed -n 's/.* -subdomain=\([^ ]*\).*/\1/p')
-
echo "Subdomain will be setup at $STAGING_SUBDOMAIN"
-
git clone --branch=sandbox-wip https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.com/minds/helm-charts.git
-
"
helm
upgrade
\
--install
\
--reuse-values
\
--set
frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init
\
--set
frontInit.image.tag=$CI_BUILD_REF
\
--set
domain=$STAGING_SUBDOMAIN.$STAGING_DOMAIN
\
--set
elasticsearch.clusterName=$STAGING_SUBDOMAIN
\
--wait
\
$STAGING_SUBDOMAIN
\
./helm-charts/minds"
environment
:
name
:
staging
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
except
:
refs
:
-
master
-
test/gitlab-ci
deploy:production
:
stage
:
deploy
image
:
minds/ci:latest
script
:
-
aws s3 sync dist $REPOSITORY_URL
-
aws ecs update-service --service=$SERVICE --force-new-deployment --region us-east-1 --cluster=$CLUSTER
only
:
refs
:
-
master
...
...
This diff is collapsed.
Click to expand it.
containers/front-init/Dockerfile
0 → 100644
View file @
fc29359a
FROM
alpine:edge
COPY
. dist
## Hack to make initial laguage load
COPY
en/index.php dist/index.php
\ No newline at end of file
This diff is collapsed.
Click to expand it.