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
73
Merge Requests
73
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
Commits
cf6a2908
Commit
cf6a2908
authored
3 hours ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): use gitlab environments vs commit message
parent
831c5249
No related merge requests found
Pipeline
#68690628
failed with stages
in 8 minutes and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
.gitlab-ci.yml
.gitlab-ci.yml
+24
-16
No files found.
.gitlab-ci.yml
View file @
cf6a2908
...
...
@@ -22,7 +22,7 @@ test:
-
npm install
# Should be cached...
-
npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
build:
staging
:
build:
review
:
stage
:
build
script
:
-
npm install
# TODO: Why is this needed?
...
...
@@ -35,9 +35,6 @@ build:staging:
paths
:
-
dist
policy
:
push
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
except
:
refs
:
-
master
...
...
@@ -87,41 +84,52 @@ prepare:
-
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
:
deploy:
review
:
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
-elasticsearch
\
--set
domain=$
CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE
_DOMAIN
\
--set
elasticsearch.clusterName=$
CI_BUILD_REF_SLUG-
-elasticsearch
\
--wait
\
$
STAGING_SUBDOMAIN
\
$
CI_BUILD_REF_SLUG
\
./helm-charts/minds"
environment
:
name
:
staging
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
on_stop
:
deploy:review:stop
except
:
refs
:
-
master
-
test/gitlab-ci
deploy:review:stop
:
stage
:
deploy
image
:
minds/helm-eks:latest
script
:
-
aws eks update-kubeconfig --name=sandbox
-
helm del --purge $CI_BUILD_REF_SLUG
environment
:
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
action
:
stop
except
:
refs
:
-
master
-
test/gitlab-ci
deploy:production
:
stage
:
deploy
image
:
minds/ci:latest
...
...
This diff is collapsed.
Click to expand it.
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