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

* refactor(INJI-541): add functions to get the bundle id and app name

Signed-off-by: adityankannan-tw <adityan410pm@gmail.com>
This commit is contained in:
adityankannan-tw
2023-12-08 10:59:51 +05:30
committed by GitHub
parent 379878382c
commit d247eaa426
24 changed files with 428 additions and 878 deletions

View File

@@ -1,142 +0,0 @@
name: Android Beta Build
env:
mimotoBackendServiceDefaultUrl: https://api.sandbox.mosip.net
esignetBackendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag to be published'
required: true
default: 'v1.2.3'
type: string
body:
description: 'Release body message'
required: true
default: 'Changes in this Release'
type: string
pre-release:
description: 'Pre-release? True/False'
required: true
default: False
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment'
type: string
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Create Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ github.event.inputs.tag }}
release_name: ${{ github.event.inputs.tag }}
body: ${{ github.event.inputs.body }}
draft: false
prerelease: ${{fromJSON(github.event.inputs.pre-release)}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check for git tag
run: |
cd android/scripts
./git-tag.sh
- name: Install npm dependencies
run: |
npm ci
- name: Create .env.local file
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
- name: Export variables for keystore
run: |
cd android/app
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=$RELEASE_KEYSTORE_PASSWORD
env:
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
- name: Create Google Play Config file
run : |
cd android
echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
- name: Run Build
run: |
cd android/scripts
./beta-build.sh
env:
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
PLAY_CONSOLE_RELEASE_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}

View File

@@ -1,148 +0,0 @@
name: PR - Android build verification
env:
backendServiceDefaultUrl: https://api.sandbox.mosip.net
DUMMY_INJI_ANDROID_DEBUG_STOREPASS: 'password'
DUMMY_GOOGLE_SERVICE_JSON: '{
"project_info": {
"project_number": "mockproject-1234",
"project_id": "123456789000",
"storage_bucket": "mock-project.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063",
"android_client_info": {
"package_name": "io.mosip.residentapp"
}
},
"oauth_client": [
{
"client_id": "123456789000-hjugbg6ud799v4c49dim8ce2usclthar.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzbSzCn1N6LWIe6wthYyrgUUSAlUsdqMb-wvTo"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "123456789000-e4uksm38sne0bqrj6uvkbo4oiu4hvigl.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}'
on:
push:
branches:
- main
- develop
- demobranch
- qa-develop
- 0.9
tags:
- '*'
pull_request:
types: [ opened, synchronize ]
branches:
- develop
- 'release-**'
tags:
- '*'
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- name: Cache local gradle repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
echo "DUMMY_INJI_ANDROID_DEBUG_STOREPASS=$DUMMY_INJI_ANDROID_DEBUG_STOREPASS" >> $GITHUB_ENV
- name: Install npm dependencies
run: |
npm ci
- name: Create .env.local file
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Generate keystore
run: |
keytool \
-genkey -v \
-storetype PKCS12 \
-keyalg RSA \
-keysize 2048 \
-validity 10000 \
-storepass $DEBUG_KEYSTORE_PASSWORD \
-keypass $DEBUG_KEYSTORE_PASSWORD \
-alias androiddebugkey \
-keystore android/app/debug.keystore \
-dname "CN=io.mosip.residentapp,OU=,O=,L=,S=,C=US"
env:
DEBUG_KEYSTORE_PASSWORD: ${{secrets.INJI_ANDROID_DEBUG_STOREPASS || env.DUMMY_INJI_ANDROID_DEBUG_STOREPASS }}
- name: Export variables for keystore
run: |
cd android/app
export DEBUG_KEYSTORE_ALIAS=androiddebugkey
export DEBUG_KEYSTORE_PASSWORD=$DEBUG_KEYSTORE_PASSWORD
env:
DEBUG_KEYSTORE_PASSWORD: ${{secrets.INJI_ANDROID_DEBUG_STOREPASS || env.DUMMY_INJI_ANDROID_DEBUG_STOREPASS }}
- name: Bump version code
uses: chkfung/android-version-actions@v1.2.1
with:
gradlePath: android/app/build.gradle
versionCode: ${{github.run_number}}
- name: Run Build using Fastlane
run: |
cd android/scripts
./verify-build.sh
env:
DEBUG_KEYSTORE_ALIAS: androiddebugkey
DEBUG_KEYSTORE_PASSWORD: ${{secrets.INJI_ANDROID_DEBUG_STOREPASS || env.DUMMY_INJI_ANDROID_DEBUG_STOREPASS }}

View File

@@ -1,211 +0,0 @@
name: Android Internal Build
run-name: ${{ github.event.inputs.buildname }}
env:
mimotoBackendServiceDefaultUrl: https://api.sandbox.mosip.net
esignetBackendServiceDefaultUrl: https://api.sandbox.mosip.net
on:
workflow_dispatch:
inputs:
buildname:
description: 'Build App For'
required: true
default: 'Sprint-x/Collab/release-x.x.x'
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment'
type: string
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
jobs:
build-android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- name: Cache local gradle repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Install npm dependencies
run: |
npm ci
- name: Create .env.local file
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
- name: Export variables for keystore
run: |
cd android/app
export RELEASE_KEYSTORE_ALIAS=androidreleasekey
export RELEASE_KEYSTORE_PASSWORD=$RELEASE_KEYSTORE_PASSWORD
env:
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
- name: Create Google Play Config file
run: |
cd android
echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
- name: Run Build
run: |
cd android/scripts
./internal-build.sh
env:
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
PLAY_CONSOLE_RELEASE_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
upload-to-actions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Cache local npm repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
path: ~/.npm
- name: Cache local gradle repository
uses: actions/cache@v3.0.11
with:
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
path: |
~/.gradle/caches
~/.gradle/wrapper
- name: Install npm dependencies
run: |
npm i
- name: Create .env.local file
run: |
echo "${{ secrets.ENV_FILE }}" > .env.local > android/local.properties
- name: Setup branch and env
run: |
# Strip git ref prefix from version
echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV
echo "GPG_TTY=$(tty)" >> $GITHUB_ENV
- name: Setup branch and GPG public key
run: |
# Strip git ref prefix from version
echo ${{ env.BRANCH_NAME }}
echo ${{ env.GPG_TTY }}
sudo apt-get --yes install gnupg2
gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg
gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg
- name: Generate keystore
run: |
echo "$ANDROID_KEYSTORE_FILE" > release.keystore.b64
base64 -d -i release.keystore.b64 > android/app/release.keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.INJI_ANDROID_RELEASE_KEYSTORE }}
- name: Create Google Play Config file
run: |
cd android
echo "$INJI_ANDROID_PLAY_STORE_CONFIG_JSON" > play_config.json.b64
base64 -d -i play_config.json.b64 > play_config.json
env:
INJI_ANDROID_PLAY_STORE_CONFIG_JSON: ${{ secrets.INJI_ANDROID_PLAY_STORE_CONFIG_JSON }}
- name: Run Build for upload
run: |
npx jetify
cd android
./gradlew :app:assembleMosipRelease
env:
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ github.event.inputs.theme }}
RELEASE_KEYSTORE_ALIAS: androidreleasekey
RELEASE_KEYSTORE_PASSWORD: '${{secrets.INJI_ANDROID_RELEASE_STOREPASS}}'
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.1
with:
name: ${{ github.event.inputs.buildname }}
path: android/app/build/outputs/apk/mosip/release/
retention-days: 10

10
.github/workflows/clear-artifacts.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
name: "Delete old artifacts"
on:
workflow_dispatch:
jobs:
delete-artifacts:
uses: mosip/kattu/.github/workflows/clear-artifacts.yml@master
secrets:
ACCESS_TOKEN: ${{ secrets.ACTION_PAT }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

View File

@@ -1,15 +0,0 @@
name: 'Delete old artifacts'
on:
workflow_dispatch:
name: 'Delete old artifacts'
on:
workflow_dispatch:
jobs:
delete-artifacts:
runs-on: ubuntu-latest
steps:
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.ACTION_PAT }}
expire-in: 2days # Setting this to 0 will delete all artifacts

176
.github/workflows/internal-build.yml vendored Normal file
View File

@@ -0,0 +1,176 @@
name: Internal Build [Android & IOS]
run-name: ${{ inputs.buildname }}
on:
workflow_dispatch:
inputs:
release:
description: 'Internal/Beta'
required: true
default: 'internal'
type: choice
options:
- 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'
type: string
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
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
default: 'QA-Triple'
type: choice
options:
- Dev-testing
- MEC
- QA
- MOSIP-Collab
- MOSIP-Dev-testing
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment'
type: string
allow_env_edit:
description: 'Edit ENV'
required: true
default: 'true'
type: choice
options:
- false
- true
jobs:
build-android:
if: ${{ inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android'}}
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
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 }}
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 }}
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'
build-android-beta:
if: ${{ inputs.release == 'beta' && (inputs.buildFor == 'Both[Android and IOS]' || inputs.buildFor == 'Android') }}
uses: mosip/kattu/.github/workflows/android-publish.yml@master
with:
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 }}
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 }}
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'
build-ios:
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 }}
ESIGNET_HOST: ${{ inputs.esignetBackendServiceUrl }}
APPLICATION_THEME: ${{ inputs.theme }}
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 }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'
# sonar-check:
# uses: mosip/kattu/.github/workflows/gradlew-sonar-analysis.yml@master
# with:
# SERVICE_LOCATION: '.'
# ANDROID_LOCATION: 'android'
# SONAR_ARGS: -Dsonarqube
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
# SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'

View File

@@ -1,72 +0,0 @@
name: Inji iOS Automation Build
on:
workflow_dispatch:
inputs:
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
jobs:
build_ios:
name: Uploading app to Actions
runs-on: macos-13
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install npm dependencies
run: |
npm install
- name: Install Pod
run: |
cd ios
pod install
pod install
- name: Build iOS for automation on simulator
run: |
cd ios
fastlane build_app_for_automation_on_simulator
- name: Upload Inji.app artifact
uses: actions/upload-artifact@v3.1.1
with:
name: Inji
path: ios/fastlane/Inji_app_file/Products/Applications/
retention-days: 7
- name: Upload Runner Log on Failure
if: failure() # Only run this step if the previous steps failed
uses: actions/upload-artifact@v3.1.1
with:
name: runner-log
path: /Users/runner/Library/Logs/gym/
retention-days: 1

View File

@@ -1,59 +0,0 @@
name: PR - IOS build verification
on:
push:
branches:
- main
- develop
- demobranch
- qa-develop
- 0.9
tags:
- '*'
pull_request:
types: [ opened, synchronize ]
branches:
- develop
- 'release-**'
tags:
- '*'
jobs:
build_ios:
name: Building the IPA
runs-on: macos-13
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install npm dependencies
run: |
npm install
- name: Install Pod
run: |
cd ios
pod install
- name: Building the IPA
run: |
cd ios
fastlane build_app_for_automation_on_simulator
env:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'

View File

@@ -1,103 +0,0 @@
name: Inji iOS build
on:
workflow_dispatch:
inputs:
mimotoBackendServiceUrl:
description: 'Mimoto backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
esignetBackendServiceUrl:
description: 'Esignet backend service URL'
required: true
default: 'https://api.sandbox.mosip.net'
type: string
theme:
description: 'Application Theme'
required: true
default: 'orange'
type: choice
options:
- orange
- purple
registry_edit:
description: 'Edit Registry'
required: true
default: 'true'
type: choice
options:
- false
- true
internal-testers:
description: 'Internal Testers Group'
required: true
default: 'QA-Triple'
type: choice
options:
- Dev-testing
- MEC
- QA
- MOSIP-Collab
- MOSIP-Dev-testing
buildDescription:
description: 'What to test'
required: true
default: 'QA-Triple environment build'
type: string
jobs:
build_ios:
name: Deploying to Testflight
runs-on: macos-13
steps:
- uses: actions/checkout@v3.1.0
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install npm dependencies
run: |
npm install
- name: Install Pod
run: |
cd ios
pod install
pod install
- name: Deploy iOS Beta to TestFlight
run: |
cd ios
fastlane beta
env:
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}'
DEVELOPER_APP_ID: '${{ secrets.IOS_INJI_DEVELOPER_APP_ID }}'
INJI_IOS_DEVELOPER_APP_IDENTIFIER: '${{ secrets.INJI_IOS_DEVELOPER_APP_IDENTIFIER }}'
INJI_IOS_DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.INJI_IOS_DEVELOPER_PORTAL_TEAM_ID }}'
INJI_IOS_FASTLANE_APPLE_ID: '${{ secrets.INJI_IOS_FASTLANE_APPLE_ID }}'
INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.INJI_IOS_FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}'
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}'
INJI_IOS_PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.INJI_IOS_PROVISIONING_PROFILE_SPECIFIER }}'
INJI_IOS_TEMP_KEYCHAIN_PASSWORD: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_PASSWORD }}'
INJI_IOS_TEMP_KEYCHAIN_USER: '${{ secrets.INJI_IOS_TEMP_KEYCHAIN_USER }}'
APPLE_KEY_ID: '${{ secrets.APPLE_KEY_ID }}'
APPLE_ISSUER_ID: '${{ secrets.APPLE_ISSUER_ID }}'
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
SLACK_URL: '${{ secrets.SLACK_WEBHOOK_DEVOPS }}'
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
APPLICATION_THEME: ${{ github.event.inputs.theme }}
CREDENTIAL_REGISTRY_EDIT: ${{ github.event.inputs.registry_edit }}
MIMOTO_HOST: ${{ github.event.inputs.mimotoBackendServiceUrl }}
ESIGNET_HOST: ${{ github.event.inputs.esignetBackendServiceUrl }}
TESTFLIGHT_INTERNAL_TESTERS_GROUP: ${{ github.event.inputs.internal-testers }}
TESTFLIGHT_BETA_APP_DESCRIPTION: ${{ github.event.inputs.buildDescription }}
- name: Upload Runner Log on Failure
if: failure() # Only run this step if the previous steps failed
uses: actions/upload-artifact@v3.1.1
with:
name: runner-log
path: /Users/runner/Library/Logs/gym/
retention-days: 1

50
.github/workflows/push-triggers.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Push-Triggers
on:
push:
branches:
- main
- develop
- qa-develop
- 'release-**'
release:
types: [published]
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
- develop
- qa-develop
- 'release-**'
jobs:
build-android:
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 }}'
build-ios:
uses: mosip/kattu/.github/workflows/ios-build.yml@master
with:
NODE_VERSION: "18.x"
SERVICE_LOCATION: '.'
IOS_SERVICE_LOCATION: 'ios'
SCRIPT_NAME: "fastlane ios_app_build"
# sonar-check:
# if: ${{ github.event_name != 'pull_request' }}
# uses: mosip/kattu/.github/workflows/gradlew-sonar-analysis.yml@master
# with:
# SERVICE_LOCATION: '.'
# ANDROID_LOCATION: 'android'
# secrets:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
# SLACK_WEBHOOK_URL: '${{ secrets.SLACK_WEBHOOK }}'

View File

@@ -1,30 +0,0 @@
name: SonarQube checks
on:
push:
branches:
- develop
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 0
- name: Install npm dependencies
run: |
npm ci
- uses: sonarsource/sonarqube-scan-action@master
with:
args:
-Dsonar.organization=${{ secrets.ORG_KEY }}
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
SONAR_ORGANIZATION: ${{ secrets.ORG_KEY }}
# If you wish to fail your job when the Quality Gate is red, uncomment the
# following lines. This would typically be used to fail a deployment.
# - uses: sonarsource/sonarqube-quality-gate-action@master
# timeout-minutes: 5
# env:
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

35
.github/workflows/tag.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: Tagging of repos
on:
workflow_dispatch:
inputs:
TAG:
description: "Tag to be published"
required: true
type: string
BODY:
description: "Release body message"
required: true
default: "Changes in this Release"
type: string
PRE_RELEASE:
description: "Pre-release? True/False"
required: true
default: False
type: string
DRAFT:
description: "Draft? True/False"
required: false
default: False
type: string
jobs:
tag-branch:
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 }}