From 08c94358049f90743e6b7d4bc7f255a73478ea9f Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 16 Oct 2019 12:40:18 -0700 Subject: [PATCH 1/3] Add Go 1.13 to CI Updated Linux image to 18.04 Removed travis file. --- azure-pipelines.yml | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9dc7b82e01ab..fad812664b8c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,22 +1,22 @@ jobs: - - job: Build_Test + - job: BuildAndTest strategy: matrix: Linux_Go112: vm.image: 'ubuntu-18.04' go.version: '1.12' - GOROOT: '/usr/local/go$(go.version)' Linux_Go113: vm.image: 'ubuntu-18.04' go.version: '1.13' - GOROOT: '/usr/local/go$(go.version)' pool: vmImage: $(vm.image) variables: + GOROOT: '/usr/local/go$(go.version)' GOPATH: '$(system.defaultWorkingDirectory)/work' sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)' + GO: '$(GOROOT)/bin/go' IGNORE_BREAKING_CHANGES: true steps: @@ -31,25 +31,24 @@ jobs: displayName: 'Create Go Workspace' - script: | set -e - go version curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure -v - go get -u golang.org/x/lint/golint + $(GO) get -u golang.org/x/lint/golint workingDirectory: '$(sdkPath)' displayName: 'Install Dependencies' - - script: go vet $(go list ./... | grep -v vendor) + - script: $(GO) vet $($(GO) list ./... | grep -v vendor) workingDirectory: '$(sdkPath)' displayName: 'Vet' - - script: go build -v $(go list ./... | grep -v vendor) + - script: $(GO) build -v $($(GO) list ./... | grep -v vendor) workingDirectory: '$(sdkPath)' displayName: 'Build' - - script: go test $(dirname $(find . -path ./vendor -prune -o -name '*_test.go' -print) | sort -u) + - script: $(GO) test $(dirname $(find . -path ./vendor -prune -o -name '*_test.go' -print) | sort -u) workingDirectory: '$(sdkPath)' displayName: 'Run Tests' - - script: go run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges || $IGNORE_BREAKING_CHANGES + - script: $(GO) run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges || $IGNORE_BREAKING_CHANGES workingDirectory: '$(sdkPath)' displayName: 'Display Breaking Changes' - - script: go run ./tools/pkgchk/main.go ./services --exceptions ./tools/pkgchk/exceptions.txt + - script: $(GO) run ./tools/pkgchk/main.go ./services --exceptions ./tools/pkgchk/exceptions.txt workingDirectory: '$(sdkPath)' displayName: 'Verify Package Directory' - script: grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee >&2 @@ -57,14 +56,14 @@ jobs: displayName: 'Copyright Header Check' failOnStderr: true condition: succeededOrFailed() - - script: gofmt -s -l -w $(find . -path ./vendor -prune -o -name '*.go' -print) >&2 + - script: $(GOROOT)/bin/gofmt -s -l -w $(find . -path ./vendor -prune -o -name '*.go' -print) >&2 workingDirectory: '$(sdkPath)' displayName: 'Format Check' failOnStderr: true condition: succeededOrFailed() - script: | - golint ./storage/... >&2 - golint ./tools/... >&2 + $(GOROOT)/bin/golint ./storage/... >&2 + $(GOROOT)/bin/golint ./tools/... >&2 workingDirectory: '$(sdkPath)' displayName: 'Linter Check' failOnStderr: true From 3e72368d9ab71403226816956bda8305162e590a Mon Sep 17 00:00:00 2001 From: Joel Hendrix Date: Wed, 16 Oct 2019 13:14:35 -0700 Subject: [PATCH 2/3] add windows builds and refactor --- azure-pipelines.yml | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fad812664b8c..5ce8e1746eea 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,22 +1,30 @@ jobs: - - job: BuildAndTest + - job: Build_Test strategy: matrix: Linux_Go112: vm.image: 'ubuntu-18.04' go.version: '1.12' + GOROOT: '/usr/local/go$(go.version)' Linux_Go113: vm.image: 'ubuntu-18.04' go.version: '1.13' + GOROOT: '/usr/local/go$(go.version)' + Win_Go112: + vm.image: 'windows-2019' + go.version: '1.12' + GOROOT: 'c:\go$(go.version)' + Win_Go113: + vm.image: 'windows-2019' + go.version: '1.13' + GOROOT: 'c:\go$(go.version)' pool: vmImage: $(vm.image) variables: - GOROOT: '/usr/local/go$(go.version)' GOPATH: '$(system.defaultWorkingDirectory)/work' sdkPath: '$(GOPATH)/src/github.com/$(build.repository.name)' - GO: '$(GOROOT)/bin/go' IGNORE_BREAKING_CHANGES: true steps: @@ -28,27 +36,28 @@ jobs: mv !(work) '$(sdkPath)' echo '##vso[task.prependpath]$(GOROOT)/bin' echo '##vso[task.prependpath]$(GOPATH)/bin' + go version displayName: 'Create Go Workspace' - script: | set -e curl -sSL https://raw.githubusercontent.com/golang/dep/master/install.sh | sh dep ensure -v - $(GO) get -u golang.org/x/lint/golint + go get -u golang.org/x/lint/golint workingDirectory: '$(sdkPath)' displayName: 'Install Dependencies' - - script: $(GO) vet $($(GO) list ./... | grep -v vendor) + - script: go vet $(go list ./... | grep -v vendor) workingDirectory: '$(sdkPath)' displayName: 'Vet' - - script: $(GO) build -v $($(GO) list ./... | grep -v vendor) + - script: go build -v $(go list ./... | grep -v vendor) workingDirectory: '$(sdkPath)' displayName: 'Build' - - script: $(GO) test $(dirname $(find . -path ./vendor -prune -o -name '*_test.go' -print) | sort -u) + - script: go test $(dirname $(find . -path ./vendor -prune -o -name '*_test.go' -print) | sort -u) workingDirectory: '$(sdkPath)' displayName: 'Run Tests' - - script: $(GO) run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges || $IGNORE_BREAKING_CHANGES + - script: go run ./tools/apidiff/main.go packages ./services FETCH_HEAD~1 FETCH_HEAD --copyrepo --breakingchanges || $IGNORE_BREAKING_CHANGES workingDirectory: '$(sdkPath)' displayName: 'Display Breaking Changes' - - script: $(GO) run ./tools/pkgchk/main.go ./services --exceptions ./tools/pkgchk/exceptions.txt + - script: go run ./tools/pkgchk/main.go ./services --exceptions ./tools/pkgchk/exceptions.txt workingDirectory: '$(sdkPath)' displayName: 'Verify Package Directory' - script: grep -L -r --include *.go --exclude-dir vendor -P "Copyright (\d{4}|\(c\)) Microsoft" ./ | tee >&2 @@ -56,14 +65,14 @@ jobs: displayName: 'Copyright Header Check' failOnStderr: true condition: succeededOrFailed() - - script: $(GOROOT)/bin/gofmt -s -l -w $(find . -path ./vendor -prune -o -name '*.go' -print) >&2 + - script: gofmt -s -l -w $(find . -path ./vendor -prune -o -name '*.go' -print) >&2 workingDirectory: '$(sdkPath)' displayName: 'Format Check' failOnStderr: true condition: succeededOrFailed() - script: | - $(GOROOT)/bin/golint ./storage/... >&2 - $(GOROOT)/bin/golint ./tools/... >&2 + golint ./storage/... >&2 + golint ./tools/... >&2 workingDirectory: '$(sdkPath)' displayName: 'Linter Check' failOnStderr: true From eb23c4b59e0cf1b17755452d8c15b1854e84453d Mon Sep 17 00:00:00 2001 From: "openapi-bot[bot]" <37845953+openapi-bot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2019 01:19:40 +0000 Subject: [PATCH 3/3] [AutoPR maps/mgmt/2017-01-01-preview] adding missing readonly property (#7428) (#993) * Generated from d6484d88c8013f5aecf2626d2fe869600b475b5c adding missing readonly property (#7428) * Modifications after running after_scripts --- services/maps/mgmt/2017-01-01-preview/maps/models.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/services/maps/mgmt/2017-01-01-preview/maps/models.go b/services/maps/mgmt/2017-01-01-preview/maps/models.go index b498e124ed7d..626217a93580 100644 --- a/services/maps/mgmt/2017-01-01-preview/maps/models.go +++ b/services/maps/mgmt/2017-01-01-preview/maps/models.go @@ -49,6 +49,8 @@ type Account struct { Tags map[string]*string `json:"tags"` // Sku - READ-ONLY; The SKU of this account. Sku *Sku `json:"sku,omitempty"` + // Properties - READ-ONLY; The map account properties. + Properties *AccountProperties `json:"properties,omitempty"` // ID - READ-ONLY; The fully qualified Maps Account resource identifier. ID *string `json:"id,omitempty"` // Name - READ-ONLY; The name of the Maps Account, which is unique within a Resource Group. @@ -100,6 +102,12 @@ type AccountKeys struct { SecondaryKey *string `json:"secondaryKey,omitempty"` } +// AccountProperties additional Map account properties +type AccountProperties struct { + // XMsClientID - A unique identifier for the maps account + XMsClientID *string `json:"x-ms-client-id,omitempty"` +} + // Accounts a list of Maps Accounts. type Accounts struct { autorest.Response `json:"-"`