summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.azdo/azure-pipeline-nightly.yml4
-rw-r--r--.azdo/azure-pipeline.yml4
-rw-r--r--.azdo/package.yml46
-rw-r--r--.devcontainer/Dockerfile2
-rw-r--r--.github/workflows/check-pr.yml2
-rw-r--r--README.md4
-rw-r--r--go.mod2
-rw-r--r--scripts/buildPackage.sh72
-rw-r--r--vendor/modules.txt10
9 files changed, 137 insertions, 9 deletions
diff --git a/.azdo/azure-pipeline-nightly.yml b/.azdo/azure-pipeline-nightly.yml
index 7c0df13e..939fa40d 100644
--- a/.azdo/azure-pipeline-nightly.yml
+++ b/.azdo/azure-pipeline-nightly.yml
@@ -11,8 +11,8 @@ jobs:
maxParallel: 1 # any more and we get throttled by AzDO!
goVersions:
- - value: '1.13.1'
- ymlSafeName: '1_13_1'
+ - value: '1.14.10'
+ ymlSafeName: '1_14_10'
vmImages:
- value: 'macOS-10.14'
diff --git a/.azdo/azure-pipeline.yml b/.azdo/azure-pipeline.yml
index b88cfa16..6e92889b 100644
--- a/.azdo/azure-pipeline.yml
+++ b/.azdo/azure-pipeline.yml
@@ -22,8 +22,8 @@ jobs:
- template: ./ci.yml
parameters:
goVersions:
- - value: '1.13.11'
- ymlSafeName: '1_13_11'
+ - value: '1.14.10'
+ ymlSafeName: '1_14_10'
vmImages:
- value: 'ubuntu-16.04'
diff --git a/.azdo/package.yml b/.azdo/package.yml
new file mode 100644
index 00000000..421ceffc
--- /dev/null
+++ b/.azdo/package.yml
@@ -0,0 +1,46 @@
+# Go
+# Build your Go project.
+# Add steps that test, save build artifacts, deploy, and more:
+# https://docs.microsoft.com/azure/devops/pipelines/languages/go
+
+jobs:
+
+- job: Package
+ displayName: 'Package: '
+
+ pool:
+ vmImage: 'ubuntu-latest'
+
+ variables:
+ goVersion: 1.14.7
+ GOBIN: '$(GOPATH)/bin' # Go binaries path
+ GOROOT: '/usr/local/go' # Go installation path
+ GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path
+ modulePath: '$(GOPATH)/src/github.com/$(build.repository.name)' # Path to the module's code
+
+ steps:
+ - task: GoTool@0
+ displayName: 'Install correct version of Go'
+ inputs:
+ version: $(goVersion)
+ GOPATH: '$(Pipeline.Workspace)/gopath'
+ GOBIN: '$(GOPATH)/bin'
+
+ - bash: |
+ #!/usr/bin/env bash
+ go version
+ echo "install path $(pwd)"
+ displayName: "GO Environment Check"
+
+ - bash: |
+ #!/usr/bin/env bash
+ ./scripts/buildPackage.sh
+ displayName: "Build Packages"
+ env:
+ VERSION: $(RELEASE_VERSION)
+
+ - task: PublishPipelineArtifact@1
+ inputs:
+ targetPath: '$(system.defaultWorkingDirectory)/dist/'
+ artifact: 'ADOPackages'
+ publishLocation: 'pipeline'
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index 1bedeb9a..74418994 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -1,4 +1,4 @@
-ARG GO_VERSION=1.13
+ARG GO_VERSION=1.14
FROM golang:${GO_VERSION}-stretch
diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml
index 0c2a569a..cb44c0b3 100644
--- a/.github/workflows/check-pr.yml
+++ b/.github/workflows/check-pr.yml
@@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-16.04]
- go-version: [1.13.12]
+ go-version: [1.14.10]
steps:
diff --git a/README.md b/README.md
index fcf0003e..5d61f739 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@ resource "azuredevops_build_definition" "build_definition" {
## Developer Requirements
* [Terraform](https://www.terraform.io/downloads.html) version 0.12.x +
-* [Go](https://golang.org/doc/install) version 1.13.x (to build the provider plugin)
+* [Go](https://golang.org/doc/install) version 1.14.x (to build the provider plugin)
If you're on Windows you'll also need:
@@ -71,7 +71,7 @@ As [described below](#build-using-powerShell-scripts) we provide some PowerShell
## Developing the Provider
-If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.13+ is **required**). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
+If you wish to work on the provider, you'll first need [Go](http://www.golang.org) installed on your machine (version 1.14+ is **required**). You'll also need to correctly setup a [GOPATH](http://golang.org/doc/code.html#GOPATH), as well as adding `$GOPATH/bin` to your `$PATH`.
### Using the GOPATH model
diff --git a/go.mod b/go.mod
index 1a3a1c41..da263451 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/microsoft/terraform-provider-azuredevops
-go 1.13
+go 1.14
require (
github.com/ahmetb/go-linq v3.0.0+incompatible
diff --git a/scripts/buildPackage.sh b/scripts/buildPackage.sh
new file mode 100644
index 00000000..e61702b9
--- /dev/null
+++ b/scripts/buildPackage.sh
@@ -0,0 +1,72 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+SCRIPTS_DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+BUILD_DIR="${SCRIPTS_DIR}/../dist/"
+SOURCE_DIR="${SCRIPTS_DIR}/../"
+NAME="azuredevops"
+BUILD_ARTIFACT="terraform-provider-${NAME}_${VERSION}"
+
+OS_ARCH=("freebsd:amd64"
+ "freebsd:386"
+ "freebsd:arm"
+ "freebsd:arm64"
+ "windows:amd64"
+ "windows:386"
+ "linux:amd64"
+ "linux:386"
+ "linux:arm"
+ "linux:arm64"
+ "darwin:amd64")
+
+
+function clean() {
+ info "Cleaning $BUILD_DIR"
+ rm -rf "$BUILD_DIR"
+ mkdir -p "$BUILD_DIR"
+}
+
+function release() {
+ info "Clean build directory"
+ clean
+
+ info "Attempting to build ${BUILD_ARTIFACT}"
+
+ cd "$SOURCE_DIR"
+ go mod download
+ for os_arch in "${OS_ARCH[@]}" ; do
+ OS=${os_arch%%:*}
+ ARCH=${os_arch#*:}
+ info "GOOS: ${OS}, GOARCH: ${ARCH}"
+ (
+ env GOOS="${OS}" GOARCH="${ARCH}" go build -o "${BUILD_ARTIFACT}"
+ zip "${BUILD_ARTIFACT}_${OS}_${ARCH}.zip" "${BUILD_ARTIFACT}"
+# tar -cf "${BUILD_ARTIFACT}_${OS}_${ARCH}.tar" "${BUILD_ARTIFACT}"
+ rm -rf ${BUILD_ARTIFACT}
+ )
+ done
+ mv *.zip ${BUILD_DIR}
+ cd ${BUILD_DIR}
+ shasum -a 256 *.zip > "${BUILD_ARTIFACT}_SHA256SUMS"
+ cat "${BUILD_ARTIFACT}_SHA256SUMS"
+ ls -al
+
+}
+
+function log() {
+ LEVEL="$1"
+ shift
+ echo "[$LEVEL] $@"
+}
+
+function info() {
+ log "INFO" $@
+}
+
+function fatal() {
+ log "FATAL" $@
+ exit 1
+}
+
+release
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 53d68bac..ea23378e 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -9,6 +9,7 @@ cloud.google.com/go/storage
# github.com/agext/levenshtein v1.2.2
github.com/agext/levenshtein
# github.com/ahmetb/go-linq v3.0.0+incompatible
+## explicit
github.com/ahmetb/go-linq
# github.com/apparentlymart/go-cidr v1.0.1
github.com/apparentlymart/go-cidr/cidr
@@ -63,6 +64,7 @@ github.com/davecgh/go-spew/spew
# github.com/fatih/color v1.7.0
github.com/fatih/color
# github.com/golang/mock v1.4.1
+## explicit
github.com/golang/mock/gomock
# github.com/golang/protobuf v1.3.4
github.com/golang/protobuf/proto
@@ -78,6 +80,7 @@ github.com/google/go-cmp/cmp/internal/flags
github.com/google/go-cmp/cmp/internal/function
github.com/google/go-cmp/cmp/internal/value
# github.com/google/uuid v1.1.1
+## explicit
github.com/google/uuid
# github.com/googleapis/gax-go/v2 v2.0.5
github.com/googleapis/gax-go/v2
@@ -98,6 +101,7 @@ github.com/hashicorp/go-plugin/internal/plugin
# github.com/hashicorp/go-safetemp v1.0.0
github.com/hashicorp/go-safetemp
# github.com/hashicorp/go-uuid v1.0.1
+## explicit
github.com/hashicorp/go-uuid
# github.com/hashicorp/go-version v1.2.0
github.com/hashicorp/go-version
@@ -128,6 +132,7 @@ github.com/hashicorp/hcl/v2/json
# github.com/hashicorp/logutils v1.0.0
github.com/hashicorp/logutils
# github.com/hashicorp/terraform v0.12.23
+## explicit
github.com/hashicorp/terraform/helper/acctest
github.com/hashicorp/terraform/helper/hashcode
# github.com/hashicorp/terraform-config-inspect v0.0.0-20191212124732-c6ae6269b9d7
@@ -135,6 +140,7 @@ github.com/hashicorp/terraform-config-inspect/tfconfig
# github.com/hashicorp/terraform-json v0.4.0
github.com/hashicorp/terraform-json
# github.com/hashicorp/terraform-plugin-sdk v1.10.0
+## explicit
github.com/hashicorp/terraform-plugin-sdk/acctest
github.com/hashicorp/terraform-plugin-sdk/helper/acctest
github.com/hashicorp/terraform-plugin-sdk/helper/hashcode
@@ -195,6 +201,7 @@ github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.5
github.com/mattn/go-isatty
# github.com/microsoft/azure-devops-go-api/azuredevops v1.0.0-b3
+## explicit
github.com/microsoft/azure-devops-go-api/azuredevops
github.com/microsoft/azure-devops-go-api/azuredevops/accounts
github.com/microsoft/azure-devops-go-api/azuredevops/build
@@ -250,6 +257,7 @@ github.com/posener/complete/match
github.com/spf13/afero
github.com/spf13/afero/mem
# github.com/stretchr/testify v1.4.0
+## explicit
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
# github.com/ulikunitz/xz v0.5.5
@@ -289,6 +297,7 @@ go.opencensus.io/trace/internal
go.opencensus.io/trace/propagation
go.opencensus.io/trace/tracestate
# golang.org/x/crypto v0.0.0-20200427165652-729f1e841bcc
+## explicit
golang.org/x/crypto/bcrypt
golang.org/x/crypto/blowfish
golang.org/x/crypto/cast5
@@ -401,4 +410,5 @@ google.golang.org/grpc/status
google.golang.org/grpc/tap
google.golang.org/grpc/test/bufconn
# gopkg.in/yaml.v2 v2.2.4
+## explicit
gopkg.in/yaml.v2