Skip to content

Commit

Permalink
Merge branch develop into main [20220818] (#131)
Browse files Browse the repository at this point in the history
* Agent: Bug fixes for network connectivity detection and quicker HTTP timeouts.
* SDK: Preliminary support to work with DO client on Windows (DoSvc).
* SDK: Public API surface changed to reports errors via return value instead of throwing exception.
* Plugin: Align with SDK API change.
* Build: Debian 10 arm64 and amd64 support.
  • Loading branch information
shishirb-MSFT authored Aug 18, 2022
2 parents ef70c5c + 4d9a4a5 commit 87aeb27
Show file tree
Hide file tree
Showing 82 changed files with 2,301 additions and 1,417 deletions.
7 changes: 7 additions & 0 deletions .gdn/.gdnsettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"files": { },
"folders": { },
"overwriteLogs": true,
"telemetryFlushTimeout": 10,
"variables": { }
}
124 changes: 124 additions & 0 deletions .gdn/.gdnsuppress
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"version": "latest",
"suppressionSets": {
"iot_connection_string_placeholder": {
"name": "iot_connection_string_placeholder",
"createdDate": "2022-03-18 05:25:19Z",
"lastUpdatedDate": "2022-03-18 05:25:19Z"
}
},
"results": {
"ab457c602f915c341e0fade58fc44c43235fb5aba387ad33261972b8c2055c5d": {
"signature": "ab457c602f915c341e0fade58fc44c43235fb5aba387ad33261972b8c2055c5d",
"alternativeSignatures": [],
"target": ".config/CredScanSupressions.json",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-GENERAL0140",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"7bd316b5befd347423ba5dda4c553e48ab1a7a8d5815dea02b6c573e4204bbcd": {
"signature": "7bd316b5befd347423ba5dda4c553e48ab1a7a8d5815dea02b6c573e4204bbcd",
"alternativeSignatures": [],
"target": "client-lite/test/json_parser_tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"d3131229aedcf42208748aa4e1884323fe33c836c8e19766f06424ccd9268532": {
"signature": "d3131229aedcf42208748aa4e1884323fe33c836c8e19766f06424ccd9268532",
"alternativeSignatures": [],
"target": "client-lite/test/mcc_manager.tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"777d236d49ab83e1cd7f7b3e8546356e5caaeb8a16eb77a9cc0c503029e96004": {
"signature": "777d236d49ab83e1cd7f7b3e8546356e5caaeb8a16eb77a9cc0c503029e96004",
"alternativeSignatures": [],
"target": "client-lite/test/mcc_manager.tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"bbd940f717b943c89772affc84ae976cb8e513f74539068e496752a53ab116b4": {
"signature": "bbd940f717b943c89772affc84ae976cb8e513f74539068e496752a53ab116b4",
"alternativeSignatures": [],
"target": "client-lite/test/mcc_manager.tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"6c108b2d560436676cc57c078ae24ece9fe1a70317a4bb56708ad5852de41699": {
"signature": "6c108b2d560436676cc57c078ae24ece9fe1a70317a4bb56708ad5852de41699",
"alternativeSignatures": [],
"target": "sdk-cpp/tests/rest/config_tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"57be7193ae24b09e9a4e8c76e3dc26baf23a1721996a61d9b0cb2c5122275030": {
"signature": "57be7193ae24b09e9a4e8c76e3dc26baf23a1721996a61d9b0cb2c5122275030",
"alternativeSignatures": [],
"target": "sdk-cpp/tests/rest/mcc_download_tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
},
"84cff2cf9fc6df1795f8dab53baf5ebad1c449997f60c34b99f73efe45504b02": {
"signature": "84cff2cf9fc6df1795f8dab53baf5ebad1c449997f60c34b99f73efe45504b02",
"alternativeSignatures": [],
"target": "sdk-cpp/tests/rest/mcc_download_tests.cpp",
"memberOf": [
"iot_connection_string_placeholder"
],
"tool": "credscan",
"ruleId": "CSCAN-AZURE0050",
"justification": "Placeholder key",
"createdDate": "2022-03-18 05:25:19Z",
"expirationDate": null,
"type": null
}
}
}
10 changes: 10 additions & 0 deletions .gdn/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Ignore Guardian internal files
.r/
rc/
rs/
i/
p/
c/

## Ignore Guardian Local settings
LocalSettings.gdn.json
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Private Source
sdk-cpp/src/internal/com/deliveryoptimization/*

# Prerequisites
*.d

Expand Down
24 changes: 19 additions & 5 deletions azure-pipelines/build/linux/du/docker/doclient-lite-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
variables:
- name: imageVersion # This is used to specify the vmImage & dockerImage to build the current release, this version # will always be the subsequent release in development branches
value: 0.8.0
- name: containerImageVersion
value: 0.9.0

# Disable branch and pr triggers - currently run this manually to avoid hogging build machine resources
# Rely on Ubuntu x64 pipeline for CI/CD
Expand All @@ -26,30 +28,42 @@ jobs:
- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian9_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: '0.8.0' #hard coded version because debian9 support will soon be removed
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu1804_arm64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_arm64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_x64' # azure pipelines does not support '.' in display names
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'doclient-lite-docker-steps.yml'

24 changes: 19 additions & 5 deletions azure-pipelines/build/linux/du/docker/dopapt-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
variables:
- name: imageVersion
value: 0.8.0
- name: containerImageVersion
value: 0.9.0

# Disable branch and pr triggers - currently run this manually to avoid hogging build machine resources
# Rely on Ubuntu x64 pipeline for CI/CD
Expand All @@ -26,30 +28,42 @@ jobs:
- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian9_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: '0.8.0' #hard coded version because debian9 support will soon be removed
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu1804_arm64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_arm64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_x64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dopapt-docker-steps.yml'

24 changes: 19 additions & 5 deletions azure-pipelines/build/linux/du/docker/dosdkcpp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
variables:
- name: imageVersion
value: 0.8.0
- name: containerImageVersion
value: 0.9.0

# Disable branch and pr triggers - currently run this manually to avoid hogging build machine resources
# Rely on Ubuntu x64 pipeline for CI/CD
Expand All @@ -26,29 +28,41 @@ jobs:
- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: '0.8.0' #hard coded version because debian9 support will soon be removed
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_arm64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian10_x64'
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'debian9_arm32'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu1804_arm64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_arm64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'

- template: ../templates/do-docker-jobs.yml
parameters:
targetOsArch: 'ubuntu2004_x64'
imageVersion: ${{variables.imageVersion}}
imageVersion: ${{variables.containerImageVersion}}
stepsTemplate: 'dosdkcpp-docker-steps.yml'
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ steps:
containerRegistry: doclientcontainerregistry
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes'
displayName: Enable the build VM to run multiarch docker container

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --entrypoint=python3 -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-agent-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-agent doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}} "/code/build/build.py" "--clean" "--package-for" "DEB" "--config" "${{parameters.config}}" "--project" "agent"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ steps:
containerRegistry: doclientcontainerregistry
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes'
displayName: Enable the build VM to run multiarch docker container

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --entrypoint=/bin/bash -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-plugin-apt-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-plugin-apt doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}} "/code/build/docker/docker-build-plugin.sh" "/code" "${{parameters.config}}"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ steps:
containerRegistry: doclientcontainerregistry
arguments: 'doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}}'

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes'
displayName: Enable the build VM to run multiarch docker container

- task: CmdLine@2
inputs:
script: 'sudo docker run --rm --entrypoint=python3 -v $(Build.SourcesDirectory):/code -v /tmp/build-deliveryoptimization-sdk-${{parameters.targetOsArch}}:/tmp/build-deliveryoptimization-sdk doclientcontainerregistry.azurecr.io/${{parameters.targetOsArch}}:${{parameters.imageVersion}} "/code/build/build.py" "--clean" "--package-for" "DEB" "--config" "${{parameters.config}}" "--project" "sdk" "--cmaketarget" "deliveryoptimization"'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ steps:
inputs:
targetType: 'filePath'
filePath: 'build/scripts/check_binary_size.sh'
arguments: '418672 /tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}/sdk-cpp/libdeliveryoptimization.so.*.*.*'
arguments: '443632 /tmp/build-deliveryoptimization-sdk/linux-${{parameters.config}}/sdk-cpp/libdeliveryoptimization.so.*.*.*'
displayName: 'Limit binary size increase'

- task: CmdLine@2
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build/mac/templates/dosdkcpp-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ steps:
do_download.h
do_download_property.h
do_download_status.h
do_exceptions.h
do_errors.h
SourceFolder: $(Build.SourcesDirectory)/sdk-cpp/include
TargetFolder: '$(Build.ArtifactStagingDirectory)/include'
displayName: 'Copy public headers to staging dir'
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build/windows/dosdkcpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pr:
- sdk-cpp/build/cleanup-install.sh

pool:
vmImage: "windows-latest"
vmImage: "windows-2019"

jobs:
- job: Debug
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines/build/windows/templates/dosdkcpp-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ steps:
do_download.h
do_download_property.h
do_download_status.h
do_exceptions.h
do_errors.h
SourceFolder: $(Build.SourcesDirectory)\sdk-cpp\include
TargetFolder: '$(Build.ArtifactStagingDirectory)/include'
displayName: 'Copy public headers to staging dir'
Expand Down
Loading

0 comments on commit 87aeb27

Please sign in to comment.