Skip to content

Commit

Permalink
Merge pull request #30 from OutSystems/development
Browse files Browse the repository at this point in the history
Merge `development` into `main`
  • Loading branch information
OS-martacarlos authored Aug 19, 2024
2 parents 830e096 + f1ff709 commit 95d476e
Show file tree
Hide file tree
Showing 43 changed files with 2,644 additions and 37 deletions.
Binary file added .DS_Store
Binary file not shown.
73 changes: 73 additions & 0 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Github Release

on:
workflow_call:
inputs:
tag:
required: true
type: string
plugin:
description: 'Plugin'
required: true
type: string
environment:
description: 'The O11 environment we are downloading from'
required: true
type: string
notes:
description: 'The release notes'
required: true
type: string
pipelineID:
description: 'Where to download ODC OML from'
required: true
type: string
forgeVersionO11:
description: 'The plugin version on the O11 forge'
required: true
type: string
forgeVersionODC:
description: 'The plugin version on the ODC forge'
required: true
type: string

jobs:
download:
name: '📦 Download OutSystems Assets'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: '⬇️ Download the O11 OAP from LifeTime'
id: download_file
run: npm run download --plugin=${{inputs.plugin}} --forge=${{inputs.forgeVersionO11}} --environment=${{inputs.environment}} --lifetime=${{ secrets.LIFETIME }} --authentication='${{ secrets.AUTOMATION_TOKEN }}'


- name: '⬇️ Download OML from Azure'
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
echo "${{ secrets.AZURE_DEVOPS_TOKEN }}" | az devops login --organization https://dev.azure.com/OutSystemsRD
az pipelines runs artifact download --artifact-name v${{ inputs.forgeVersionODC }}.oml --path $GITHUB_WORKSPACE/downloads --run-id ${{inputs.pipelineID}} --organization https://dev.azure.com/OutSystemsRD --project "Mobile Supported Plugins"
ls downloads
az devops logout
- name: '🚀 Create GitHub Release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "📝 Extracting release notes"
sh scripts/extract_release_notes.sh "${{ inputs.tag }}" >> release_notes.md
RELEASE_NOTES="$(cat release_notes.md)"
echo "🚀 Creating release"
gh release create ${{ inputs.tag }} ./downloads/*.* -t "${{inputs.tag}}" -n "$RELEASE_NOTES"
49 changes: 49 additions & 0 deletions .github/workflows/o11_change_extensibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: (O11) Update Extensibility

on:
workflow_call:
inputs:
plugin:
description: 'Name of the plugin in O11'
required: true
type: string
configName:
description: 'Name to be used in the extensibility configuration of the plugin '
required: true
type: string
tag:
description: 'The repo version tag'
required: true
type: string
forgeVersion:
description: 'The plugin version on the forge'
required: true
type: string
mabsMin:
description: 'Minimum MABS version'
required: true
type: string
environment:
description: 'The environment where the plugin resides'
required: true
type: string

jobs:
update_o11:
name: '✍🏻 Change O11 Extensibility'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Update Extensibility Configurations JSON
run: npm run update:tag --plugin=${{ inputs.plugin }} --name='${{ inputs.configName }}' --mabs=${{ inputs.mabsMin }} --environment=${{ inputs.environment }} --repository=${{ github.repository }} --forge=${{ inputs.forgeVersion }} --branch=${{ inputs.tag }} --authentication="${{ secrets.BASICAUTH }}"

39 changes: 39 additions & 0 deletions .github/workflows/o11_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: (O11) Deploy Plugin

on:
workflow_call:
inputs:
plugin:
description: 'Name of the plugin in O11'
required: true
type: string
to:
description: 'Target O11 Enviorment'
required: true
default: Testing
type: string
from:
description: 'Source O11 Enviorment'
required: true
default: Development
type: string

jobs:
deploy:
name: '🚀 Deploy to ${{ inputs.to }}'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Deploying from ${{ inputs.from }} to ${{ inputs.to }}
run: npm run deploy --plugin=${{ inputs.plugin }} --from=${{ inputs.from }} --to=${{ inputs.to }} --lifetime=${{ secrets.LIFETIME }} --authentication='${{ secrets.AUTOMATION_TOKEN }}'

73 changes: 73 additions & 0 deletions .github/workflows/odc_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: (ODC) Release Plugin

on:
workflow_call:
inputs:
tag:
description: 'The repo version tag'
required: true
type: string
forgeVersion:
description: 'The plugin version on the forge'
required: true
type: string
mabsMin:
description: 'Minimum MABS version'
required: true
type: string
releaseNotes:
description: 'Release Notes'
required: true
type: string
odcPluginKey:
description: 'Release Notes'
required: true
type: string
outputs:
pipelineID:
description: 'ID of the pipeline that holds the OML'
value: ${{jobs.update_odc.outputs.pipelineID}}

jobs:
update_odc:
name: '🔌 Update ODC OML Extensibility & Tenant Release'
runs-on: ubuntu-latest
outputs:
pipelineID: ${{steps.save_pipeline_id.outputs.pipelineID}}
steps:
- name: '⏰ Trigger Azure Pipeline'
uses: azure/cli@v2
with:
azcliversion: latest
inlineScript: |
echo "${{ secrets.AZURE_DEVOPS_TOKEN }}" | az devops login --organization https://dev.azure.com/OutSystemsRD
PIPELINE_ID=$(az pipelines run --name OutSystems.cordova-outsystems-inappbrowser --organization https://dev.azure.com/OutSystemsRD --project "Mobile Supported Plugins" --branch feat/RMET-3440/add-odc-automations --parameters "pluginURL=https://github.com/${{ github.repository }}#${{ inputs.tag }}" "forgeVersion=${{ inputs.forgeVersion }}" "releaseNotes=${{ inputs.releaseNotes }}" "mabs=${{ inputs.mabsMin }}" "pluginKey=${{ inputs.odcPluginKey }}" --output tsv --query id)
echo "PIPELINE_ID=$PIPELINE_ID" >> $GITHUB_ENV
- name: '⏳ Wait for build to end'
uses: azure/cli@v2
env:
PIPELINE_ID: ${{ env.PIPELINE_ID }}
with:
azcliversion: latest
inlineScript: |
echo "${{ secrets.AZURE_DEVOPS_TOKEN }}" | az devops login --organization https://dev.azure.com/OutSystemsRD
STATUS="inProgress"
while [[ "$STATUS" != "completed" && "$STATUS" != "failed" ]]; do
sleep 30
STATUS=$(az pipelines runs show --organization https://dev.azure.com/OutSystemsRD --project "Mobile Supported Plugins" --id $PIPELINE_ID --output tsv --query status)
echo "Current status: $STATUS"
done
RESULT=$(az pipelines runs show --organization https://dev.azure.com/OutSystemsRD --project "Mobile Supported Plugins" --id $PIPELINE_ID --output tsv --query result)
echo "Pipeline Result: $RESULT"
if [ "$RESULT" == "failed" ]; then
echo "Azure Pipeline failed"
exit 1
fi
- name: '📥 Save Pipeline id'
id: save_pipeline_id
env:
PIPELINE_ID: ${{ env.PIPELINE_ID }}
run: echo "pipelineID=$PIPELINE_ID" >> $GITHUB_OUTPUT

98 changes: 98 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Release Plugin

on:
workflow_dispatch:
inputs:
tag:
description: 'The repo version tag'
required: true
type: string
forgeVersionO11:
description: 'The plugin version on the O11 forge'
required: true
type: string
forgeVersionODC:
description: 'The plugin version on the ODC forge'
required: true
type: string
mabsMin:
description: 'Minimum MABS version'
required: true
type: string
releaseNotes:
description: 'Release Notes'
required: true
type: string

jobs:
change-extensibility:
uses: ./.github/workflows/o11_change_extensibility.yml
name: '✍🏻 Update O11 OML Extensibility'
secrets: inherit
with:
plugin: BarcodeAutomation
configName: InAppBrowser Plugin
tag: ${{ github.event.inputs.tag }}
forgeVersion: ${{ github.event.inputs.forgeVersionO11 }}
mabsMin: ${{ github.event.inputs.mabsMin }}
environment: enmobile11-dev.outsystemsenterprise.com

deploy_o11:
name: '🔌 Deploy plugin across LifeTime'
runs-on: ubuntu-latest
needs: change-extensibility
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Tag Plugin with Version
run: npm run update:version --plugin=BarcodeAutomation --lifetime=${{ secrets.LIFETIME}} --authentication='${{secrets.AUTOMATION_TOKEN}}'

- name: ⏳ Wait for tag version to propagate
run: sleep 20 # Waits for 20 seconds

- name: Deploying from DEV to TST
run: npm run deploy --plugin=BarcodeAutomation --from=Development --to=Testing --lifetime=${{ secrets.LIFETIME }} --authentication='${{ secrets.AUTOMATION_TOKEN }}'

- name: ⏳ Wait for deployment to propagate
run: sleep 20 # Waits for 20 seconds

- name: Deploying from TST to PROD
run: npm run deploy --plugin=BarcodeAutomation --from=Testing --to=Production --lifetime=${{ secrets.LIFETIME }} --authentication='${{ secrets.AUTOMATION_TOKEN }}'

deploy_odc:
name: '🔌 Update ODC OML Extensibility & Tenant Release'
uses: ./.github/workflows/odc_release.yml
secrets: inherit
with:
tag: ${{ github.event.inputs.tag }}
forgeVersion: ${{ github.event.inputs.forgeVersionODC }}
mabsMin: ${{ github.event.inputs.mabsMin }}
releaseNotes: ${{ github.event.inputs.releaseNotes }}
odcPluginKey: 0076c4e5-80dd-4181-a56b-fab0858c1882

release:
uses: ./.github/workflows/github_release.yml
name: '🚀 Create Github release'
secrets: inherit
needs:
- deploy_o11
- deploy_odc
with:
tag: ${{ github.event.inputs.tag }}
environment: Production
plugin: InAppBrowserPlugin
notes: ${{ github.event.inputs.releaseNotes }}
pipelineID: ${{ needs.deploy_odc.outputs.pipelineID }}
forgeVersionO11: ${{ github.event.inputs.forgeVersionO11 }}
forgeVersionODC: ${{ github.event.inputs.forgeVersionODC }}


2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
package-lock.json
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

The changes documented here do not include those from the original repository.

## [Unreleased]
## 1.0.0

- Add content to `README` (https://outsystemsrd.atlassian.net/browse/RMET-3473).
### Features
- Add `Close` feature for WebView and System Browser on Android (https://outsystemsrd.atlassian.net/browse/RMET-3428).
- Add error codes and messages on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3465).
- Format error codes and messages on Android (https://outsystemsrd.atlassian.net/browse/RMET-3466).
- Add permissions requests and opening file chooser to `OpenInWebView` feature on Android (https://outsystemsrd.atlassian.net/browse/RMET-3534).
- Add error and loading screens for `OpenInWebView` feature for Android (https://outsystemsrd.atlassian.net/browse/RMET-3492).
- Add custom error page for `OpenInWebView` feature (https://outsystemsrd.atlassian.net/browse/RMET-3491).
- Add browser events to `OpenInSystemBrowser` feature on Android (https://outsystemsrd.atlassian.net/browse/RMET-3431).
- Add `OpenInSystemBrowser`'s features on Android (https://outsystemsrd.atlassian.net/browse/RMET-3424).
- Add possibility to override the user agent used in `OpenInWebView`'s webview (https://outsystemsrd.atlassian.net/browse/RMET-3490).
- Add browser events to `OpenInWebView` feature (https://outsystemsrd.atlassian.net/browse/RMET-3432).
- Add `OpenInWebView` with current features and default UI on Android (https://outsystemsrd.atlassian.net/browse/RMET-3426).
- Add `Close` feature on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3427).
- Add `OpenInWebView`'s interface customisations on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3489).
- Add `OpenInWebView`'s event listeners on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3430).
- Add `OpenInWebView`'s features on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3425).
- Add `OpenInSystemBrowser`'s event listeners on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3429).
- Add `OpenInSystemBrowser`'s features on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3423).
- Add `OpenInExternalBrowser`'s features on Android (https://outsystemsrd.atlassian.net/browse/RMET-3422).
- Add `OpenInExternalBrowser` on iOS (https://outsystemsrd.atlassian.net/browse/RMET-3421).
- [Bridge] Adds cordova bridge, with types (https://outsystemsrd.atlassian.net/browse/RMET-3419).
- Add content to `README` (https://outsystemsrd.atlassian.net/browse/RMET-3473).
2 changes: 2 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# O11/ODC
* @OutSystems/rd-mobile-ecosystem
Loading

0 comments on commit 95d476e

Please sign in to comment.