Skip to content
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

Devopsnishu patch 13 #12

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f8246e6
Update maven.yml
devopsnishu Jun 21, 2023
6064d84
Merge pull request #1 from devopsnishu/devopsnishu-patch-1
devopsnishu Jun 21, 2023
d27aaf0
Update maven.yml
devopsnishu Jun 21, 2023
137153f
Merge pull request #2 from devopsnishu/devopsnishu-patch-2
devopsnishu Jun 21, 2023
8844760
Update Dockerfile
devopsnishu Jun 21, 2023
71f2046
Update maven.yml
devopsnishu Jun 21, 2023
ee3b999
Merge pull request #3 from devopsnishu/devopsnishu-patch-3
devopsnishu Jun 21, 2023
25e4753
Create sonar-project.properties
devopsnishu Jun 21, 2023
3fe960c
Update Dockerfile
devopsnishu Jun 21, 2023
8625e10
Update maven.yml
devopsnishu Jun 21, 2023
1e9f2f7
Update maven.yml
devopsnishu Jun 21, 2023
527695c
Merge pull request #5 from devopsnishu/devopsnishu-patch-5
devopsnishu Jun 21, 2023
966da71
Update maven.yml
devopsnishu Jun 21, 2023
1a8630c
Merge pull request #6 from devopsnishu/devopsnishu-patch-6
devopsnishu Jun 21, 2023
220aab5
Update maven.yml
devopsnishu Jun 22, 2023
590f7dc
Merge pull request #7 from devopsnishu/devopsnishu-patch-7
devopsnishu Jun 22, 2023
5c00ec2
Update maven.yml
devopsnishu Jun 22, 2023
e56c9ed
Merge pull request #8 from devopsnishu/devopsnishu-patch-8
devopsnishu Jun 22, 2023
862f705
Update maven.yml
devopsnishu Jun 22, 2023
4c6d577
Merge pull request #9 from devopsnishu/devopsnishu-patch-9
devopsnishu Jun 22, 2023
b183992
Create Reusable
devopsnishu Jun 22, 2023
ee4976b
Merge pull request #10 from devopsnishu/devopsnishu-patch-10
devopsnishu Jun 22, 2023
9bb31d3
Update maven.yml
devopsnishu Jun 22, 2023
96f1c96
Merge pull request #11 from devopsnishu/devopsnishu-patch-11
devopsnishu Jun 22, 2023
b6e8091
Update maven.yml
devopsnishu Jun 22, 2023
6815af2
Merge pull request #12 from devopsnishu/devopsnishu-patch-12
devopsnishu Jun 22, 2023
b3c1536
Delete Reusable
devopsnishu Jun 22, 2023
0c5a39b
Update maven.yml
devopsnishu Jun 22, 2023
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
26 changes: 15 additions & 11 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: project cicd flow
name: CI-CD

on:
push:
Expand All @@ -22,15 +22,19 @@ jobs:
java-version: '1.8'
distribution: 'adopt'
cache: maven

- name: Build with Maven
run: mvn clean install

- name: Build & push Docker image
uses: mr-smithers-excellent/docker-build-push@v5
with:
image: javatechie/springboot-images-new
tags: latest
registry: docker.io
dockerfile: Dockerfile
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Unit Tests
run: mvn -B test --file pom.xml
docker:
uses: devopsnishu/Reusable-Action/.github/workflows/reusable.yml@main
with:

image_name: Javafile1


secrets:
DOCKERHUB_USERNAME: ${{secrets.DOCKERHUB_USERNAME}}
DOCKERHUB_PASSWORD: ${{secrets.DOCKERHUB_PASSWORD}}

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:8
EXPOSE 8080
ADD target/springboot-images-new.jar springboot-images-new.jar
ENTRYPOINT ["java","-jar","/springboot-images-new.jar"]
ENTRYPOINT ["java","-jar","/springboot-images-new.jar"]
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
sonar.projectKey=devopsnishu_JAVA
sonar.organization=devopsnishu
sonar.sources=.
# Create a configuration file