-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from OutSystems/development
Merge `development` into `main`
- Loading branch information
Showing
43 changed files
with
2,644 additions
and
37 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,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" |
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,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 }}" | ||
|
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,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 }}' | ||
|
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,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 | ||
|
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,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 }} | ||
|
||
|
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,2 @@ | ||
node_modules | ||
package-lock.json |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# O11/ODC | ||
* @OutSystems/rd-mobile-ecosystem |
Oops, something went wrong.