Skip to content

Commit

Permalink
Rename from paulczar/charthub to helm/chart-releaser (helm#6)
Browse files Browse the repository at this point in the history
fixes helm#5

Signed-off-by: Scott Rigby <scott@r6by.com>
  • Loading branch information
scottrigby committed Feb 7, 2019
1 parent c66ddd1 commit 0bdb93a
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
charthub
chart-releaser
.idea
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# ChartHub turns github repositories into Helm Chart Repositories
# Chart Releaser turns github repositories into Helm Chart Repositories

Charthub is a tool designed to help github repos self-host their own chart repos by adding Helm Chart artifacts to github releases named for the chart version and then creating an `index.yaml` find for those releases that can be hosted in github pages (or elsewhere!).
Chart Releaser is a tool designed to help github repos self-host their own chart repos by adding Helm Chart artifacts to github releases named for the chart version and then creating an `index.yaml` find for those releases that can be hosted in github pages (or elsewhere!).

The examples below were used to create the `demo` chart found at [paulczar/helm-demo](https://github.com/paulczar/helm-demo) which has github pages configured to serve the `docs` directory of the `master` branch.

## Usage

```bash
$ go install github.com/paulczar/charthub
$ charthub
charthub creates helm chart repositories on github pages by uploading Chart packages
$ go install github.com/helm/chart-releaser
$ chart-releaser
chart-releaser creates helm chart repositories on github pages by uploading Chart packages
and Chart metadata to github releases and creating a suitable index file.

Usage:
charthub [command]
chart-releaser [command]

Available Commands:
help Help about any command
index creates helm repo index.yaml for given github repo
upload Uploads Helm Chart packages to github releases

Flags:
--config string config file (default is $HOME/.charthub.yaml)
-h, --help help for charthub
--config string config file (default is $HOME/.chart-releaser.yaml)
-h, --help help for chart-releaser
-t, --toggle Help message for toggle

Use "charthub [command] --help" for more information about a command.
Use "chart-releaser [command] --help" for more information about a command.
```

### Upload Helm Chart Packages

Scans a path for Helm Chart Package and creates a release in the specified github repo then uploads the package and Chart.yaml

```bash
./charthub upload -o paulczar -r helm-demo -t $TOKEN -p ~/development/scratch/helm/demo/ --recursive
./chart-releaser upload -o paulczar -r helm-demo -t $TOKEN -p ~/development/scratch/helm/demo/ --recursive
--> Processing package demo-0.1.0.tgz
release "0.1.0"====> Release 0.1.0 already exists
====> Release 0.1.0 already contains package demo-0.1.0.tgz
Expand All @@ -51,7 +51,7 @@ release "0.1.10"====> Release 0.1.10 already exists
Once uploaded you can create an `index.yaml` file that can be hosted in github pages (or elsewhere).

```bash
./charthub index -o paulczar -r helm-demo -t $TOKEN -p ~/development/scratch/helm/demo/docs/index.yaml
./chart-releaser index -o paulczar -r helm-demo -t $TOKEN -p ~/development/scratch/helm/demo/docs/index.yaml
====> Using existing index at /home/pczarkowski/development/scratch/helm/demo/docs/index.yaml
--> Checking for releases with helm chart packages
====> Found demo-0.1.0.tgz
Expand Down
4 changes: 2 additions & 2 deletions cmd/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package cmd

import (
"github.com/paulczar/charthub/pkg/config"
"github.com/paulczar/charthub/pkg/index"
"github.com/helm/chart-releaser/pkg/config"
"github.com/helm/chart-releaser/pkg/index"
"github.com/spf13/cobra"
)

Expand Down
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ var cfgFile string

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "charthub",
Use: "chart-releaser",
Short: "Helm Chart Repos on Github Pages",
Long: `
charthub creates helm chart repositories on github pages by uploading Chart packages
chart-releaser creates helm chart repositories on github pages by uploading Chart packages
and Chart metadata to github releases and creating a suitable index file.
`}
Expand All @@ -46,5 +46,5 @@ func init() {
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.charthub.yaml)")
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.chart-releaser.yaml)")
}
4 changes: 2 additions & 2 deletions cmd/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package cmd

import (
"github.com/paulczar/charthub/pkg/config"
"github.com/paulczar/charthub/pkg/upload"
"github.com/helm/chart-releaser/pkg/config"
"github.com/helm/chart-releaser/pkg/upload"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

package main

import "github.com/paulczar/charthub/cmd"
import "github.com/helm/chart-releaser/cmd"

func main() {
cmd.Execute()
Expand Down
5 changes: 2 additions & 3 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ func LoadConfiguration(cfgFile string, cmd *cobra.Command, requiredFlags []strin
os.Exit(1)
}

// Search config in home directory with name ".charthub" (without extension).
// Search config in home directory with name ".chart-releaser" (without extension).
viper.AddConfigPath(home)
viper.SetConfigName(".charthub")
viper.SetConfigName(".chart-releaser")
}

if err := v.ReadInConfig(); err != nil {
Expand Down Expand Up @@ -93,4 +93,3 @@ func LoadConfiguration(cfgFile string, cmd *cobra.Command, requiredFlags []strin

return opts, nil
}

6 changes: 3 additions & 3 deletions pkg/index/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package index
import (
"context"
"fmt"
"github.com/paulczar/charthub/pkg/config"
"github.com/helm/chart-releaser/pkg/config"
"io"
"io/ioutil"
"log"
Expand All @@ -13,7 +13,7 @@ import (
"path/filepath"
"strings"

"github.com/paulczar/charthub/pkg/github"
"github.com/helm/chart-releaser/pkg/github"
"k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/provenance"
"k8s.io/helm/pkg/repo"
Expand Down Expand Up @@ -96,7 +96,7 @@ func Create(config *config.Options) error {

func addToIndexFile(indexFile *repo.IndexFile, url string) {
// fetch package to temp url so we can extract metadata and stuff
dir, err := ioutil.TempDir("", "charthub")
dir, err := ioutil.TempDir("", "chart-releaser")
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/upload/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package upload
import (
"context"
"fmt"
"github.com/paulczar/charthub/pkg/config"
"github.com/helm/chart-releaser/pkg/config"
"io/ioutil"
"log"
"os"
Expand All @@ -12,7 +12,7 @@ import (

"github.com/ghodss/yaml"
gh "github.com/google/go-github/github"
"github.com/paulczar/charthub/pkg/github"
"github.com/helm/chart-releaser/pkg/github"
"github.com/pkg/errors"
"k8s.io/helm/pkg/chartutil"
"k8s.io/helm/pkg/proto/hapi/chart"
Expand Down

0 comments on commit 0bdb93a

Please # to comment.