Skip to content

New dev branch #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM maven:3.9.6-eclipse-temurin-17 AS build

WORKDIR /app
COPY . .
RUN mvn package -DskipTest

FROM eclipse-temurin:17-jre-noble as package
WORKDIR /app
COPY --from=build /app/target/sysfoo-*.jar ./sysfoo.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "sysfoo.jar"]
63 changes: 63 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
pipeline {
agent none
stages {
stage('build') {
agent {
docker {
image 'maven:3.9.6-eclipse-temurin-17'
}

}
steps {
echo 'compile maven app'
sh 'mvn compile'
}
}

stage('test') {
agent {
docker {
image 'maven:3.9.6-eclipse-temurin-17'
}

}
steps {
echo 'test maven app'
sh 'mvn clean test'
}
}

stage('package') {
parallel {
stage('package') {
agent {
docker {
image 'maven:3.9.6-eclipse-temurin-17'
}

}
steps {
echo 'package maven app'
sh 'mvn package -DskipTests'
archiveArtifacts 'target/*.jar'
}
}

stage('DOCKER BUILD') {
steps {
script {
def commitHash = env.GIT_COMMIT.take(7)
def dockerImage = docker.build("xxxxxx/sysfoo:${commitHash}", "./")
}

}
}

}
}

}
tools {
maven '3.6.3'
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# Sysfoo Application

A Devops Learning App

A Devops Learning App test
adding someting to raise PR
## About the Application

The Sysfoo application is designed as a learning tool to demonstrate various aspects of web development using Spring Boot and other associated technologies. It provides real-time system information, database connectivity status, and a basic to-do list functionality to illustrate interaction with a database.
Expand Down