Skip to content
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

feat(MOSIP-29236): add reusable workflows #1045

Merged
merged 1 commit into from
Dec 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 0 additions & 149 deletions .github/workflows/android-beta-build.yml

This file was deleted.

114 changes: 0 additions & 114 deletions .github/workflows/android-build-verify.yml

This file was deleted.

225 changes: 0 additions & 225 deletions .github/workflows/android-internal-build.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/clear_artifacts.yml
Original file line number Diff line number Diff line change
@@ -7,4 +7,4 @@ jobs:
uses: mosip/kattu/.github/workflows/clear-artifacts.yml@master
secrets:
ACCESS_TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
83 changes: 56 additions & 27 deletions .github/workflows/internal-build.yml
Original file line number Diff line number Diff line change
@@ -4,15 +4,24 @@ run-name: ${{ inputs.buildname }}
on:
workflow_dispatch:
inputs:
beta-release:
description: 'Beta release?'
release:
description: 'Internal/Beta'
required: true
default: 'false'
default: 'internal'
type: choice
options:
- false
- true
buildname:
- internal
- beta
buildFor:
description: 'Build'
required: true
default: 'Both[Android and IOS]'
type: choice
options:
- Both[Android and IOS]
- Android
- IOS
buildName:
description: 'Build App For'
required: true
default: 'Sprint-x/Collab/release-x.x.x'
@@ -27,6 +36,17 @@ on:
required: true
default: 'https://api.sandbox.mosip.net'
type: string
injiFlavor:
description: 'Select Inji flavor'
required: true
default: 'Inji'
type: choice
options:
- residentapp
- inji
- collab
- synergy
- mec
internal-testers:
description: 'Internal Testers Group'
required: true
@@ -62,46 +82,58 @@ on:

jobs:
build-android:
uses: tw-mosip/kattu/.github/workflows/android-publish.yml@add-inji-workflows
if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android'}}
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
BETA_RELEASE: ${{ inputs.beta-release }}
RELEASE: ${{ inputs.release }}
NODE_VERSION: '16.x'
RELEASE_KEYSTORE_ALIAS: androidreleasekey
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
BUILD_DESCRIPTION: ${{ inputs.buildDescription }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
BUILD_NAME: ${{ inputs.buildname }}
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './${{ inputs.release }}.sh'
ANDROID_ARTIFACT_NAME: ${{ inputs.buildname }}
ANDROID_ARTIFACT_PATH: 'android/app/build/outputs/apk/${{ inputs.injiFlavor }}/release/Inji_universal.apk'
secrets:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}'
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
ENV_FILE: ${{ secrets.ENV_FILE }}
SLACK_URL: '${{ secrets.SLACK_WEBHOOK }}'
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'

build-android-beta:
if: ${{ inputs.beta-release == 'true' }}
uses: tw-mosip/kattu/.github/workflows/android-publish.yml@add-inji-workflows
if: ${{ inputs.release == 'beta' && (inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android') }}
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
BETA_RELEASE: ${{ inputs.beta-release }}
RELEASE: ${{ inputs.release }}
NODE_VERSION: '16.x'
RELEASE_KEYSTORE_ALIAS: androidreleasekey
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
BUILD_DESCRIPTION: ${{ inputs.buildDescription }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
BUILD_NAME: ${{ inputs.buildname }}
APP_FLAVOR: ${{ inputs.injiFlavor }}
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './${{ inputs.release }}.sh'
ANDROID_ARTIFACT_NAME: ${{ inputs.buildname }}
ANDROID_ARTIFACT_PATH: 'android/app/build/outputs/apk/${{ inputs.injiFlavor }}/release/Inji_universal.apk'
secrets:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
RELEASE_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}'
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
ENV_FILE: ${{ secrets.ENV_FILE }}
SLACK_URL: '${{ secrets.SLACK_WEBHOOK }}'
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'

build-ios:
uses: tw-mosip/kattu/.github/workflows/ios-publish.yml@add-inji-workflows
if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'IOS'}}
uses: mosip/kattu/.github/workflows/ios-publish.yml@master
with:
NODE_VERSION: '18.x'
MIMOTO_HOST: ${{ inputs.mimotoBackendServiceUrl }}
@@ -110,6 +142,11 @@ jobs:
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ inputs.buildDescription }}
ALLOW_ENV_EDIT: ${{ inputs.allow_env_edit }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ inputs.internal-testers }}
SERVICE_LOCATION: '.'
IOS_SERVICE_LOCATION: 'ios'
SCRIPT_NAME: 'fastlane beta'
IOS_ARTIFACT_NAME: 'Inji'
IOS_ARTIFACT_PATH: 'ios/fastlane/Inji_app_file/Products/Applications/'
secrets:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
@@ -125,12 +162,4 @@ jobs:
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK }}'

sonar-check:
uses: tw-mosip/kattu/.github/workflows/sonar.yml@add-inji-workflows
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
SLACK_URL: '${{ secrets.SLACK_WEBHOOK }}'
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'
72 changes: 0 additions & 72 deletions .github/workflows/ios-automation-build.yml

This file was deleted.

59 changes: 0 additions & 59 deletions .github/workflows/ios-build-verify.yml

This file was deleted.

101 changes: 0 additions & 101 deletions .github/workflows/ios-build.yml

This file was deleted.

30 changes: 14 additions & 16 deletions .github/workflows/push-triggers.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Push-Triggers

on:
push:
branches:
- main
- develop
- qa-develop
- "release-**"
- 'release-**'
release:
types: [published]
pull_request:
@@ -15,27 +15,25 @@ on:
- main
- develop
- qa-develop
- "release-**"
- 'release-**'

jobs:
build-android:
uses: tw-mosip/kattu/.github/workflows/android-build.yml@add-inji-workflows
uses: mosip/kattu/.github/workflows/android-build.yml@master
with:
NODE_VERSION: "16.x"
DEBUG_KEYSTORE_ALIAS: androiddebugkey
SERVICE_LOCATION: '.'
ANDROID_SERVICE_LOCATION: 'android'
BUILD_SCRIPT_LOCATION: 'scripts'
SCRIPT_NAME: './android-build.sh'
secrets:
DEBUG_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_DEBUG_STOREPASS}}'
DEBUG_KEYSTORE_PASSWORD: '${{ secrets.INJI_ANDROID_DEBUG_STOREPASS }}'

build-ios:
uses: tw-mosip/kattu/.github/workflows/ios-build.yml@add-inji-workflows
uses: mosip/kattu/.github/workflows/ios-build.yml@master
with:
NODE_VERSION: "16.x"

sonar-check:
if: ${{ github.event_name == 'push' }}
uses: tw-mosip/kattu/.github/workflows/sonar.yml@add-inji-workflows
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
SLACK_URL: '${{ secrets.SLACK_WEBHOOK }}'
NODE_VERSION: "18.x"
SERVICE_LOCATION: '.'
IOS_SERVICE_LOCATION: 'ios'
SCRIPT_NAME: "fastlane ios_app_build"
30 changes: 0 additions & 30 deletions .github/workflows/sonar.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -25,11 +25,11 @@ on:

jobs:
tag-branch:
uses: tw-mosip/kattu/.github/workflows/tag.yml@add-inji-workflows
uses: mosip/kattu/.github/workflows/tag.yml@master
with:
TAG: ${{ inputs.TAG }}
BODY: ${{ inputs.BODY }}
PRE_RELEASE: ${{ inputs.PRE_RELEASE }}
DRAFT: ${{ inputs.DRAFT }}
secrets:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}