Skip to content

(ODC) Release Plugin #5

(ODC) Release Plugin

(ODC) Release Plugin #5

Workflow file for this run

name: (ODC) Release Plugin
on:
workflow_dispatch:
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
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.outsystems-plugins-release-automations --organization https://dev.azure.com/OutSystemsRD --project "Mobile Supported Plugins" --branch main --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