Skip to content

Commit

Permalink
Added settings.xml
Browse files Browse the repository at this point in the history
Added CI build components
  • Loading branch information
vivid-cpreston committed Apr 10, 2024
1 parent 9224b36 commit 5c2dccd
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,22 @@ on:

jobs:
build-underwriting-api:
uses: ./.github/actions/build-package
uses: ./.github/workflows/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-api
VERSION_NUMBER: 1.0.0-SNAPSHOT

build-underwriting-listener-api:
uses: ./.github/actions/build-package
uses: ./.github/workflows/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-listener-api
VERSION_NUMBER: 1.0.0-SNAPSHOT

build-underwriting-war:
uses: ./.github/actions/build-package
uses: ./.github/workflows/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-war
VERSION_NUMBER: 1.0.0-SNAPSHOT
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
MICROSERVICE_NAME:
required: true
type: string
VERSION_NUMBER:
required: true
type: string

env:
DIRECTORY_SUFFIX: ${{ contains(inputs.MICROSERVICE_NAME, '-api') && '-rest-endpoints' || '' }}
Expand All @@ -36,10 +33,10 @@ jobs:
run: |
export MAVEN_OPTS="-Xmx3072m -XX:MaxMetaspaceSize=512m"
export NODE_OPTIONS="--max-old-space-size=4096"
mvn --batch-mode --update-snapshots -f ${{ inputs.MICROSERVICE_NAME }}/pom.xml -Drepo.login=${{ secrets.IDIR_AS_EMAIL }} -Drepo.password=${{ secrets.IDIR_PASSWORD }} package
mvn --settings=settings.xml --batch-mode --update-snapshots -f ${{ inputs.MICROSERVICE_NAME }}/pom.xml -Drepo.login=${{ secrets.IDIR_AS_EMAIL }} -Drepo.password=${{ secrets.IDIR_PASSWORD }} package
- name: Copy files to neccessary folders
run: mkdir staging && cp ${{ inputs.MICROSERVICE_NAME }}/${{ inputs.MICROSERVICE_NAME }}${{ DIRECTORY_SUFFIX }}/target/*.war staging
run: mkdir staging && cp ${{ inputs.MICROSERVICE_NAME }}/${{ inputs.MICROSERVICE_NAME }}${{ env.DIRECTORY_SUFFIX }}/target/*.war staging

- uses: actions/upload-artifact@v3
with:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/underwriting-api-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: cirras-underwriting-api CI build

on:
pull_request_target:
branches:
- main
paths:
- cirras-underwriting-api/**

jobs:
build-underwriting-api:
uses: ./.github/actions/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-api
16 changes: 16 additions & 0 deletions .github/workflows/underwriting-listener-api-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: cirras-underwriting-listener-api CI build

on:
pull_request_target:
branches:
- main
paths:
- cirras-underwriting-listener-api/**

jobs:
build-underwriting-listener-api:
uses: ./.github/actions/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-listener-api
16 changes: 16 additions & 0 deletions .github/workflows/underwriting-war-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: cirras-underwriting-war CI build

on:
pull_request_target:
branches:
- main
paths:
- cirras-underwriting-war/**

jobs:
build-underwriting-war:
uses: ./.github/actions/build-package.yml
secrets: inherit
with:
ENVIRONMENT: DEV
MICROSERVICE_NAME: cirras-underwriting-war
56 changes: 56 additions & 0 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="https://maven.apache.org/SETTINGS/1.1.0 https://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="https://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>${repo.login}</username>
<password>${repo.password}</password>
<id>central</id>
</server>
<server>
<username>${repo.login}</username>
<password>${repo.password}</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>https://bwa.nrs.gov.bc.ca/int/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>https://bwa.nrs.gov.bc.ca/int/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>https://bwa.nrs.gov.bc.ca/int/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>https://bwa.nrs.gov.bc.ca/int/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>

0 comments on commit 5c2dccd

Please sign in to comment.