Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nisum-cicd-task
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
nisum-cicd-task
Commits
b7dc5765
Commit
b7dc5765
authored
Nov 08, 2022
by
Muhammad Usman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parent
84b9e53c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
140 additions
and
1 deletion
+140
-1
.gitignore
.gitignore
+2
-0
Dockerfile
Dockerfile
+5
-0
README.md
README.md
+0
-1
dep-nisum-cicd.yaml
dep-nisum-cicd.yaml
+35
-0
pom.xml
pom.xml
+60
-0
Application.java
src/main/java/com/example/Application.java
+27
-0
index.html
src/main/resources/static/index.html
+11
-0
No files found.
.gitignore
0 → 100644
View file @
b7dc5765
.idea/*
target
\ No newline at end of file
Dockerfile
0 → 100644
View file @
b7dc5765
FROM
openjdk:8-jre-alpine
EXPOSE
8080
COPY
./target/java-maven-app-1.1.0-SNAPSHOT.jar /usr/app/
WORKDIR
/usr/app
ENTRYPOINT
["java", "-jar", "java-maven-app-1.1.0-SNAPSHOT.jar"]
README.md
View file @
b7dc5765
# nisum-cicd-task
# nisum-cicd-task
dep-nisum-cicd.yaml
0 → 100644
View file @
b7dc5765
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
nisum-cicd-task
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
nisum-cicd-task
template
:
metadata
:
labels
:
app
:
nisum-cicd-task
spec
:
containers
:
-
name
:
nisum-cicd-task
image
:
ishtiaq79/nisum-cicd-task:VERSION
ports
:
-
containerPort
:
8080
env
:
-
name
:
PORT
value
:
"
8080"
---
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
nisum-cicd-task
spec
:
type
:
LoadBalancer
selector
:
app
:
nisum-cicd-task
ports
:
-
port
:
80
targetPort
:
8080
\ No newline at end of file
pom.xml
0 → 100644
View file @
b7dc5765
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.example
</groupId>
<artifactId>
java-maven-app
</artifactId>
<version>
1.1.0-SNAPSHOT
</version>
<build>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.3.5.RELEASE
</version>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- to handle any Java version mismatch, add the following configuration for maven-compiler-plugin -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.6.0
</version>
<configuration>
<source>
1.8
</source>
<target>
1.8
</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
<version>
2.3.4.RELEASE
</version>
</dependency>
<dependency>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<version>
4.13.1
</version>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
net.logstash.logback
</groupId>
<artifactId>
logstash-logback-encoder
</artifactId>
<version>
6.4
</version>
</dependency>
</dependencies>
</project>
src/main/java/com/example/Application.java
0 → 100644
View file @
b7dc5765
package
com
.
example
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.annotation.PostConstruct
;
@SpringBootApplication
public
class
Application
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
Application
.
class
,
args
);
}
@PostConstruct
public
void
init
()
{
Logger
log
=
LoggerFactory
.
getLogger
(
Application
.
class
);
log
.
info
(
"Java app started"
);
}
public
String
getStatus
()
{
return
"OK"
;
}
}
src/main/resources/static/index.html
0 → 100644
View file @
b7dc5765
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Ishtiaq
</title>
</head>
<body>
<h1>
NISUM CI/CD Task
</h1>
<!-- add image here <img src="" width="" /> -->
</body>
</html>
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