Commit 5cbdd632 authored by Siva Rama Krishna's avatar Siva Rama Krishna

validation stage for pipeline

parent 21b98fe5
...@@ -3,12 +3,11 @@ variables: ...@@ -3,12 +3,11 @@ variables:
SERVICE_PORT: 80 SERVICE_PORT: 80
REGISTRY_URL: 279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo REGISTRY_URL: 279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo
stages: stages:
- Build - Build
- ReleaseCleanup - ReleaseCleanup
- ReleaseDeploy - ReleaseDeploy
- Validation
Build: Build:
stage: Build stage: Build
...@@ -24,7 +23,6 @@ ReleaseCleanup: ...@@ -24,7 +23,6 @@ ReleaseCleanup:
- cd ./helm && /usr/local/bin/helm delete --purge $RELEASE_NAME && exit 0 - cd ./helm && /usr/local/bin/helm delete --purge $RELEASE_NAME && exit 0
allow_failure: true allow_failure: true
ReleaseDeploy: ReleaseDeploy:
stage: ReleaseDeploy stage: ReleaseDeploy
script: script:
...@@ -32,3 +30,10 @@ ReleaseDeploy: ...@@ -32,3 +30,10 @@ ReleaseDeploy:
- sed -i s/#BUILD_ID#/$CI_PIPELINE_ID/g ./helm/service/values.yaml - sed -i s/#BUILD_ID#/$CI_PIPELINE_ID/g ./helm/service/values.yaml
- sed -i s/#SERVICE_PORT#/$SERVICE_PORT/g ./helm/service/values.yaml - sed -i s/#SERVICE_PORT#/$SERVICE_PORT/g ./helm/service/values.yaml
- cd ./helm && /usr/local/bin/helm install service --name $RELEASE_NAME - cd ./helm && /usr/local/bin/helm install service --name $RELEASE_NAME
Validation:
stage: Validation
script:
- sleep 45
- if [ `curl -s -o /dev/null -I -w "%{http_code}" https://pgtest.altimetrik.com/$RELEASE_NAME` = "200" ]; then exit 0; else exit 1; fi
allow_failure: false
...@@ -6,7 +6,6 @@ server { ...@@ -6,7 +6,6 @@ server {
default_type application/octet-stream; default_type application/octet-stream;
gzip on; gzip on;
gzip_http_version 1.1; gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\."; gzip_disable "MSIE [1-6]\.";
...@@ -16,12 +15,10 @@ server { ...@@ -16,12 +15,10 @@ server {
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9; gzip_comp_level 9;
root /usr/share/nginx/html; root /usr/share/nginx/html;
location /SERVICE_NAME/ { location /SERVICE_NAME/ {
try_files $uri $uri/ /SERVICE_NAME/index.html?$query_string; try_files $uri $uri/ /SERVICE_NAME/index.html?$query_string;
} }
} }
...@@ -6,7 +6,6 @@ server { ...@@ -6,7 +6,6 @@ server {
default_type application/octet-stream; default_type application/octet-stream;
gzip on; gzip on;
gzip_http_version 1.1; gzip_http_version 1.1;
gzip_disable "MSIE [1-6]\."; gzip_disable "MSIE [1-6]\.";
...@@ -16,10 +15,8 @@ server { ...@@ -16,10 +15,8 @@ server {
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_comp_level 9; gzip_comp_level 9;
root /usr/share/nginx/html; root /usr/share/nginx/html;
location / { location / {
try_files $uri $uri/ /index.html =404; try_files $uri $uri/ /index.html =404;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment