Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
aSGJajksa
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
aray
aSGJajksa
Commits
f620d5f6
Commit
f620d5f6
authored
Jan 11, 2023
by
pg-ta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
service names updated by Admin...2
parent
de98f6a5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
107 additions
and
0 deletions
+107
-0
.gitlab-ci1.yml
.gitlab-ci1.yml
+43
-0
Default1.java
...main/java/com/altimetrik/ee/demo/controller/Default1.java
+42
-0
application1.properties
src/main/resources/application1.properties
+12
-0
db-config-k8s1.properties
src/main/resources/db-config-k8s1.properties
+10
-0
No files found.
.gitlab-ci1.yml
0 → 100644
View file @
f620d5f6
variables
:
RELEASE_NAME
:
"
project1367"
SERVICE_PORT
:
8080
REGISTRY_URL
:
751503455312.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"
stages
:
-
Build
-
ReleaseCleanup
-
ReleaseDeploy
-
Validation
Build
:
stage
:
Build
script
:
-
mvn clean install -Dk8s.db.env=db-config-k8s
-
$(aws ecr get-login --no-include-email --region us-east-1)
-
docker build -t 751503455312.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo:$CI_PIPELINE_ID .
-
docker push 751503455312.dkr.ecr.us-east-1.amazonaws.com/pgdockrepo:$CI_PIPELINE_ID
ReleaseCleanup
:
stage
:
ReleaseCleanup
script
:
-
echo `pwd`
-
cd ./helm && /usr/local/bin/helm delete --purge $RELEASE_NAME && exit 0
allow_failure
:
true
ReleaseDeploy
:
stage
:
ReleaseDeploy
script
:
-
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
Validation
:
stage
:
Validation
script
:
-
sleep 45
-
if [ `curl -s -o /dev/null -I -w "%{http_code}" https://pgsandbox.altimetrik.com/$RELEASE_NAME` = "200" ]; then exit 0; else exit 1; fi
allow_failure
:
false
\ No newline at end of file
src/main/java/com/altimetrik/ee/demo/controller/Default1.java
0 → 100644
View file @
f620d5f6
package
com
.
altimetrik
.
ee
.
demo
.
controller
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.CrossOrigin
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.beans.factory.annotation.Value
;
@RestController
@RequestMapping
(
value
=
"/"
)
@CrossOrigin
public
class
Default
{
@Value
(
"${k8s.db.env}"
)
private
String
deploymentEnv
;
@GetMapping
(
value
=
"/"
,
produces
=
{
"text/html"
},
consumes
=
MediaType
.
ALL_VALUE
)
public
ResponseEntity
<
String
>
getUserDetailByGitlabEmailId
()
{
String
data
=
"Welcome to Playground Engineering Environment"
;
if
(
deploymentEnv
!=
null
&&
!
deploymentEnv
.
isEmpty
())
{
data
=
"<!DOCTYPE html>\n"
+
"<html>\n"
+
"<head>\n"
+
"<title>Playground Engineering Environment</title>\n"
+
"<style>\n"
+
"body {\n"
+
" background-color: white;\n"
+
" text-align: center;\n"
+
" color: black;\n"
+
"}\n"
+
"table {\n"
+
" align: center;\n"
+
" border-collapse: collapse;\n"
+
" width: 65%;\n"
+
"}\n"
+
"td, th {\n"
+
" border: 1px solid #dddddd;\n"
+
" padding: 8px;\n"
+
"}\n"
+
"tr:nth-child(even) {\n"
+
" background-color: #dddddd;\n"
+
"}\n"
+
"</style>\n"
+
"</head>\n"
+
"<body>\n"
+
"<img src='https://playground.altimetrik.com/assets/img/playground-logo2.svg' alt='Avatar' style='width:200px'>\n"
+
"<h2>Welcome to Playground Engineering Environment</h2>\n"
+
"<h3>Database access details</h3>\n"
+
"<table align=center>\n"
+
" <tr>\n"
+
" <th>DB Admin Console</th>\n"
+
" <th>JDBC URL</th>\n"
+
" <th>User Name</th>\n"
+
" <th>Password</th>\n"
+
" </tr>\n"
+
" <tr>\n"
+
" <td><a target='_blank' href='https://pgsandbox.altimetrik.com/project1367/project1367/'>https://pgsandbox.altimetrik.com/project1367/project1367/</a></td>\n"
+
" <td>jdbc:h2:file:./src/main/resources/project1367</td>\n"
+
" <td>playground</td>\n"
+
" <td>password</td>\n"
+
" </tr>\n"
+
"</table>\n"
+
"</body>\n"
+
"</html>\n"
;
}
return
new
ResponseEntity
<>(
data
,
HttpStatus
.
OK
);
}
}
\ No newline at end of file
src/main/resources/application1.properties
0 → 100644
View file @
f620d5f6
# Enabling H2 Console
spring.h2.console.enabled
=
true
# Custom H2 Console URL
spring.h2.console.path
=
/project1367
# Enable Web Access
spring.h2.console.settings.web-allow-others
=
true
# Disable h2 details in default controller
k8s.db.env
=
\ No newline at end of file
src/main/resources/db-config-k8s1.properties
0 → 100644
View file @
f620d5f6
# Please use the the url 'https://{pgtest/pgsandbox/citi-pg-project}.altimetrik.com/project1367/project1367/'
# to connect to the database wih the properties mentioned below.
spring.datasource.driverClassName
=
org.h2.Driver
spring.datasource.username
=
playground
spring.datasource.password
=
password
spring.jpa.database-platform
=
org.hibernate.dialect.H2Dialect
# temporary data storage
spring.datasource.url
=
jdbc:h2:file:./src/main/resources/project1367
\ No newline at end of file
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