Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
appjava
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
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
rpathak
appjava
Commits
5130954f
Commit
5130954f
authored
Mar 05, 2019
by
nmuthusamy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit
parent
ad1165ef
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
46 additions
and
39 deletions
+46
-39
.gitlab-ci.yml
.gitlab-ci.yml
+10
-15
Chart.yaml
helm/service/Chart.yaml
+2
-1
NOTES.txt
helm/service/templates/NOTES.txt
+2
-1
_helpers.tpl
helm/service/templates/_helpers.tpl
+2
-1
deployment.yaml
helm/service/templates/deployment.yaml
+2
-1
ingress.yaml
helm/service/templates/ingress.yaml
+2
-1
service.yaml
helm/service/templates/service.yaml
+2
-1
test-connection.yaml
helm/service/templates/tests/test-connection.yaml
+2
-1
values.yaml
helm/service/values.yaml
+18
-13
Hello.java
src/main/java/com/altimetrik/controllers/Hello.java
+4
-4
No files found.
.gitlab-ci.yml
View file @
5130954f
variables
:
RELEASE_NAME
:
"
SERVICE_NAME"
SERVICE_PORT
:
1099
REGISTRY_URL
:
279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo
SONAR_URL
:
"
http://pg-sonar-altimetrik-com-82028342.us-west-2.elb.amazonaws.com"
SONAR_LOGIN
:
"
cc3fc35cad01a325d1b3904bcf3aa38b153fa7f1"
REGISTRY_URL
:
751503455312.dkr.ecr.us-west-2.amazonaws.com/pgnonprod
stages
:
-
Build
...
...
@@ -17,20 +15,17 @@ Build:
stage
:
Build
script
:
-
mvn clean install
-
$(aws ecr get-login --no-include-email --region us-
east-1
)
-
docker build -t
279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo
:$CI_PIPELINE_ID .
-
docker push
279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo
:$CI_PIPELINE_ID
-
$(aws ecr get-login --no-include-email --region us-
west-2
)
-
docker build -t
751503455312.dkr.ecr.us-west-2.amazonaws.com/pgnonprod
:$CI_PIPELINE_ID .
-
docker push
751503455312.dkr.ecr.us-west-2.amazonaws.com/pgnonprod
:$CI_PIPELINE_ID
sonar
:
stage
:
Test
script
:
-
mvn --batch-mode verify sonar:sonar -Dsonar.exclusions="pom.xml" -Dsonar.host.url=$SONAR_URL -Dsonar.login=$SONAR_LOGIN
ReleaseCleanup
:
stage
:
ReleaseCleanup
script
:
-
echo `pwd`
-
cd ./helm && /
usr/local/
bin/helm delete --purge $RELEASE_NAME && exit 0
-
cd ./helm && /
s
bin/helm delete --purge $RELEASE_NAME && exit 0
allow_failure
:
true
...
...
@@ -40,4 +35,4 @@ ReleaseDeploy:
-
echo `pwd`
-
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
-
cd ./helm && /usr/local/bin/helm install service --name $RELEASE_NAME
\ No newline at end of file
-
cd ./helm && /sbin/helm install service --name $RELEASE_NAME
\ No newline at end of file
helm/service/Chart.yaml
View file @
5130954f
...
...
@@ -2,4 +2,4 @@ apiVersion: v1
appVersion
:
"
1.0"
description
:
A Helm chart for Kubernetes
name
:
SERVICE_NAME
version
:
0.1.0
version
:
0.1.0
\ No newline at end of file
helm/service/templates/NOTES.txt
View file @
5130954f
...
...
@@ -18,4 +18,4 @@
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "SERVICE_NAME.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl port-forward $POD_NAME 8080:80
{{- end }}
{{- end }}
\ No newline at end of file
helm/service/templates/_helpers.tpl
View file @
5130954f
...
...
@@ -29,4 +29,4 @@ Create chart name and version as used by the chart label.
*/
}
}
{{- define "SERVICE_NAME.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
\ No newline at end of file
helm/service/templates/deployment.yaml
View file @
5130954f
...
...
@@ -40,4 +40,4 @@ spec:
{{
- with .Values.tolerations
}}
tolerations
:
{{
- toYaml . | nindent 8
}}
{{
- end
}}
{{
- end
}}
\ No newline at end of file
helm/service/templates/ingress.yaml
View file @
5130954f
...
...
@@ -37,4 +37,4 @@ spec:
servicePort
:
http
{{
- end
}}
{{
- end
}}
{{
- end
}}
{{
- end
}}
\ No newline at end of file
helm/service/templates/service.yaml
View file @
5130954f
...
...
@@ -16,4 +16,4 @@ spec:
name
:
http
selector
:
app.kubernetes.io/name
:
{{
include "SERVICE_NAME.name" .
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
app.kubernetes.io/instance
:
{{
.Release.Name
}}
\ No newline at end of file
helm/service/templates/tests/test-connection.yaml
View file @
5130954f
...
...
@@ -15,4 +15,4 @@ spec:
image
:
busybox
command
:
[
'
wget'
]
args
:
[
'
{{
include
"SERVICE_NAME.fullname"
.
}}:{{
.Values.service.port
}}'
]
restartPolicy
:
Never
restartPolicy
:
Never
\ No newline at end of file
helm/service/values.yaml
View file @
5130954f
...
...
@@ -5,7 +5,7 @@
replicaCount
:
1
image
:
repository
:
279716074232.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo
repository
:
751503455312.dkr.ecr.us-west-2.amazonaws.com/pgnonprod
tag
:
#BUILD_ID#
pullPolicy
:
IfNotPresent
...
...
@@ -13,22 +13,26 @@ nameOverride: ""
fullnameOverride
:
"
"
service
:
type
:
LoadBalancer
type
:
NodePort
port
:
80
internalport
:
#SERVICE_PORT#
ingress
:
enabled
:
false
annotations
:
{}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
paths
:
[]
enabled
:
true
annotations
:
kubernetes.io/ingress.class
:
nginx
nginx.ingress.kubernetes.io/rewrite-target
:
/
#kubernetes.io/tls-acme: "true"
paths
:
path
:
/SERVICE_NAME
hosts
:
-
chart-example.local
tls
:
[]
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
# - afe6ec7ed3f3711e9b98006759708723-313212737.us-west-2.elb.amazonaws.com
-
pgtest.altimetrik.com
tls
:
-
secretName
:
custom-tls-cert
hosts
:
-
pgtest.altimetrik.com
resources
:
{}
# We usually recommend not to specify default resources and to leave this as a conscious
...
...
@@ -46,4 +50,4 @@ nodeSelector: {}
tolerations
:
[]
affinity
:
{}
affinity
:
{}
\ No newline at end of file
src/main/java/com/altimetrik/controllers/Hello.java
View file @
5130954f
...
...
@@ -11,10 +11,10 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping
(
value
=
"/hello"
)
public
class
Hello
{
@GetMapping
(
value
=
"/"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
)
public
ResponseEntity
<
String
>
get
Message
()
{
System
.
out
.
println
(
"Inside first API"
);
return
new
ResponseEntity
<>(
"Wecome to Playground..."
,
HttpStatus
.
OK
);
@GetMapping
(
value
=
"/"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
ALL_VALUE
)
public
ResponseEntity
<
String
>
get
UserDetailByGitlabEmailId
()
{
return
new
ResponseEntity
<>(
"Wecome to Playground...
Java-007
"
,
HttpStatus
.
OK
);
}
...
...
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