diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f3b3a1402..5647e604c 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -69,7 +69,7 @@ jobs: ${{ steps.meta.outputs.tags }} arm_templates: - name: Publish ARM templates + name: Publish cloud infrastructure templates # The type of runner that the job will run on runs-on: ubuntu-latest @@ -112,24 +112,34 @@ jobs: working-directory: arm-templates run: | rm -rf ./templates/ - mkdir -p templates/iotedge-lorawan-starterkit + mkdir -p templates/azure/iotedge-lorawan-starterkit touch ./templates/.gitkeep cp -r ../IoT-Hub-Portal/templates/* ./templates/ - cp -r ../iotedge-lorawan-starterkit/TemplateBicep/* ./templates/iotedge-lorawan-starterkit/ - sed -r -i 's/..\/iotedge-lorawan-starterkit\/TemplateBicep\/main.bicep/.\/iotedge-lorawan-starterkit\/main.bicep/g' ./templates/portal_with_lorawan_and_starter_kit.bicep + cp -r ../iotedge-lorawan-starterkit/TemplateBicep/* ./templates/azure/iotedge-lorawan-starterkit/ + sed -r -i 's/..\/iotedge-lorawan-starterkit\/TemplateBicep\/main.bicep/.\/iotedge-lorawan-starterkit\/main.bicep/g' ./templates/azure/portal_with_lorawan_and_starter_kit.bicep - name: Update IoTHub Portal docker image tag in app_service.bicep - working-directory: arm-templates/templates + working-directory: arm-templates/templates/azure run: sed -i 's/ghcr.io\/cgi-fr\/iothub-portal:latest/ghcr.io\/cgi-fr\/iothub-portal:${{ fromJSON(steps.version.outputs.json).labels['org.opencontainers.image.version'] }}/g' app_service.bicep + - name: Update IoTHub Portal docker image tag in awsdeploy.yml + working-directory: arm-templates/templates/aws + run: sed -i 's/\${AWS::AccountId}.dkr.ecr.\${AWS::Region}.amazonaws.com\/iot-hub-portal:latest/578920151383.dkr.ecr.eu-west-1.amazonaws.com\/iot-hub-portal:${{ fromJSON(steps.version.outputs.json).labels['org.opencontainers.image.version'] }}/g' awsdeploy.yml + - name: Generate ARM file - working-directory: arm-templates/templates + working-directory: arm-templates/templates/azure run: az bicep build --file azuredeploy.bicep --outfile azuredeploy.json - - name: Upload templates to release assets + - name: Upload azure templates to release assets + uses: AButler/upload-release-assets@v2.0 + with: + files: 'arm-templates/templates/azure/*.json' + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Upload aws templates to release assets uses: AButler/upload-release-assets@v2.0 with: - files: 'arm-templates/templates/*.json' + files: 'arm-templates/templates/aws/*.yml' repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Create PR for template updates diff --git a/templates/aws/awsdeploy.yml b/templates/aws/awsdeploy.yml index 50b4aa707..5ce8266ca 100644 --- a/templates/aws/awsdeploy.yml +++ b/templates/aws/awsdeploy.yml @@ -629,8 +629,6 @@ Resources: Fn::Sub: "${openIdScopeName}" - Name: CloudProvider Value: AWS - - Name: PortalName - Value: IoT Portal DEMO - AWS ImageIdentifier: Fn::Sub: "${AWS::AccountId}.dkr.ecr.${AWS::Region}.amazonaws.com/iot-hub-portal:latest" ImageRepositoryType: ECR diff --git a/templates/app_insights.bicep b/templates/azure/app_insights.bicep similarity index 100% rename from templates/app_insights.bicep rename to templates/azure/app_insights.bicep diff --git a/templates/app_service.bicep b/templates/azure/app_service.bicep similarity index 100% rename from templates/app_service.bicep rename to templates/azure/app_service.bicep diff --git a/templates/app_service_plan.bicep b/templates/azure/app_service_plan.bicep similarity index 100% rename from templates/app_service_plan.bicep rename to templates/azure/app_service_plan.bicep diff --git a/templates/azuredeploy.bicep b/templates/azure/azuredeploy.bicep similarity index 100% rename from templates/azuredeploy.bicep rename to templates/azure/azuredeploy.bicep diff --git a/templates/azuredeploy.json b/templates/azure/azuredeploy.json similarity index 100% rename from templates/azuredeploy.json rename to templates/azure/azuredeploy.json diff --git a/templates/azuredeployUI.json b/templates/azure/azuredeployUI.json similarity index 100% rename from templates/azuredeployUI.json rename to templates/azure/azuredeployUI.json diff --git a/templates/blob_container.bicep b/templates/azure/blob_container.bicep similarity index 100% rename from templates/blob_container.bicep rename to templates/azure/blob_container.bicep diff --git a/templates/database.bicep b/templates/azure/database.bicep similarity index 100% rename from templates/database.bicep rename to templates/azure/database.bicep diff --git a/templates/dps.bicep b/templates/azure/dps.bicep similarity index 100% rename from templates/dps.bicep rename to templates/azure/dps.bicep diff --git a/templates/iothub.bicep b/templates/azure/iothub.bicep similarity index 100% rename from templates/iothub.bicep rename to templates/azure/iothub.bicep diff --git a/templates/iothub_eventhub_consumer_group.bicep b/templates/azure/iothub_eventhub_consumer_group.bicep similarity index 100% rename from templates/iothub_eventhub_consumer_group.bicep rename to templates/azure/iothub_eventhub_consumer_group.bicep diff --git a/templates/portal_with_lorawan.bicep b/templates/azure/portal_with_lorawan.bicep similarity index 100% rename from templates/portal_with_lorawan.bicep rename to templates/azure/portal_with_lorawan.bicep diff --git a/templates/portal_with_lorawan_and_starter_kit.bicep b/templates/azure/portal_with_lorawan_and_starter_kit.bicep similarity index 100% rename from templates/portal_with_lorawan_and_starter_kit.bicep rename to templates/azure/portal_with_lorawan_and_starter_kit.bicep diff --git a/templates/portal_without_lorawan.bicep b/templates/azure/portal_without_lorawan.bicep similarity index 100% rename from templates/portal_without_lorawan.bicep rename to templates/azure/portal_without_lorawan.bicep diff --git a/templates/storage.bicep b/templates/azure/storage.bicep similarity index 100% rename from templates/storage.bicep rename to templates/azure/storage.bicep