dikhan / terraform-provider-openapi

OpenAPI Terraform Provider that configures itself at runtime with the resources exposed by the service provider (defined in a swagger file)
Apache License 2.0
275 stars 48 forks source link

Fix release pipeline: Only install the binary and not add it to the mod deps #341

Closed dikhan closed 2 years ago

dikhan commented 2 years ago

What problem does this Pull Request solve?

This PR fixes the release pipeline currently blocked due to the github-release-notes lib being added as a go mod dep and therefore causing the git state to become dirty before goreleaser is able to execute the release which makes it fail.

Example of release failing due to the above: https://app.travis-ci.com/github/dikhan/terraform-provider-openapi/jobs/567413504

18.55s$ make release-version
[INFO] No github-release-notes in /home/travis/gopath/bin:/home/travis/.gimme/versions/go1.16.15.linux.amd64/bin:/home/travis/bin:/home/travis/bin:/home/travis/.local/bin:/opt/pyenv/shims:/home/travis/.phpenv/shims:/home/travis/perl5/perlbrew/bin:/home/travis/.nvm/versions/node/v8.9.1/bin:/home/travis/.kiex/elixirs/elixir-1.4.5/bin:/home/travis/.kiex/bin:/home/travis/.rvm/gems/ruby-2.4.1/bin:/home/travis/.rvm/gems/ruby-2.4.1@global/bin:/home/travis/.rvm/rubies/ruby-2.4.1/bin:/home/travis/gopath/bin:/home/travis/.gimme/versions/go1.7.4.linux.amd64/bin:/usr/local/phantomjs/bin:/usr/local/phantomjs:/usr/local/neo4j-3.2.7/bin:/usr/local/maven-3.5.2/bin:/usr/local/cmake-3.9.2/bin:/usr/local/clang-5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/travis/.rvm/bin:/home/travis/.phpenv/bin:/opt/pyenv/bin:/home/travis/.yarn/bin, installing github-release-notes
go get github.com/buchanae/github-release-notes@0.2.0
go: downloading github.com/buchanae/github-release-notes v0.0.0-20180827045457-200e1dacadbb
go: downloading github.com/google/go-github v17.0.0+incompatible
go: downloading golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
go: downloading golang.org/x/net v0.0.0-20220407224826-aac1ed45d8e3
go: downloading google.golang.org/appengine v1.6.6
go: downloading github.com/google/go-querystring v1.0.0
go: downloading github.com/golang/protobuf v1.4.2
go: downloading google.golang.org/protobuf v1.25.0
Attempting to release new version v3.0.0; current release v2.2.0
[INFO] New version v3.0.0 valid for release
[INFO] Creating a new tag v3.0.0
[INFO] Releasing v3.0.0
   • releasing...     
   • loading config file       file=.goreleaser.yml
   • loading environment variables
   • getting and validating git state
      • building...               commit=fdba646e24d0ac073f1aac657fe725c33ee37633 latest tag=v3.0.0
      • running against a shallow clone - check your CI documentation at https://goreleaser.com/ci
   ⨯ release failed after 0.03s error=git is currently in a dirty state
Please check in your pipeline what can be changing the following files:
 M go.mod
 M go.sum

Type of change

What type of change does your code introduce to the provider? Please put an x (w/o heading/trailing white spaces) in the boxes that apply:

Checklist

Please put an x (w/o heading/trailing white spaces) in the boxes that apply:

Checklist for Admins

codecov[bot] commented 2 years ago

Codecov Report

Merging #341 (eeb06cc) into master (fdba646) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #341   +/-   ##
=======================================
  Coverage   93.66%   93.66%           
=======================================
  Files          60       60           
  Lines        3584     3584           
=======================================
  Hits         3357     3357           
  Misses        160      160           
  Partials       67       67           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fdba646...eeb06cc. Read the comment docs.