-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d1c4dc6
commit b955861
Showing
22 changed files
with
377 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
|
||
[*.java] | ||
indent_size = 4 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,60 @@ | ||
name: CI Main Branch | ||
name: ci-main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- uses: s4u/[email protected] | ||
with: | ||
githubServer: false | ||
servers: | | ||
[ | ||
{ | ||
"id": "dgc-github", | ||
"username": "${{ secrets.GPR_USER }}", | ||
"password": "${{ secrets.GPR_PAT }}" | ||
} | ||
] | ||
- name: Build | ||
run: mvn --batch-mode install | ||
- name: Build for Docker | ||
run: mvn clean install -P docker | ||
- name: Log into registry | ||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin | ||
- name: Build docker image | ||
run: docker build target/docker --file target/docker/Dockerfile --tag docker.pkg.github.com/${{ github.repository }}/backend:latest | ||
- name: Push docker image | ||
run: docker push docker.pkg.github.com/${{ github.repository }}/dgca-verifier-service:latest | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: version | ||
run: >- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}); | ||
APP_REV=$(git rev-list --tags --max-count=1); | ||
APP_TAG=$(git describe --tags ${APP_REV} 2> /dev/null || echo 0.0.0); | ||
APP_VERSION=${APP_TAG}-${APP_SHA}; | ||
echo "APP_SHA=${APP_SHA}" >> ${GITHUB_ENV}; | ||
echo "APP_TAG=${APP_TAG}" >> ${GITHUB_ENV}; | ||
echo "APP_VERSION=${APP_VERSION}" >> ${GITHUB_ENV}; | ||
- name: mvn | ||
run: >- | ||
mvn versions:set | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define newVersion="${APP_VERSION}"; | ||
mvn clean verify | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}"; | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker | ||
run: >- | ||
echo "${APP_PACKAGES_PASSWORD}" | | ||
docker login "${APP_PACKAGES_URL}" | ||
--username "${APP_PACKAGES_USERNAME}" | ||
--password-stdin; | ||
docker build . | ||
--file ./Dockerfile | ||
--tag "${APP_PACKAGES_URL}:${APP_VERSION}"; | ||
docker push "${APP_PACKAGES_URL}:${APP_VERSION}"; | ||
env: | ||
APP_PACKAGES_URL: docker.pkg.github.com/${{ github.repository }}/container | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
name: CI Pull Request | ||
name: ci-pull-request | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- opened | ||
- synchronize | ||
- reopened | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
- uses: s4u/[email protected] | ||
with: | ||
githubServer: false | ||
servers: | | ||
[ | ||
{ | ||
"id": "dgc-github", | ||
"username": "${{ secrets.GPR_USER }}", | ||
"password": "${{ secrets.GPR_PAT }}" | ||
} | ||
] | ||
- name: Build package | ||
run: mvn --batch-mode package | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: mvn | ||
run: >- | ||
mvn clean package | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}"; | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker | ||
run: >- | ||
docker build . | ||
--file ./Dockerfile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
name: CI Release Notes | ||
name: ci-release-notes | ||
on: | ||
release: | ||
types: | ||
- created | ||
- created | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
release-notes: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: release notes | ||
run: | | ||
TAG=${GITHUB_REF/refs\/tags\/} | ||
npx github-release-notes release --override --tags ${TAG} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: version | ||
run: >- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}); | ||
APP_TAG=${GITHUB_REF/refs\/tags\/} | ||
APP_VERSION=${APP_TAG}; | ||
echo "APP_SHA=${APP_SHA}" >> ${GITHUB_ENV}; | ||
echo "APP_TAG=${APP_TAG}" >> ${GITHUB_ENV}; | ||
echo "APP_VERSION=${APP_VERSION}" >> ${GITHUB_ENV}; | ||
- name: release-notes | ||
run: npx github-release-notes release --override --tags ${APP_TAG} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GREN_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: ci-release | ||
on: | ||
release: | ||
types: | ||
- created | ||
jobs: | ||
release: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: version | ||
run: >- | ||
APP_SHA=$(git rev-parse --short ${GITHUB_SHA}); | ||
APP_TAG=${GITHUB_REF/refs\/tags\/} | ||
APP_VERSION=${APP_TAG}; | ||
echo "APP_SHA=${APP_SHA}" >> ${GITHUB_ENV}; | ||
echo "APP_TAG=${APP_TAG}" >> ${GITHUB_ENV}; | ||
echo "APP_VERSION=${APP_VERSION}" >> ${GITHUB_ENV}; | ||
- name: mvn | ||
run: >- | ||
mvn versions:set | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define newVersion="${APP_VERSION}"; | ||
mvn clean deploy | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}"; | ||
env: | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: docker | ||
run: >- | ||
echo "${APP_PACKAGES_PASSWORD}" | | ||
docker login "${APP_PACKAGES_URL}" | ||
--username "${APP_PACKAGES_USERNAME}" | ||
--password-stdin; | ||
docker build . | ||
--file ./Dockerfile | ||
--tag "${APP_PACKAGES_URL}:latest" | ||
--tag "${APP_PACKAGES_URL}:${APP_VERSION}"; | ||
docker push "${APP_PACKAGES_URL}:latest"; | ||
docker push "${APP_PACKAGES_URL}:${APP_VERSION}"; | ||
env: | ||
APP_PACKAGES_URL: docker.pkg.github.com/${{ github.repository }}/container | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | ||
- name: assets | ||
run: >- | ||
gh release upload ${APP_TAG} | ||
--clobber | ||
./target/openapi-${APP_TAG}.json | ||
./target/generated-resources/licenses-${APP_TAG}.xml | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: ci-sonar | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
jobs: | ||
sonar: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/setup-java@v2 | ||
with: | ||
java-version: 11 | ||
distribution: adopt | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.m2/repository | ||
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml') }} | ||
- name: mvn | ||
run: >- | ||
mvn verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar | ||
--batch-mode | ||
--file ./pom.xml | ||
--settings ./settings.xml | ||
--define app.packages.username="${APP_PACKAGES_USERNAME}" | ||
--define app.packages.password="${APP_PACKAGES_PASSWORD}"; | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
APP_PACKAGES_USERNAME: ${{ github.actor }} | ||
APP_PACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,5 @@ build/ | |
|
||
### MAC OS ### | ||
.DS_STORE | ||
|
||
.settings.xml |
Oops, something went wrong.