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

Switch to ghcr to publish Kanister images #830

Merged
merged 2 commits into from
Dec 10, 2020
Merged

Switch to ghcr to publish Kanister images #830

merged 2 commits into from
Dec 10, 2020

Conversation

PrasadG193
Copy link
Contributor

@PrasadG193 PrasadG193 commented Dec 4, 2020

Change Overview

Authenticating docker client:

docker login https://ghcr.io -u github_username -p GITHUB_PERSONAL_ACCESS_TOKEN

Scopes needed while creating PA token:

read:packages
write:packages
delete:packages

Kanister packages: https://github.com/orgs/kanisterio/packages

Pull request type

Please check the type of change your PR introduces:

  • 🚧 Work in Progress
  • 🌈 Refactoring (no functional changes, no api changes)
  • 🐹 Trivial/Minor
  • 🐛 Bugfix
  • 🌻 Feature
  • 🗺️ Documentation
  • 🤖 Test

Test Plan

Logs while building using goreleaser:

$ goreleaser release --skip-publish --snapshot --rm-dist
   _ releasing using goreleaser 0.127.0...
   _ loading config file       file=.goreleaser.yml
   _ RUNNING BEFORE HOOKS     
      _ running go mod download  
   _ LOADING ENVIRONMENT VARIABLES
      _ pipe skipped              error=publishing is disabled
   _ GETTING AND VALIDATING GIT STATE
      _ releasing 0.43.0, commit 66afb247e9564a7a0d9100d88bb27668848a3b76
      _ pipe skipped              error=disabled during snapshot mode
   _ PARSING TAG              
   _ SETTING DEFAULTS         
      _ LOADING ENVIRONMENT VARIABLES
      _ SNAPSHOTING              
      _ GITHUB/GITLAB/GITEA RELEASES
      _ PROJECT NAME             
      _ BUILDING BINARIES        
      _ ARCHIVES                 
      _ LINUX PACKAGES WITH NFPM 
      _ SNAPCRAFT PACKAGES       
      _ CALCULATING CHECKSUMS    
      _ SIGNING ARTIFACTS        
      _ DOCKER IMAGES            
      _ ARTIFACTORY              
      _ BLOB                     
      _ HOMEBREW TAP FORMULA     
      _ SCOOP MANIFEST           
   _ SNAPSHOTING              
   _ CHECKING ./DIST          
      _ --rm-dist is set, cleaning it up
   _ WRITING EFFECTIVE CONFIG FILE
      _ writing                   config=dist/config.yaml
   _ GENERATING CHANGELOG     
      _ pipe skipped              error=not available for snapshots
   _ BUILDING BINARIES        
      _ building                  binary=/home/prasad/go-ws/src/github.com/kanisterio/kanister/dist/kanctl_linux_amd64/kanctl
      _ building                  binary=/home/prasad/go-ws/src/github.com/kanisterio/kanister/dist/kanctl_darwin_amd64/kanctl
      _ building                  binary=/home/prasad/go-ws/src/github.com/kanisterio/kanister/dist/kando_linux_amd64/kando
      _ building                  binary=/home/prasad/go-ws/src/github.com/kanisterio/kanister/dist/controller_linux_amd64/controller
   _ ARCHIVES                 
      _ creating                  archive=dist/kanister_0.43.0_darwin_amd64.tar.gz
      _ creating                  archive=dist/kanister_0.43.0_linux_amd64.tar.gz
   _ LINUX PACKAGES WITH NFPM 
   _ SNAPCRAFT PACKAGES       
   _ CALCULATING CHECKSUMS    
      _ checksumming              file=kanister_0.43.0_linux_amd64.tar.gz
      _ checksumming              file=kanister_0.43.0_darwin_amd64.tar.gz
   _ SIGNING ARTIFACTS        
      _ pipe skipped              error=artifact signing is disabled
   _ DOCKER IMAGES            
      _ building docker image     image=ghcr.io/kanisterio/kanister-kubectl:1.18
      _ building docker image     image=ghcr.io/kanisterio/foundationdb:6.2.20
      _ building docker image     image=ghcr.io/kanisterio/kanister-tools:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/mysql-sidecar:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/postgresql:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/postgres-kanister-tools:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/postgres-tools-9.6:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/mongodb:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/mongo-sidecar:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/controller:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/es-sidecar:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/cassandra:0.43.0
      _ building docker image     image=ghcr.io/kanisterio/couchbase-tools:0.43.0
      _ pipe skipped              error=publishing is disabled
   _ PUBLISHING               
      _ pipe skipped              error=publishing is disabled
   _ release succeeded after 368.15s

  • 💪 Manual
  • ⚡ Unit test
  • 💚 E2E

Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
Signed-off-by: Prasad Ghangal <prasad.ghangal@gmail.com>
dockerfile: 'docker/kanister-elasticsearch/image/Dockerfile'
build_flag_templates:
- "--build-arg=TOOLS_IMAGE=kanisterio/kanister-tools:{{ .Tag }}"
- "--build-arg=TOOLS_IMAGE=ghcr.io/kanisterio/kanister-tools:{{ .Tag }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we are releasing version x we wont get ghcr.io/kanisterio/kanister-tools:x already in the gcr right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be a problem

@mergify mergify bot merged commit 1f41fb4 into master Dec 10, 2020
@mergify mergify bot deleted the switch-to-ghcr branch December 10, 2020 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants