-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add build jobs and codecov for idp-domain-service and idp-ui
- Loading branch information
1 parent
18a162a
commit bd6cf10
Showing
4 changed files
with
123 additions
and
3 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,66 @@ | ||
name: Release IDP Domain Service Release. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
required: true | ||
type: string | ||
description: "Release Version" | ||
next_version: | ||
type: string | ||
description: "Next Development Version" | ||
pull_request_target: | ||
types: | ||
- closed | ||
paths: | ||
- '**/idp/idp-service/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cache Ballerina. | ||
uses: actions/cache@v3 | ||
id: cache | ||
with: | ||
path: "ballerina-dist/*.deb" | ||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | ||
- name: Download Ballerina distribution. | ||
shell: sh | ||
run: | | ||
mkdir -p ballerina-dist | ||
wget 'https://dist.ballerina.io/downloads/2201.3.0/ballerina-2201.3.0-swan-lake-linux-x64.deb' -P ballerina-dist | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
- name: Install Ballerina distribution. | ||
shell: sh | ||
run: "sudo dpkg -i ballerina-dist/ballerina-2201.3.0-swan-lake-linux-x64.deb" | ||
- name: Verify Ballerina Version | ||
shell: sh | ||
run: "bal -v" | ||
|
||
- name: Checkout apk-repo. | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: "0" | ||
path: apk-repo | ||
token: ${{ secrets.WSO2_BOT_TOKEN }} | ||
- name: Set release username and email | ||
shell: sh | ||
run: | | ||
git config --global user.name ${{ secrets.WSO2_BOT_USER }} | ||
git config --global user.email ${{ secrets.WSO2_BOT_EMAIL }} | ||
- name: Run Gradle build | ||
if: github.event_name == 'workflow_dispatch' | ||
shell: sh | ||
run: | | ||
cd apk-repo/idp/idp-service | ||
gradle release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true | ||
- name: Run Gradle Build | ||
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
run: | | ||
cd apk-repo/idp/idp-service | ||
gradle build -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true | ||
gradle docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true | ||
gradle docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=${{ github.sha }} -PmultiArch=true |
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,47 @@ | ||
name: Release IDP UI Server. | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_version: | ||
required: true | ||
type: string | ||
description: "Release Version" | ||
next_version: | ||
type: string | ||
description: "Next Development Version" | ||
pull_request_target: | ||
types: | ||
- closed | ||
paths: | ||
- '**/management-server/**' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout apk-repo. | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: "0" | ||
path: apk-repo | ||
token: ${{ secrets.WSO2_BOT_TOKEN }} | ||
- name: Set release username and email | ||
shell: sh | ||
run: | | ||
git config --global user.name ${{ secrets.WSO2_BOT_USER }} | ||
git config --global user.email ${{ secrets.WSO2_BOT_EMAIL }} | ||
- name: Run Gradle build | ||
if: github.event_name == 'workflow_dispatch' | ||
shell: sh | ||
run: | | ||
cd apk-repo/idp/idp-ui | ||
gradle release -Prelease.useAutomaticVersion=true -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Prelease.releaseVersion=${{ github.event.inputs.release_version }} -Prelease.newVersion=${{ github.event.inputs.next_version }} -PmultiArch=true | ||
- name: Run Gradle Build | ||
if: github.event_name == 'pull_request_target' && github.event.action == 'closed' && github.event.pull_request.merged == true | ||
run: | | ||
cd apk-repo/idp/idp-ui | ||
gradle build -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true | ||
gradle docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=latest -PmultiArch=true | ||
gradle docker_push -Pdocker_organization=${{ secrets.DOCKER_ORGANIZATION }} -Pdocker_username=${{ secrets.DOCKER_USERNAME }} -Pdocker_password=${{ secrets.DOCKER_PASSWORD }} -Pimage_version=${{ github.sha }} -PmultiArch=true |
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
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