Feature/observability: scripts and doc updates #78
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: Main Branch PR | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Build-Code: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore iotedge/Distributed.IoT.Edge | |
- name: Build | |
run: dotnet build iotedge/Distributed.IoT.Edge --no-restore | |
- name: Test | |
run: dotnet test iotedge/Distributed.IoT.Edge --no-build --verbosity normal | |
- name: Build Dockerfile for OpcUa.Publisher module | |
id: dockerfileOpcUaPublisher | |
shell: pwsh | |
run: | | |
$definition = & ./deployment/build-opcuapublisher-dockerfile.ps1 -Path ./lib/Industrial-IoT/modules/src/Microsoft.Azure.IIoT.Modules.OpcUa.Publisher/src | |
$dockerfile = $definition.dockerfile | |
$contentPath = (Join-Path $definition.buildContext /.) | |
echo "DOCKERFILE=$dockerfile" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
echo "CONTENTPATH=$contentPath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Get the version | |
id: vars | |
run: echo ::set-output name=tag::$(echo main-pr-$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")) | |
- name: echo tag | |
run: echo ${{steps.vars.outputs.tag}} | |
- name: Build the tagged Docker image for Data Gateway module. | |
run: docker build iotedge/Distributed.IoT.Edge/. --file iotedge/Distributed.IoT.Edge/Distributed.IoT.Edge.DataGatewayModule/Dockerfile --tag azure-samples/distributed-az-iot-edge-datagatewaymodule:${{steps.vars.outputs.tag}} | |
- name: Build the tagged Docker image for Simulated Temperature Sensor module. | |
run: docker build iotedge/Distributed.IoT.Edge/. --file iotedge/Distributed.IoT.Edge/Distributed.IoT.Edge.SimulatedTemperatureSensorModule/Dockerfile --tag azure-samples/distributed-az-iot-edge-simulatedtemperaturesensormodule:${{steps.vars.outputs.tag}} | |
- name: Build the tagged Docker image for OpcUa.Publisher module. | |
run: docker build ${{ env.CONTENTPATH }} --file ${{ env.DOCKERFILE }} --tag azure-samples/distributed-az-iot-edge-opcuapublisher:${{steps.vars.outputs.tag}} |