Introduce a tag to hide Internal API Endpoints in DevStudio #1527
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
name: OnBoarding_Service | |
on: | |
workflow_call: | |
issues: | |
types: | |
- labeled | |
jobs: | |
Tenant-Onboarding-Process: | |
if: github.event.label.name == 'Onboard New Tenant' | |
runs-on: ubuntu-latest | |
steps: | |
- name: View issue information | |
env: | |
ISSUE_BODY: ${{ github.event.issue.body }} | |
ISSUE_TITLE: ${{ github.event.issue.title }} | |
run: | | |
echo "🎉 The job automatically triggered by a ${{ github.event_name }} event." | |
echo "Issue title: $ISSUE_TITLE" | |
echo "Issue No: ${{ github.event.issue.number }}" | |
echo "Issue body: $ISSUE_BODY" | |
- name: Creating new Temp sub dir 'service' | |
run: | | |
mkdir -m 777 service | |
cd service | |
pwd | |
ls -la | |
- name: Checkout /Fiserv/tenant-onboarding Repo at ${{ github.workspace }}/service | |
uses: actions/checkout@v3 | |
with: | |
repository: Fiserv/tenant-onboarding | |
ref: develop | |
path: ${{ github.workspace }}/service | |
- name: List files in the repository | |
run: | | |
cd ${{ github.workspace }} | |
pwd | |
ls -la | |
cd ${{ github.workspace }}/service | |
pwd | |
ls -la | |
- run: echo "💡 The Fiserv/tenant-onboarding repository has been cloned on root" | |
- run: echo "🖥️ The workflow is now ready to run Onboarding service on the runner." | |
- name: List files in the repository | |
run: | | |
pwd | |
ls -la | |
- name: Running Tenant Generator..... | |
id: build | |
env: | |
GITHUB_AUTH_TOKEN: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
STAGE_WEBHOOK_KEY: ${{ secrets.STAGE_WEBHOOK_KEY }} | |
PROD_WEBHOOK_KEY: ${{ secrets.PROD_WEBHOOK_KEY }} | |
run: | | |
pwd | |
cd ${{github.workspace}}/service/scripts | |
ls -la | |
npmv=$(npm --version) | |
echo "NPM version installed : " $npmv | |
nodev=$(node --version) | |
echo "Node version installed : " $nodev | |
npm install | |
echo " Repo: ${{ github.repository }}" | |
echo " Space: ${{ github.workspace }}" | |
result=$(node service.js ${{ github.event.issue.number }}) | |
echo "********** TENANT CONFIGURATION *********************" | |
echo "$result" | |
if [[ $result == *'FAILED'* ]] ;then | |
echo "Onboarding config writer failed and exiting the Job..." | |
exit 1 | |
else | |
echo "TENANT="$result >> $GITHUB_OUTPUT | |
echo "Onboarding config writer Ran Successfully....🍏" | |
cd ${{ github.workspace }}/service | |
tenant=$(./startup.sh -f '-rthde') | |
echo "tenant" | |
fi | |
- run: | | |
echo "🍏 This job's status is ${{ job.status }}." | |
pwd | |
cd ${{ github.workspace }}/service | |
pwd | |
ls -la | |
- name: Pushing tenant file to develop branch | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
with: | |
source_file: '${{github.workspace}}/service/tenant.json' | |
destination_repo: 'Fiserv/${{steps.build.outputs.TENANT}}' | |
destination_folder: 'config' | |
destination_branch: 'develop' | |
user_email: 'supriya.nirmale@fiserv.com' | |
user_name: 'sfiserv' | |
commit_message: 'pushing tenant json file remotely' | |
- name: Pushing tenant file to stage branch | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
with: | |
source_file: '${{github.workspace}}/service/tenant.json' | |
destination_repo: 'Fiserv/${{steps.build.outputs.TENANT}}' | |
destination_folder: 'config' | |
destination_branch: 'stage' | |
user_email: 'supriya.nirmale@fiserv.com' | |
user_name: 'sfiserv' | |
commit_message: 'pushing tenant json file remotely' | |
- name: Pushing tenant file to main branch | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
with: | |
source_file: '${{github.workspace}}/service/tenant.json' | |
destination_repo: 'Fiserv/${{steps.build.outputs.TENANT}}' | |
destination_folder: 'config' | |
destination_branch: 'main' | |
user_email: 'supriya.nirmale@fiserv.com' | |
user_name: 'sfiserv' | |
commit_message: 'pushing tenant json file remotely' | |
- name: Pushing DbScript file remotely | |
uses: dmnemec/copy_file_to_another_repo_action@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
with: | |
source_file: '${{github.workspace}}/service/dbscripts/' | |
destination_repo: 'Fiserv/tenants-data' | |
destination_folder: 'dbscripts/${{steps.build.outputs.TENANT}}' | |
destination_branch: 'main' | |
user_email: 'supriya.nirmale@fiserv.com' | |
user_name: 'sfiserv' | |
commit_message: 'pushing DbScript file remotely' | |
- name: Applying Branch Protection..... | |
if: '!cancelled()' | |
env: | |
GITHUB_AUTH_TOKEN: ${{ secrets.ZIP_GENERATOR_ACTION }} | |
run: | | |
cd ${{ github.workspace }}/service | |
tenant=$(./startup.sh -f '-be') | |
echo "tenant" |