Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workdir from builder release workflow, restrict to builder tags #4432

Conversation

jpkrohling
Copy link
Member

@jpkrohling jpkrohling commented Nov 13, 2021

The release of the collector builder for 0.39.0 failed due to:

   ⨯ release failed after 10.40s error=failed to get module path: chdir cmd/builder: no such file or directory: 

https://github.com/open-telemetry/opentelemetry-collector/runs/4195118833?check_suite_focus=true

Running it locally from the root of the repository did work:

$ goreleaser release -f ./cmd/builder/.goreleaser.yml
   • running goreleaser v0.184.0-pro
   • licensed to [email protected]
   • releasing...     
   • loading config file       file=./cmd/builder/.goreleaser.yml
   • loading environment variables
   • getting and validating git state
      • building...               commit=57ecd4ff8dc5a37c6f353c7d6f72f49e5dec18c2 latest tag=cmd/builder/v0.39.0
   • parsing tag      
   • running before hooks
      • running hook              hook=go mod download
   • setting defaults 
      • snapshotting     
      • nightly          
      • github/gitlab/gitea releases
      • project name     
      • loading go mod information
      • building binaries
      • universal binaries
      • creating source archive
      • archives         
      • linux packages   
      • snapcraft packages
      • calculating checksums
      • signing artifacts
      • signing docker images
      • docker images    
      • docker manifests 
      • artifactory      
      • fury             
      • blobs            
      • homebrew tap formula
      • gofish fish food cookbook
      • scoop manifests  
      • discord          
      • reddit           
      • slack            
      • teams            
      • twitter          
      • smtp             
      • mattermost       
      • milestones       
      • telegram         
   • checking ./dist  
   • loading go mod information
   • writing effective config file
      • writing                   config=dist/config.yaml
   • building binaries
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm_6/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm64/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_darwin_arm64/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_amd64/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_darwin_amd64/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm_7/opentelemetry-collector
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm_6/opentelemetry-collector.exe
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm64/opentelemetry-collector.exe
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm_7/opentelemetry-collector.exe
      • building                  binary=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_amd64/opentelemetry-collector.exe
   • archives         
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_darwin_amd64
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_amd64
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_armv7
      • skip archiving            binary=opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_armv6.exe
      • skip archiving            binary=opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_amd64.exe
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_darwin_arm64
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_armv6
      • skip archiving            binary=opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_armv7.exe
      • skip archiving            binary=opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_arm64.exe
      • skip archiving            binary=opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_arm64
   • calculating checksums
      • checksumming              file=opentelemetry-collector_0.39.0_darwin_amd64
      • checksumming              file=opentelemetry-collector_0.39.0_linux_amd64
      • checksumming              file=opentelemetry-collector_0.39.0_linux_armv7
      • checksumming              file=opentelemetry-collector_0.39.0_windows_amd64.exe
      • checksumming              file=opentelemetry-collector_0.39.0_linux_arm64
      • checksumming              file=opentelemetry-collector_0.39.0_darwin_arm64
      • checksumming              file=opentelemetry-collector_0.39.0_windows_armv7.exe
      • checksumming              file=opentelemetry-collector_0.39.0_windows_armv6.exe
      • checksumming              file=opentelemetry-collector_0.39.0_linux_armv6
      • checksumming              file=opentelemetry-collector_0.39.0_windows_arm64.exe
   • publishing       
      • github/gitlab/gitea releases
         • creating or updating release repo=jpkrohling/opentelemetry-collector tag=cmd/builder/v0.39.0
         • release updated           url=https://github.com/jpkrohling/opentelemetry-collector/releases/tag/cmd/builder/v0.39.0
         • uploading to release      file=dist/checksums.txt name=checksums.txt
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_amd64/opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_amd64.exe
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_darwin_amd64/opentelemetry-collector name=opentelemetry-collector_0.39.0_darwin_amd64
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_amd64/opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_amd64
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm_6/opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_armv6.exe
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm_7/opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_armv7
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm64/opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_arm64.exe
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_windows_arm_7/opentelemetry-collector.exe name=opentelemetry-collector_0.39.0_windows_armv7.exe
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm_6/opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_armv6
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_darwin_arm64/opentelemetry-collector name=opentelemetry-collector_0.39.0_darwin_arm64
         • uploading to release      file=/home/jpkroehling/Projects/src/github.com/open-telemetry/opentelemetry-collector/dist/opentelemetry-collector_linux_arm64/opentelemetry-collector name=opentelemetry-collector_0.39.0_linux_arm64
   • announcing       
   • release succeeded after 15.12s
   • thanks for using goreleaser-pro!

This PR removes the workdir entry from the release workflow, meaning that it should now run goreleaser from the main directory.

This PR also changes the tags to which this workflow reacts. Originally, this would react to "v*", but I tried locally with "cmd/builder/v0.39.0" and got a separate release for it, which I believe to be better. Example:
https://github.com/jpkrohling/opentelemetry-collector/releases/tag/cmd/builder/v0.39.0

Signed-off-by: Juraci Paixão Kröhling [email protected]

@jpkrohling jpkrohling requested review from a team and bogdandrutu November 13, 2021 15:21
@codecov
Copy link

codecov bot commented Nov 13, 2021

Codecov Report

Merging #4432 (c05b279) into main (f72de79) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4432   +/-   ##
=======================================
  Coverage   90.65%   90.65%           
=======================================
  Files         177      177           
  Lines       10376    10376           
=======================================
  Hits         9406     9406           
  Misses        751      751           
  Partials      219      219           

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 f72de79...c05b279. Read the comment docs.

@bogdandrutu bogdandrutu merged commit 5971c1d into open-telemetry:main Nov 13, 2021
@jpkrohling jpkrohling linked an issue Nov 17, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builder: Github workflow fails for builder
2 participants