-
Notifications
You must be signed in to change notification settings - Fork 12
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
billing and collection #1453
base: develop
Are you sure you want to change the base?
billing and collection #1453
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Billing-Service Image Build workflow | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
paths: | ||
- 'common/billing-service/**' | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- 'common/billing-service/**' | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
docker_image-build: | ||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Docker | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
# Login to Azure Container Registry | ||
- name: Login to Azure Container Registry | ||
run: docker login -u pucarsdev -p ${{ secrets.ACR_PASSWORD }} pucardev.azurecr.io | ||
|
||
- name: Build and Push Docker image for Billing-Service | ||
run: | | ||
docker build --build-arg WORK_DIR="common/billing-service" -t pucardev.azurecr.io/pucar_billing:v1.0.0-${{ github.sha }} -f build/maven/Dockerfile . | ||
docker push pucardev.azurecr.io/pucar_billing:v1.0.0-${{ github.sha }} | ||
|
||
- name: Build and Push Docker image for Billing-Service_DB | ||
run: | | ||
docker build -t pucardev.azurecr.io/pucar_billing_db:v1.0.0-${{ github.sha }} -f Dockerfile . | ||
docker push pucardev.azurecr.io/pucar_billing_db:v1.0.0-${{ github.sha }} | ||
working-directory: common/billing-service/src/main/resources/db | ||
- name: Trigger Deployment Pipeline | ||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' | ||
run: | | ||
curl -X POST \ | ||
-H "Accept: application/vnd.github.v3+json" \ | ||
-H "Authorization: token ${{ secrets.GHUB_TOKEN }}" \ | ||
https://api.github.com/repos/pucardotorg/pucar-Devops/actions/workflows/dev.yaml/dispatches \ | ||
-d '{"ref":"Dev-0"}' |
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,48 @@ | ||||||||||||||||||||||||||||||||||||||||||
name: Collection-Service Image Build workflow | ||||||||||||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||||||||||||||||||
- develop | ||||||||||||||||||||||||||||||||||||||||||
paths: | ||||||||||||||||||||||||||||||||||||||||||
- 'common/collection-services/**' | ||||||||||||||||||||||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||||||||||||||||||||||
branches: | ||||||||||||||||||||||||||||||||||||||||||
- develop | ||||||||||||||||||||||||||||||||||||||||||
paths: | ||||||||||||||||||||||||||||||||||||||||||
- 'common/collection-services/**' | ||||||||||||||||||||||||||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||||||||||||||||||||||||||
workflow_call: | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||||||||||||
docker_image-build: | ||||||||||||||||||||||||||||||||||||||||||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||||||||||||
- name: Checkout repository | ||||||||||||||||||||||||||||||||||||||||||
uses: actions/checkout@v2 | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
- name: Setup Docker | ||||||||||||||||||||||||||||||||||||||||||
uses: docker/setup-buildx-action@v1 | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
Comment on lines
+16
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update action versions. The static analysis hints suggest updating the action versions for Apply this diff to update the action versions: - uses: actions/checkout@v2
+ uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v1
+ uses: docker/setup-buildx-action@v2 Committable suggestion
Suggested change
Toolsactionlint
|
||||||||||||||||||||||||||||||||||||||||||
# Login to Azure Container Registry | ||||||||||||||||||||||||||||||||||||||||||
- name: Login to Azure Container Registry | ||||||||||||||||||||||||||||||||||||||||||
run: docker login -u pucarsdev -p ${{ secrets.ACR_PASSWORD }} pucardev.azurecr.io | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
- name: Build and Push Docker image for Collection-Service | ||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||
docker build --build-arg WORK_DIR="common/collection-services" -t pucardev.azurecr.io/pucar_collection:v1.0.0-${{ github.sha }} -f build/maven/Dockerfile . | ||||||||||||||||||||||||||||||||||||||||||
docker push pucardev.azurecr.io/pucar_collection:v1.0.0-${{ github.sha }} | ||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||
- name: Build and Push Docker image for Collection-Service_DB | ||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||
docker build -t pucardev.azurecr.io/pucar_collection_db:v1.0.0-${{ github.sha }} -f Dockerfile . | ||||||||||||||||||||||||||||||||||||||||||
docker push pucardev.azurecr.io/pucar_collection_db:v1.0.0-${{ github.sha }} | ||||||||||||||||||||||||||||||||||||||||||
working-directory: common/collection-services/src/main/resources/db | ||||||||||||||||||||||||||||||||||||||||||
- name: Trigger Deployment Pipeline | ||||||||||||||||||||||||||||||||||||||||||
if: github.ref == 'refs/heads/develop' && github.event_name == 'push' | ||||||||||||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||||||||||||
curl -X POST \ | ||||||||||||||||||||||||||||||||||||||||||
-H "Accept: application/vnd.github.v3+json" \ | ||||||||||||||||||||||||||||||||||||||||||
-H "Authorization: token ${{ secrets.GHUB_TOKEN }}" \ | ||||||||||||||||||||||||||||||||||||||||||
https://api.github.com/repos/pucardotorg/pucar-Devops/actions/workflows/dev.yaml/dispatches \ | ||||||||||||||||||||||||||||||||||||||||||
-d '{"ref":"Dev-0"}' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
FROM egovio/amazoncorretto:17-alpine3.19 AS build | ||
|
||
#FROM egovio/alpine-maven-builder-jdk-8:1-master-NA-6036091e AS build | ||
#FROM ghcr.io/egovernments/alpine-maven-builder-jdk-8:1-master-na-6036091e AS build | ||
FROM maven:3.8.4-openjdk-17-slim AS build | ||
ARG WORK_DIR | ||
WORKDIR /app | ||
|
||
|
@@ -13,6 +16,20 @@ COPY ${WORK_DIR}/src ./src | |
RUN mvn -B -f /app/pom.xml package | ||
|
||
|
||
# Create runtime image | ||
#FROM egovio/8-openjdk-alpine | ||
#FROM ghcr.io/egovernments/8-openjdk-alpine:latest | ||
FROM openjdk:17-jdk-alpine | ||
|
||
WORKDIR /opt/egov | ||
|
||
COPY --from=build /app/target/*.jar /app/start.sh /opt/egov/ | ||
|
||
RUN chmod +x /opt/egov/start.sh | ||
|
||
CMD ["/opt/egov/start.sh"] | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove redundant line. The line Apply this diff to remove the redundant line: - FROM egovio/amazoncorretto:17-alpine3.19
|
||
# Create runtime image | ||
FROM egovio/amazoncorretto:17-alpine3.19 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update action versions.
The static analysis hints suggest updating the action versions for
actions/checkout@v2
anddocker/setup-buildx-action@v1
to avoid issues with the runner.Apply this diff to update the action versions:
Committable suggestion
Tools
actionlint