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 Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
162
Issues
162
List
Boards
Labels
Service Desk
Milestones
Merge Requests
49
Merge Requests
49
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 Backend - Engine
Commits
68b04cb4
Commit
68b04cb4
authored
4 hours ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(feat): use gitlab environments vs commit message
parent
d07a5173
test/gitlab-ci-environemtns
1 merge request
!233
Test/gitlab ci environemtns
Pipeline
#68690947
passed with stages
in 7 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
22 deletions
+18
-22
.gitlab-ci.yml
.gitlab-ci.yml
+18
-22
No files found.
.gitlab-ci.yml
View file @
68b04cb4
...
...
@@ -7,7 +7,7 @@ stages:
-
build
-
test
-
prepare
-
staging
-
review
-
deploy
cache
:
...
...
@@ -49,48 +49,44 @@ prepare:runners:
-
docker build -t $CI_REGISTRY_IMAGE/runners:$CI_BUILD_REF -f containers/php-runners/Dockerfile .
-
docker push $CI_REGISTRY_IMAGE/runners:$CI_BUILD_REF
staging
:start
:
stage
:
staging
review
:start
:
stage
:
review
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
phpfpm.image.repository=$CI_REGISTRY_IMAGE/fpm
\
--set
phpfpm.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"
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
environment
:
name
:
staging
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
on_stop
:
review:stop
except
:
refs
:
-
master
-
test/gitlab-ci
staging
:stop
:
stage
:
staging
review
:stop
:
stage
:
review
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 "TODO tear down $STAGING_SUBDOMAIN"
-
helm del --purge $STAGING_SUBDOMAIN
when
:
manual
only
:
variables
:
-
$CI_COMMIT_MESSAGE =~ /-subdomain/
-
helm del --purge $CI_BUILD_REF_SLUG
environment
:
name
:
staging
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
action
:
stop
variables
:
GIT_STRATEGY
:
none
when
:
manual
except
:
refs
:
-
master
...
...
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