Skip to content

BAH-3969 | Add. Gradle Wrapper Jar #13

BAH-3969 | Add. Gradle Wrapper Jar

BAH-3969 | Add. Gradle Wrapper Jar #13

name: Build and Upload Embedded Tomcat
on:
push:
branches:
- master
paths:
- "bahmni-embedded-tomcat/**"
- "bahmni-embedded-tomcat-10/**"
- "gradle.properties"
- ".github/workflows/tomcat_build_upload.yml"
workflow_dispatch:
jobs:
trivy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Trivy Scan
run: ./.github/trivy_scan.sh bahmni-embedded-tomcat
build-upload-artifact:
name: Build and upload embedded Tomcat Server artifact
runs-on: ubuntu-latest
needs: trivy
steps:
- uses: actions/checkout@v3
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "8"
- name: Generate Artifact for bahmni-embedded-tomcat
run: ./gradlew :bahmni-embedded-tomcat:clean :bahmni-embedded-tomcat:build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_MVN_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }}
aws-region: ap-southeast-1
- name: Upload Artifact for bahmni-embedded-tomcat
run: aws s3 cp bahmni-embedded-tomcat/build/libs/bahmni-embedded-tomcat-*.jar s3://repo.mybahmni.org/packages/build/
build-upload-artifact-10:
name: Build and upload embedded Tomcat 10 Server artifact
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: "corretto"
java-version: "17"
- name: Generate Artifact for bahmni-embedded-tomcat-10
run: |
cd bahmni-embedded-tomcat-10
./gradlew clean build
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.S3_MVN_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.S3_MVN_SECRET_KEY }}
aws-region: ap-southeast-1
- name: Upload Artifact for bahmni-embedded-tomcat-10
run: aws s3 cp bahmni-embedded-tomcat-10/build/libs/bahmni-embedded-tomcat-10-*.jar s3://repo.mybahmni.org/packages/build/