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
876
Issues
876
List
Boards
Labels
Service Desk
Milestones
Merge Requests
53
Merge Requests
53
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
Commits
083fb0aa
Commit
083fb0aa
authored
1 hour ago
by
Mark Harding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(chore): use pipeline id vs commit id
parent
cb6d64cb
fix/use-pipeline-id-vs-commit
1 merge request
!518
(chore): use pipeline id vs commit id
Pipeline
#78486240
running with stages
Changes
1
Pipelines
1
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 @
083fb0aa
...
...
@@ -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.
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