Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
ed691f5
Update action.yml
mangeshpa Jul 15, 2021
629ce65
Update action.yml
mangeshpa Jul 15, 2021
49a7cee
Update pom.xml
mangeshpa Jul 15, 2021
6e4d32c
Update action.yml
mangeshpa Jul 15, 2021
5d5385c
Update action.yml
mangeshpa Jul 15, 2021
4a1cec1
Update action.yml
mangeshpa Jul 15, 2021
ed75d95
Update action.yml
mangeshpa Jul 15, 2021
2bb9c0d
Update action.yml
mangeshpa Jul 15, 2021
9e8966b
Create API.yml
mangeshpa Jul 23, 2021
330d14f
Update API.yml
mangeshpa Jul 23, 2021
cb72ed2
Update API.yml
mangeshpa Jul 23, 2021
e846055
Update API.yml
mangeshpa Jul 23, 2021
67240c7
Update API.yml
mangeshpa Jul 23, 2021
1f6b5c1
Update API.yml
mangeshpa Jul 23, 2021
1f5779e
Update API.yml
mangeshpa Jul 23, 2021
34e9396
Update API.yml
mangeshpa Jul 23, 2021
b3ade90
Update API.yml
mangeshpa Jul 23, 2021
4d2c0b0
Update API.yml
mangeshpa Jul 23, 2021
ecf93b6
Update API.yml
mangeshpa Jul 23, 2021
8244eb0
Update API.yml
mangeshpa Jul 23, 2021
c55179c
Update API.yml
mangeshpa Jul 23, 2021
7048ce0
Update API.yml
mangeshpa Jul 23, 2021
8e123c4
Update API.yml
mangeshpa Jul 23, 2021
62b3e17
Update API.yml
mangeshpa Jul 23, 2021
627d2d4
Create newapi.yml
mangeshpa Jul 23, 2021
06d70db
Update API.yml
mangeshpa Jul 23, 2021
5ef3d61
Update API.yml
mangeshpa Jul 26, 2021
2ba3930
Update API.yml
mangeshpa Jul 26, 2021
4b6d481
Update API.yml
mangeshpa Jul 26, 2021
91a24e5
Update API.yml
mangeshpa Jul 26, 2021
77c817d
Update API.yml
mangeshpa Jul 26, 2021
a26dcac
Update API.yml
mangeshpa Jul 26, 2021
df0dccd
Update API.yml
mangeshpa Jul 26, 2021
3bbdca5
Update API.yml
mangeshpa Jul 26, 2021
748e456
Update API.yml
mangeshpa Jul 26, 2021
6917657
Update API.yml
mangeshpa Jul 26, 2021
21040d8
Update API.yml
mangeshpa Jul 26, 2021
ec3b83d
Update API.yml
mangeshpa Jul 26, 2021
b780bb9
Update API.yml
mangeshpa Jul 26, 2021
21b58d2
Update API.yml
mangeshpa Jul 26, 2021
ca9059a
Update API.yml
mangeshpa Jul 26, 2021
58c0fdb
Update API.yml
mangeshpa Jul 26, 2021
5788aad
Update API.yml
mangeshpa Jul 26, 2021
ce2921c
Update API.yml
mangeshpa Jul 26, 2021
9aaf4e4
Update API.yml
mangeshpa Jul 26, 2021
f5a451d
Update API.yml
mangeshpa Jul 26, 2021
0a6f69d
Update API.yml
mangeshpa Jul 26, 2021
ce32fc4
Update API.yml
mangeshpa Jul 26, 2021
f4de578
Update API.yml
mangeshpa Jul 26, 2021
a52faa9
Update API.yml
mangeshpa Jul 26, 2021
95a227a
Update API.yml
mangeshpa Jul 26, 2021
c0bf739
Update API.yml
mangeshpa Jul 26, 2021
6d2aade
Update API.yml
mangeshpa Jul 26, 2021
8f282ca
Update API.yml
mangeshpa Jul 26, 2021
738636f
Update API.yml
mangeshpa Jul 26, 2021
d3ef926
Update API.yml
mangeshpa Jul 26, 2021
72243dd
Update API.yml
mangeshpa Jul 26, 2021
7eebf70
Update API.yml
mangeshpa Jul 26, 2021
5db4988
Update API.yml
mangeshpa Jul 26, 2021
13859a5
Update API.yml
mangeshpa Jul 26, 2021
910095c
Update API.yml
mangeshpa Jul 26, 2021
f49f6a2
Update API.yml
mangeshpa Jul 26, 2021
4728faf
Update API.yml
mangeshpa Jul 26, 2021
e2d008b
Update API.yml
mangeshpa Jul 26, 2021
574fc98
Update API.yml
mangeshpa Jul 26, 2021
4d07ab1
Update API.yml
mangeshpa Jul 26, 2021
baf7038
Update API.yml
mangeshpa Jul 26, 2021
c8f9201
Update API.yml
mangeshpa Jul 26, 2021
c35d095
Update API.yml
mangeshpa Jul 26, 2021
3d70589
Update API.yml
mangeshpa Jul 27, 2021
590264b
Update API.yml
mangeshpa Jul 27, 2021
cdb692c
Update API.yml
mangeshpa Jul 27, 2021
0e24d19
Update API.yml
mangeshpa Sep 25, 2021
66ce447
Update pom.xml
mangeshpa Dec 9, 2021
0ff391a
Update API.yml
mangeshpa Dec 9, 2021
d6e29d6
Update API.yml
mangeshpa Dec 9, 2021
8326829
Update API.yml
mangeshpa Dec 9, 2021
6a6c781
Update pom.xml
mangeshpa Dec 9, 2021
6d0e6ce
Update pom.xml
mangeshpa Dec 9, 2021
f9af28d
Update pom.xml
mangeshpa Dec 9, 2021
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
33 changes: 33 additions & 0 deletions .github/workflows/API.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: ASP.NET CI

on:
push:
branches: [ master ]
jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.TOKEN}}
with:
tag_name: v${{github.run_number}}
release_name: Release V${{github.run_number}}

- name: Update version
run: mvn -B versions:set -DnewVersion=v${{github.run_number}} -DgenerateBackupPoms=false

- name: Publish to GitHub Packages Apache Maven
run: mvn -B deploy -DskipTests --file pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}
88 changes: 59 additions & 29 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ env:

on:
push:
# and the target with some regex to match specific branch names
# and the target with some regex to match specific branch namess
branches:
- master
- 'FEATURE-[0-9]-[0-9]-[0-9]-X-BRANCH'
Expand Down Expand Up @@ -58,13 +58,13 @@ jobs:
ref: ${{ github.REF }}
fetch-depth: 0

- name: Notify dedicated teams channel
uses: jdcargile/ms-teams-notification@v1.3
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: Build Started
notification-color: 17a2b8
#- name: Notify dedicated teams channel
#uses: jdcargile/ms-teams-notification@v1.3
#with:
#github-token: ${{ github.token }} # this will use the runner's token.
#ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
#notification-summary: Build Started
#notification-color: 17a2b8
# - name: show job status
# if: always()
# run: echo ${{ job.status }}
Expand Down Expand Up @@ -115,19 +115,48 @@ jobs:


######## Notify MS Teams Channel on Failure ########
- name: Notify dedicated MS teams channel [Build failure]
if: ${{ failure() }}
uses: jdcargile/ms-teams-notification@v1.3
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: Deployment Failed while Building the code
notification-color: dc3545
#- name: Notify dedicated MS teams channel [Build failure]
#if: ${{ failure() }}
#uses: jdcargile/ms-teams-notification@v1.3
#with:
#github-token: ${{ github.token }} # this will use the runner's token.
#ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
#notification-summary: Deployment Failed while Building the code
#notification-color: dc3545

######## JUnit Test with Maven ########
- name: Test with Maven
run: mvn -B test --file pom.xml

- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
jacoco-csv-file: target/site/jacoco/jacoco.csv
badges-directory: .github/JaCoCo
generate-coverage-badge: true
coverage-badge-filename: jacoco.svg
generate-branches-badge: false
branches-badge-filename: branches.svg
colors: '#4c1 #97ca00 #a4a61d #dfb317 #fe7d37 #e05d44'
intervals: 100 90 80 70 60 0
on-missing-report: fail
fail-if-coverage-less-than: 0
fail-if-branches-less-than: 0
fail-on-coverage-decrease: false
fail-on-branches-decrease: false
- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: target/site/jacoco/

- uses: codecov/codecov-action@v1
with:
file: ./**/target/site/jacoco/jacoco.xml
name: codecov
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
Expand Down Expand Up @@ -163,7 +192,8 @@ jobs:
- uses: actions/checkout@v2
# if: ${{ job.status == 2 }}
- name: SonarCloud Scan
run: mvn -B sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=pintu-gupta-github -Dsonar.projectKey=pintu-gupta-github
#run: mvn -B sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=pintu-gupta-github -Dsonar.projectKey=pintu-gupta-github
run: mvn -B sonar:sonar -Dsonar.projectKey=Java-Maven-Jacoco-Sonar -Dsonar.projectName=Java-Maven-Jacoco-Sonar -Dsonar.host.url=http://3.141.23.89:9000 -Dsonar.login=103e87043953a8c9564be3a5fbed3a26a6d084c2
#uses: sonarsource/sonarcloud-github-action@master
#with:
# args: >
Expand All @@ -173,19 +203,19 @@ jobs:
# -Dsonar.projectKey=pintu-gupta-github
# -Dsonar.projectName=simple-java-maven-app
# -Dsonar.projectVersion=1.0
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#env:
#GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
#SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

######## Notify MS Teams Channel on Failure ########
- name: Notify dedicated MS teams channel [Sonar Scan failure]
if: ${{ failure() }}
uses: jdcargile/ms-teams-notification@v1.3
with:
github-token: ${{ github.token }} # this will use the runner's token.
ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
notification-summary: Deployment Failed while Building the code
notification-color: dc3545
#- name: Notify dedicated MS teams channel [Sonar Scan failure]
#if: ${{ failure() }}
#uses: jdcargile/ms-teams-notification@v1.3
#with:
#github-token: ${{ github.token }} # this will use the runner's token.
#ms-teams-webhook-uri: ${{ secrets.MS_TEAMS_WEBHOOK_URI }}
#notification-summary: Deployment Failed while Building the code
#notification-color: dc3545

######## Deployment - Dev Environment ########
Deploy-Dev:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/newapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: ASP.NET CI
on: push
jobs:
curl:
runs-on: ubuntu-latest
steps:
- name: curl
run: |
curl -X GET -u sandeeprampur1987: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 https://api.github.com/repos/sandeeprampur1987/action-framework/pulls?state=open -o "./output.json"

- name: Upload a Test Artifact
uses: actions/upload-artifact@v2.2.4
with:
# Artifact name
name: artifact
path: ./output.json
27 changes: 26 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>my-app</name>

<distributionManagement>
<repository>
<id>github</id>
<name>Releases</name>
<url>https://maven.pkg.github.com/mangeshpa/simple-java-maven-app</url>
</repository>
</distributionManagement>
<url>http://maven.apache.org</url>

<properties>
Expand Down Expand Up @@ -38,6 +44,25 @@
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>generate-code-coverage-report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Expand Down