From 0a7bd7e52f2e8276ca124fb249b6ef91de18a9eb Mon Sep 17 00:00:00 2001 From: Ze Qian Zhang Date: Wed, 28 Oct 2020 04:54:36 -0700 Subject: [PATCH] Set up CI with Azure Pipelines (#224) * Set up CI with Azure Pipelines [skip ci] * Remove Travis and outdated Gopkg files * Updated GO Version to 1.15 Co-authored-by: Mohit Sharma <65536214+mohsha-msft@users.noreply.github.com> --- .travis.yml | 11 -- Gopkg.lock | 271 -------------------------------------------- Gopkg.toml | 38 ------- azure-pipelines.yml | 28 +++++ 4 files changed, 28 insertions(+), 320 deletions(-) delete mode 100644 .travis.yml delete mode 100644 Gopkg.lock delete mode 100755 Gopkg.toml create mode 100644 azure-pipelines.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ba0aa12..0000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ -language: go -go: -- "1.15" -script: -- export GO111MODULE=on -- GOOS=linux go build ./azblob -- GOOS=darwin go build ./azblob -- GOOS=windows go build ./azblob -- GOOS=solaris go build ./azblob -- GOOS=illumos go build ./azblob -- go test -race -short -cover -v ./azblob diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 5e29c10..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,271 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - digest = "1:6b1426cad7057b717351eacf5b6fe70f053f11aac1ce254bbf2fd72c031719eb" - name = "contrib.go.opencensus.io/exporter/ocagent" - packages = ["."] - pruneopts = "UT" - revision = "dcb33c7f3b7cfe67e8a2cea10207ede1b7c40764" - version = "v0.4.12" - -[[projects]] - digest = "1:602649ff074ccee9273e1d3b25c4069f13a70fa0c232957c7d68a6f02fb7a9ea" - name = "github.com/Azure/azure-pipeline-go" - packages = ["pipeline"] - pruneopts = "UT" - revision = "105d6349faa1dec531c0b932b5863540c1f6aafb" - version = "v0.2.1" - -[[projects]] - digest = "1:d5800d9f8f0d48f84a2a45adeca9eee0e129f7d80b5c3d9770e90a4e5162058b" - name = "github.com/Azure/go-autorest" - packages = [ - "autorest/adal", - "autorest/date", - "tracing", - ] - pruneopts = "UT" - revision = "09205e8f6711a776499a14cf8adc6bd380db5d81" - version = "v12.2.0" - -[[projects]] - digest = "1:fdb4ed936abeecb46a8c27dcac83f75c05c87a46d9ec7711411eb785c213fa02" - name = "github.com/census-instrumentation/opencensus-proto" - packages = [ - "gen-go/agent/common/v1", - "gen-go/agent/metrics/v1", - "gen-go/agent/trace/v1", - "gen-go/metrics/v1", - "gen-go/resource/v1", - "gen-go/trace/v1", - ] - pruneopts = "UT" - revision = "a105b96453fe85139acc07b68de48f2cbdd71249" - version = "v0.2.0" - -[[projects]] - digest = "1:76dc72490af7174349349838f2fe118996381b31ea83243812a97e5a0fd5ed55" - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - pruneopts = "UT" - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[[projects]] - digest = "1:489a99067cd08971bd9c1ee0055119ba8febc1429f9200ab0bec68d35e8c4833" - name = "github.com/golang/protobuf" - packages = [ - "jsonpb", - "proto", - "protoc-gen-go/descriptor", - "protoc-gen-go/generator", - "protoc-gen-go/generator/internal/remap", - "protoc-gen-go/plugin", - "ptypes", - "ptypes/any", - "ptypes/duration", - "ptypes/struct", - "ptypes/timestamp", - "ptypes/wrappers", - ] - pruneopts = "UT" - revision = "b5d812f8a3706043e23a9cd5babf2e5423744d30" - version = "v1.3.1" - -[[projects]] - digest = "1:c20c9a82345346a19916a0086e61ea97425172036a32b8a8975490da6a129fda" - name = "github.com/grpc-ecosystem/grpc-gateway" - packages = [ - "internal", - "runtime", - "utilities", - ] - pruneopts = "UT" - revision = "cd0c8ef3533e9c04e6520cac37a81fe262fb0b34" - version = "v1.9.2" - -[[projects]] - digest = "1:67474f760e9ac3799f740db2c489e6423a4cde45520673ec123ac831ad849cb8" - name = "github.com/hashicorp/golang-lru" - packages = ["simplelru"] - pruneopts = "UT" - revision = "7087cb70de9f7a8bc0a10c375cb0d2280a8edf9c" - version = "v0.5.1" - -[[projects]] - branch = "master" - digest = "1:f1df16c368a97edecc18c8c061c278cb6a342450bb83d5da4738e5b330abd522" - name = "github.com/mattn/go-ieproxy" - packages = ["."] - pruneopts = "UT" - revision = "91bb50d981495aef1c208d31be3d77d904384f20" - -[[projects]] - digest = "1:4c93890bbbb5016505e856cb06b5c5a2ff5b7217584d33f2a9071ebef4b5d473" - name = "go.opencensus.io" - packages = [ - ".", - "internal", - "internal/tagencoding", - "metric/metricdata", - "metric/metricproducer", - "plugin/ocgrpc", - "plugin/ochttp", - "plugin/ochttp/propagation/b3", - "plugin/ochttp/propagation/tracecontext", - "resource", - "stats", - "stats/internal", - "stats/view", - "tag", - "trace", - "trace/internal", - "trace/propagation", - "trace/tracestate", - ] - pruneopts = "UT" - revision = "43463a80402d8447b7fce0d2c58edf1687ff0b58" - version = "v0.19.3" - -[[projects]] - branch = "master" - digest = "1:8f690c88cafc94f162d91fb3eaa1d9826f24c2f86ee7ea46c16bc0a3d3846c19" - name = "golang.org/x/net" - packages = [ - "context", - "http/httpguts", - "http/httpproxy", - "http2", - "http2/hpack", - "idna", - "internal/timeseries", - "trace", - ] - pruneopts = "UT" - revision = "da137c7871d730100384dbcf36e6f8fa493aef5b" - -[[projects]] - branch = "master" - digest = "1:382bb5a7fb4034db3b6a2d19e5a4a6bcf52f4750530603c01ca18a172fa3089b" - name = "golang.org/x/sync" - packages = ["semaphore"] - pruneopts = "UT" - revision = "112230192c580c3556b8cee6403af37a4fc5f28c" - -[[projects]] - branch = "master" - digest = "1:2c770d8251a8a2127b648f57602d75c8e40457ba070b57b38176013472f31326" - name = "golang.org/x/sys" - packages = [ - "unix", - "windows", - "windows/registry", - ] - pruneopts = "UT" - revision = "04f50cda93cbb67f2afa353c52f342100e80e625" - -[[projects]] - digest = "1:8d8faad6b12a3a4c819a3f9618cb6ee1fa1cfc33253abeeea8b55336721e3405" - name = "golang.org/x/text" - packages = [ - "collate", - "collate/build", - "internal/colltab", - "internal/gen", - "internal/language", - "internal/language/compact", - "internal/tag", - "internal/triegen", - "internal/ucd", - "language", - "secure/bidirule", - "transform", - "unicode/bidi", - "unicode/cldr", - "unicode/norm", - "unicode/rangetable", - ] - pruneopts = "UT" - revision = "342b2e1fbaa52c93f31447ad2c6abc048c63e475" - version = "v0.3.2" - -[[projects]] - digest = "1:5f003878aabe31d7f6b842d4de32b41c46c214bb629bb485387dbcce1edf5643" - name = "google.golang.org/api" - packages = ["support/bundler"] - pruneopts = "UT" - revision = "02490b97dff7cfde1995bd77de808fd27053bc87" - version = "v0.7.0" - -[[projects]] - branch = "master" - digest = "1:3565a93b7692277a5dea355bc47bd6315754f3246ed07a224be6aec28972a805" - name = "google.golang.org/genproto" - packages = [ - "googleapis/api/httpbody", - "googleapis/rpc/status", - "protobuf/field_mask", - ] - pruneopts = "UT" - revision = "eb59cef1c072c61ea4f7623910448d5e9c6a4455" - -[[projects]] - digest = "1:e8800ddadd6bce3bc0c5ffd7bc55dbdddc6e750956c10cc10271cade542fccbe" - name = "google.golang.org/grpc" - packages = [ - ".", - "balancer", - "balancer/base", - "balancer/roundrobin", - "binarylog/grpc_binarylog_v1", - "codes", - "connectivity", - "credentials", - "credentials/internal", - "encoding", - "encoding/proto", - "grpclog", - "internal", - "internal/backoff", - "internal/balancerload", - "internal/binarylog", - "internal/channelz", - "internal/envconfig", - "internal/grpcrand", - "internal/grpcsync", - "internal/syscall", - "internal/transport", - "keepalive", - "metadata", - "naming", - "peer", - "resolver", - "resolver/dns", - "resolver/passthrough", - "stats", - "status", - "tap", - ] - pruneopts = "UT" - revision = "501c41df7f472c740d0674ff27122f3f48c80ce7" - version = "v1.21.1" - -[[projects]] - branch = "v1" - digest = "1:dcb51660fc1fd7bfa3f45305db912fa587c12c17658fd66b3ab55339b59ffbe6" - name = "gopkg.in/check.v1" - packages = ["."] - pruneopts = "UT" - revision = "20d25e2804050c1cd24a7eea1e7a6447dd0e74ec" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - input-imports = [ - "github.com/Azure/azure-pipeline-go/pipeline", - "github.com/Azure/go-autorest/autorest/adal", - "gopkg.in/check.v1", - ] - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100755 index adcaa92..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - name = "github.com/Azure/azure-pipeline-go" - version = "0.2.1" - -[[constraint]] - branch = "v1" - name = "gopkg.in/check.v1" - -[prune] - go-tests = true - unused-packages = true diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..d4b77ee --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,28 @@ +trigger: +- master +- dev + +pool: + vmImage: 'ubuntu-latest' + +steps: +- task: GoTool@0 + inputs: + version: '1.15' +- script: | + go build ./azblob + displayName: 'Compile the SDK' +- script: | + go test -race -short -cover -v ./azblob + env: + ACCOUNT_NAME: $(ACCOUNT_NAME) + ACCOUNT_KEY: $(ACCOUNT_KEY) + BLOB_STORAGE_ACCOUNT_NAME: $(BLOB_STORAGE_ACCOUNT_NAME) + BLOB_STORAGE_ACCOUNT_KEY: $(BLOB_STORAGE_ACCOUNT_KEY) + PREMIUM_ACCOUNT_NAME: $(PREMIUM_ACCOUNT_NAME) + PREMIUM_ACCOUNT_KEY: $(PREMIUM_ACCOUNT_KEY) + SECONDARY_ACCOUNT_NAME: $(SECONDARY_ACCOUNT_NAME) + SECONDARY_ACCOUNT_KEY: $(SECONDARY_ACCOUNT_KEY) + APPLICATION_ID: $(APPLICATION_ID) + CLIENT_SECRET: $(CLIENT_SECRET) + TENANT_ID: $(TENANT_ID) \ No newline at end of file