forked from Azure/azure-sdk-for-go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modify config for modulization * Add more test in moduler pipeline * Move from go 1.12 to go 1.13 * Track 1 should remain go 1.12 * Changed to match new requirement * Combine pipelines
- Loading branch information
1 parent
c3d81ba
commit cbfda22
Showing
3 changed files
with
99 additions
and
36 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,20 +5,57 @@ jobs: | |
|
||
variables: | ||
GOROOT: '/usr/local/go1.12' | ||
GOPATH: '$(system.defaultWorkingDirectory)/work' | ||
sdkPath: '$(GOPATH)/src/github.com/Azure/azure-sdk-for-go' | ||
|
||
steps: | ||
- template: steps/InitWorkspace.yml | ||
- template: steps/SetGithub.yml | ||
- template: steps/GenerateProfiles.yml | ||
- template: steps/Vet.yml | ||
parameters: | ||
folder: './profiles' | ||
- template: steps/CheckFormat.yml | ||
parameters: | ||
folder: './profiles' | ||
- template: steps/CheckCopyrightHeader.yml | ||
parameters: | ||
folder: './profiles' | ||
- script: | | ||
# Enable bash verbose logging | ||
set -x | ||
mkdir -p '$(GOPATH)/bin' | ||
mkdir -p '$(sdkPath)' | ||
shopt -s dotglob extglob | ||
mv !(work) '$(sdkPath)' | ||
echo '##vso[task.prependpath]$(GOROOT)/bin' | ||
echo '##vso[task.prependpath]$(GOPATH)/bin' | ||
displayName: 'Create Go Workspace' | ||
- script: | | ||
set -x | ||
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 | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Install Dependencies' | ||
- script: | | ||
# Echo error if github-pat is empty | ||
[ -z $(github-pat) ] && echo "github-pat is empty!" && exit -1 | ||
echo $(Build.SourceBranchName) | ||
# Enable bash verbose logging | ||
set -x | ||
git checkout $(Build.SourceBranchName) | ||
git config user.email "[email protected]" | ||
git config user.name "azuresdkci" | ||
git config credential.helper store | ||
echo https://$(github-pat):[email protected] > ~/.git-credentials | ||
displayName: 'Setup github' | ||
workingDirectory: '$(sdkPath)' | ||
- script: | | ||
go generate ./profiles | ||
gofmt -s -w ./profiles | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Generate profiles' | ||
- script: go vet $(go list ./profiles/... | grep -v vendor) | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Vet in profiles' | ||
- script: go build -v $(go list ./profiles/... | grep -v vendor) | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Build' | ||
- script: gofmt -s -l -w $(find ./profiles -path ./vendor -prune -o -name '*.go' -print) >&2 | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Format Check' | ||
failOnStderr: true | ||
condition: succeededOrFailed() | ||
- script: | | ||
# test if there are new profiles | ||
if [ -z "$(git status --porcelain)" ]; then | ||
|
@@ -28,7 +65,7 @@ jobs: | |
git push origin $(Build.SourceBranchName) | ||
fi | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Push Profiles' | ||
displayName: 'Push profiles' | ||
- script: go run ./tools/moduler/main.go ./services -v | ||
displayName: 'Run Moduler' | ||
workingDirectory: '$(sdkPath)' | ||
displayName: 'Detecting new tag and push' | ||
workingDirectory: '$(sdkPath)' |
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