Skip to content

Commit c461f81

Browse files
authored
Preview version of mgmt. profile package for Azure Stack (Azure#18841)
* update release tool to support profile * add profile sdk 2020-09-01-hybrid * aks poc * add test for aks * Revert "add test for aks" This reverts commit 5b68beb. * Revert "aks poc" This reverts commit 6b805d8. * fix rebase merge problem * change module name module version * move modelName and modelVersion to internal package * split PR to two part: one is profile package, another is tooling * refine changelog * resolve internal package problem * remove useless root build.go * add transform to "autorest.md" and support "go generate" * remove internal config * rename profile module * upgrade core lib version * update ci * gofmt * add ClientFactory * try to fix pipeline problem * add package prefix for tracing info
1 parent c3ab851 commit c461f81

File tree

289 files changed

+176550
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

289 files changed

+176550
-7
lines changed

eng/pipelines/templates/jobs/archetype-go-release.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@ stages:
1818
name: Verify
1919
inputs:
2020
filePath: ./eng/scripts/Verify-NeedToRelease.ps1
21-
arguments: >
22-
-PackageName 'sdk/${{ parameters.ServiceDirectory }}'
23-
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
24-
-repoId Azure/azure-sdk-for-go
25-
-workingDirectory $(System.DefaultWorkingDirectory)
21+
${{ if startsWith(parameters.ServiceDirectory, '../') }}:
22+
arguments: >
23+
-PackageName "${{replace(parameters.ServiceDirectory, '../', '')}}"
24+
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
25+
-repoId Azure/azure-sdk-for-go
26+
-workingDirectory $(System.DefaultWorkingDirectory)
27+
${{ else }}:
28+
arguments: >
29+
-PackageName 'sdk/${{ parameters.ServiceDirectory }}'
30+
-ServiceDirectory '${{ parameters.ServiceDirectory }}'
31+
-repoId Azure/azure-sdk-for-go
32+
-workingDirectory $(System.DefaultWorkingDirectory)
2633
pwsh: true
2734
env:
2835
GH_TOKEN: $(azuresdk-github-pat)
@@ -48,7 +55,10 @@ stages:
4855
- template: /eng/common/pipelines/templates/steps/retain-run.yml
4956
- template: /eng/common/pipelines/templates/steps/verify-changelog.yml
5057
parameters:
51-
PackageName: 'sdk/${{ parameters.ServiceDirectory }}'
58+
${{ if startsWith(parameters.ServiceDirectory, '../') }}:
59+
PackageName: "${{replace(parameters.ServiceDirectory, '../', '')}}"
60+
${{ else }}:
61+
PackageName: 'sdk/${{parameters.ServiceDirectory}}'
5262
ForRelease: true
5363
- task: PowerShell@2
5464
displayName: 'Verify no replace directives in go.mod file'

eng/pipelines/templates/steps/analyze.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,11 @@ steps:
125125
- ${{if eq(parameters.NonShipping, 'false')}}:
126126
- template: /eng/common/pipelines/templates/steps/verify-changelog.yml
127127
parameters:
128-
PackageName: 'sdk/${{parameters.ServiceDirectory}}'
128+
${{ if startsWith(parameters.ServiceDirectory, '../') }}:
129+
PackageName: "${{replace(parameters.ServiceDirectory, '../', '')}}"
130+
${{ else }}:
131+
PackageName: 'sdk/${{parameters.ServiceDirectory}}'
132+
ServiceDirectory: ${{ parameters.ServiceDirectory }}
129133
ForRelease: false
130134

131135
- task: PowerShell@2

profile/v20200901/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Release History
2+
3+
## 0.1.0 (Unreleased)
4+
5+
- First beta version of profile `hybrid20200901` for Azure Stack.

profile/v20200901/LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

profile/v20200901/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Azure Profile Module for Go
2+
3+
Azure Profiles offer a means of virtualizing the API Versions of services that should be targeted by an application or SDK.
4+
This concept was introduced for [Azure Stack](https://azure.microsoft.com/overview/azure-stack), where the environment in
5+
which applications will be executed is less consistent than when targeting the public cloud.
6+
This module is for profile `hybrid-2020-09-01`.
7+
8+
## Provide Feedback
9+
10+
If you encounter bugs or have suggestions, please
11+
[open an issue](https://github.com/Azure/azure-sdk-for-go/issues) and assign the `Azure Stack` label.
12+
13+
# Contributing
14+
15+
This project welcomes contributions and suggestions. Most contributions require
16+
you to agree to a Contributor License Agreement (CLA) declaring that you have
17+
the right to, and actually do, grant us the rights to use your contribution.
18+
For details, visit [https://cla.microsoft.com](https://cla.microsoft.com).
19+
20+
When you submit a pull request, a CLA-bot will automatically determine whether
21+
you need to provide a CLA and decorate the PR appropriately (e.g., label,
22+
comment). Simply follow the instructions provided by the bot. You will only
23+
need to do this once across all repos using our CLA.
24+
25+
This project has adopted the
26+
[Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
27+
For more information, see the
28+
[Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
29+
or contact [[email protected]](mailto:[email protected]) with any
30+
additional questions or comments.

profile/v20200901/build.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
4+
// This file enables 'go generate' to regenerate this specific SDK
5+
//go:generate go generate resourcemanager/appservice/armappservice/build.go
6+
//go:generate go generate resourcemanager/authorization/armauthorization/build.go
7+
//go:generate go generate resourcemanager/commerce/armcommerce/build.go
8+
//go:generate go generate resourcemanager/compute/armcompute/build.go
9+
//go:generate go generate resourcemanager/containerregistry/armcontainerregistry/build.go
10+
//go:generate go generate resourcemanager/containerservice/armcontainerservice/build.go
11+
//go:generate go generate resourcemanager/databoxedge/armdataboxedge/build.go
12+
//go:generate go generate resourcemanager/dns/armdns/build.go
13+
//go:generate go generate resourcemanager/eventhub/armeventhub/build.go
14+
//go:generate go generate resourcemanager/iothub/armiothub/build.go
15+
//go:generate go generate resourcemanager/keyvault/armkeyvault/build.go
16+
//go:generate go generate resourcemanager/monitor/armmonitor/build.go
17+
//go:generate go generate resourcemanager/network/armnetwork/build.go
18+
//go:generate go generate resourcemanager/resources/armlocks/build.go
19+
//go:generate go generate resourcemanager/resources/armpolicy/build.go
20+
//go:generate go generate resourcemanager/resources/armresources/build.go
21+
//go:generate go generate resourcemanager/resources/armsubscriptions/build.go
22+
//go:generate go generate resourcemanager/storage/armstorage/build.go
23+
24+
package v20200901

profile/v20200901/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file.
2+
trigger:
3+
branches:
4+
include:
5+
- main
6+
- feature/*
7+
- hotfix/*
8+
- release/*
9+
paths:
10+
include:
11+
- profile/v20200901/
12+
13+
pr:
14+
branches:
15+
include:
16+
- main
17+
- feature/*
18+
- hotfix/*
19+
- release/*
20+
paths:
21+
include:
22+
- profile/v20200901/
23+
24+
stages:
25+
- template: /eng/pipelines/templates/jobs/archetype-sdk-client.yml
26+
parameters:
27+
IncludeRelease: true
28+
ServiceDirectory: '../profile/v20200901'

profile/v20200901/go.mod

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module github.com/Azure/azure-sdk-for-go/profile/v20200901
2+
3+
go 1.18
4+
5+
require github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0
6+
7+
require (
8+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 // indirect
9+
golang.org/x/net v0.7.0 // indirect
10+
golang.org/x/text v0.7.0 // indirect
11+
)

profile/v20200901/go.sum

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0 h1:rTnT/Jrcm+figWlYz4Ixzt0SJVR2cMC8lvZcimipiEY=
2+
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.4.0/go.mod h1:ON4tFdPTwRcgWEaVDrN3584Ef+b7GgSJaXxe5fW9t4M=
3+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2 h1:+5VZ72z0Qan5Bog5C+ZkgSqUbeVUd9wgtHOrIKuc5b8=
4+
github.com/Azure/azure-sdk-for-go/sdk/internal v1.1.2/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w=
5+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
6+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
7+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
8+
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
9+
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
10+
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
11+
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
12+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//go:build go1.18
2+
// +build go1.18
3+
4+
// Copyright (c) Microsoft Corporation. All rights reserved.
5+
// Licensed under the MIT License. See License.txt in the project root for license information.
6+
7+
package internal
8+
9+
const (
10+
ModuleName = "hybrid20200901"
11+
ModuleVersion = "v0.1.0"
12+
)

0 commit comments

Comments
 (0)