Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
881
Issues
881
List
Boards
Labels
Service Desk
Milestones
Merge Requests
51
Merge Requests
51
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
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
cb6d64cbcc8c67cba48ab3a419fb9e756e481c42...5ed6e5760a20102fa0aceb517f5766f0d661cae7
Source
5ed6e5760a20102fa0aceb517f5766f0d661cae7
Select Git revision
...
Target
cb6d64cbcc8c67cba48ab3a419fb9e756e481c42
Select Git revision
Compare
Commits (2)
(chore): use pipeline id vs commit id
· eccb8c13
Mark Harding
authored
2 hours ago
eccb8c13
Merge branch 'fix/use-pipeline-id-vs-commit' into 'master'
· 5ed6e576
Mark Harding
authored
2 hours ago
(chore): use pipeline id vs commit id See merge request
!518
5ed6e576
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
18 deletions
+18
-18
.gitlab-ci.yml
.gitlab-ci.yml
+18
-18
No files found.
.gitlab-ci.yml
View file @
5ed6e576
...
...
@@ -60,7 +60,7 @@ e2e:chrome:
build:review:
stage
:
build
before_script
:
-
sed -ri "s|\"VERSION\"|\"$CI_
COMMIT_SHA
\"|" src/environments/environment.prod.ts
-
sed -ri "s|\"VERSION\"|\"$CI_
PIPELINE_ID
\"|" src/environments/environment.prod.ts
script
:
-
npm ci && npm install -g gulp-cli
-
npm run postinstall
...
...
@@ -78,7 +78,7 @@ build:review:
build:production:en:
stage
:
build
before_script
:
-
sed -ri "s|\"VERSION\"|\"$CI_
COMMIT_SHA
\"|" src/environments/environment.prod.ts
-
sed -ri "s|\"VERSION\"|\"$CI_
PIPELINE_ID
\"|" src/environments/environment.prod.ts
script
:
-
npm ci && npm install -g gulp-cli
-
npm run postinstall
...
...
@@ -96,7 +96,7 @@ build:production:en:
build:production:i18n:
stage
:
build
before_script
:
-
sed -ri "s|\"VERSION\"|\"$CI_
COMMIT_SHA
\"|" src/environments/environment.prod.ts
-
sed -ri "s|\"VERSION\"|\"$CI_
PIPELINE_ID
\"|" src/environments/environment.prod.ts
script
:
-
npm ci && npm install -g gulp-cli
-
npm run postinstall
...
...
@@ -119,20 +119,20 @@ build:production:i18n:
stage
:
prepare
image
:
getsentry/sentry-cli
script
:
-
echo "Create a new release $CI_
COMMIT_SHA
"
-
sentry-cli releases new $CI_
COMMIT_SHA
-
sentry-cli releases set-commits --auto $CI_
COMMIT_SHA
-
sentry-cli releases files $CI_
COMMIT_SHA
upload-sourcemaps $CI_PROJECT_DIR/dist/en -x .js -x .map --validate --url-prefix $SOURCEMAP_PREFIX
-
sentry-cli releases finalize $CI_
COMMIT_SHA
-
echo "Finalized release for $CI_
COMMIT_SHA
"
-
echo "Create a new release $CI_
PIPELINE_ID
"
-
sentry-cli releases new $CI_
PIPELINE_ID
-
sentry-cli releases set-commits --auto $CI_
PIPELINE_ID
-
sentry-cli releases files $CI_
PIPELINE_ID
upload-sourcemaps $CI_PROJECT_DIR/dist/en -x .js -x .map --validate --url-prefix $SOURCEMAP_PREFIX
-
sentry-cli releases finalize $CI_
PIPELINE_ID
-
echo "Finalized release for $CI_
PIPELINE_ID
"
prepare:review:
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
-
docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
-f containers/front-init/Dockerfile dist/.
-
docker push $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
dependencies
:
-
build:review
except
:
...
...
@@ -156,8 +156,8 @@ prepare:production:
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
-
docker build -t $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
-f containers/front-init/Dockerfile dist/.
-
docker push $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
only
:
refs
:
-
master
...
...
@@ -208,14 +208,14 @@ review:start:
--install
\
--reuse-values
\
--set
frontInit.image.repository=$CI_REGISTRY_IMAGE/front-init
\
--set
frontInit.image.tag=$CI_BUILD_REF
\
--set
-string
frontInit.image.tag=$CI_PIPELINE_ID
\
--set
domain=$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
\
--set
elasticsearch.clusterName=$CI_BUILD_REF_SLUG--elasticsearch
\
--wait
\
$CI_BUILD_REF_SLUG
\
./helm-charts/minds"
# Update sentry
-
sentry-cli releases deploys $CI_
COMMIT_SHA
new -e review-$CI_COMMIT_REF_SLUG
-
sentry-cli releases deploys $CI_
PIPELINE_ID
new -e review-$CI_COMMIT_REF_SLUG
environment
:
name
:
review/$CI_COMMIT_REF_NAME
url
:
https://$CI_BUILD_REF_SLUG.$KUBE_INGRESS_BASE_DOMAIN
...
...
@@ -242,13 +242,13 @@ review:stop:
-
$(aws ecr get-login --no-include-email --region us-east-1)
## Update docker front-init container
-
docker login -u gitlab-ci-token -p ${CI_BUILD_TOKEN} ${CI_REGISTRY}
-
docker pull $CI_REGISTRY_IMAGE/front-init:$CI_
BUILD_REF
-
docker tag $CI_REGISTRY_IMAGE/front-init:$CI_
BUILD_REF
$ECR_REPOSITORY_URL:$IMAGE_LABEL
-
docker pull $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
-
docker tag $CI_REGISTRY_IMAGE/front-init:$CI_
PIPELINE_ID
$ECR_REPOSITORY_URL:$IMAGE_LABEL
-
docker push $ECR_REPOSITORY_URL:$IMAGE_LABEL
## Deploy the new container in rolling restart
-
aws ecs update-service --service=$ECS_SERVICE --force-new-deployment --region us-east-1 --cluster=$ECS_CLUSTER
## Update sentry
-
sentry-cli releases deploys $CI_
COMMIT_SHA
new -e $IMAGE_LABEL
-
sentry-cli releases deploys $CI_
PIPELINE_ID
new -e $IMAGE_LABEL
dependencies
:
-
build:production:en
-
build:production:i18n
...
...
This diff is collapsed.
Click to expand it.