Skip to content

Commit 5c69850

Browse files
authored
Merge pull request #2 from merico-dev/rename-from-openstream-to-stream
Rename from openstream to stream
2 parents f24fd06 + 907e398 commit 5c69850

File tree

24 files changed

+126
-72
lines changed

24 files changed

+126
-72
lines changed

.github/workflows/master-builder.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/master-builder.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Master Builder
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
7+
jobs:
8+
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up Go
15+
uses: actions/setup-go@v2
16+
with:
17+
go-version: 1.17
18+
- name: Build
19+
run: make build
20+
- name: Test
21+
run: go test -v ./...

.github/workflows/pr-builder.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v2
13-
1413
- name: Set up Go
1514
uses: actions/setup-go@v2
1615
with:
1716
go-version: 1.17
18-
1917
- name: Build
20-
run: go build -v ./...
21-
18+
run: make build
2219
- name: Test
2320
run: go test -v ./...

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*.dylib
99

1010
# build
11-
/openstream
11+
/dtm
1212

1313
# Test binary, build with `go test -c`
1414
*.test

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Contributing to OpenStream
1+
# Contributing to DevStream
22

33
Thanks for contributing, and thanks for reading this doc before doing it!
44

5-
This is a set of guidelines for contributing to OpenStream. These are only guidelines, not rules. So, use your best judgment, and feel free to propose changes to this document.
5+
This is a set of guidelines for contributing to DevStream. These are only guidelines, not rules. So, use your best judgment, and feel free to propose changes to this document.
66

77
## How Can I Contribute?
88

@@ -14,7 +14,7 @@ If you are only fixing a bug, it’s OK to submit a PR without an issue. In this
1414

1515
## Maintainer Team at Merico
1616

17-
A group of engineers maintains OpenStream at Merico, led by [@ironcore864](https://github.com/ironcore864).
17+
A group of engineers maintains DevStream at Merico, led by [@ironcore864](https://github.com/ironcore864).
1818

1919
We aim to reply to issues within 24 hours.
2020

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ build:
33
go build -buildmode=plugin -trimpath -gcflags="all=-N -l" -o plugins/githubactions_0.0.1.so ./cmd/githubactions/
44
go build -buildmode=plugin -trimpath -gcflags="all=-N -l" -o plugins/argocd_0.0.1.so ./cmd/argocd/
55
go build -buildmode=plugin -trimpath -gcflags="all=-N -l" -o plugins/argocdapp_0.0.1.so ./cmd/argocdapp/
6-
go build -trimpath -gcflags="all=-N -l" -o openstream ./cmd/openstream/
6+
go build -trimpath -gcflags="all=-N -l" -o dtm ./cmd/devstream/

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
# DevStream
1+
<div align="center">
2+
<br/>
3+
<img src="https://user-images.githubusercontent.com/3789273/128085813-92845abd-7c26-4fa2-9f98-928ce2246616.png" width="120px">
4+
5+
<br/>
6+
7+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat&logo=github&color=2370ff&labelColor=454545)](http://makeapullrequest.com)
8+
[![Discord](https://img.shields.io/discord/844603288082186240.svg?style=flat?label=&logo=discord&logoColor=ffffff&color=747df7&labelColor=454545)](https://discord.gg/83rDG6ydVZ)
9+
![Test](https://github.com/merico-dev/stream/actions/workflows/master-builder.yaml/badge.svg)
10+
[![Go Report Card](https://goreportcard.com/badge/github.com/merico-dev/stream)](https://goreportcard.com/report/github.com/merico-dev/stream)
211

12+
# DevStream
13+
</div>
314
Open-source DevOps tool manager (DTM).
415

16+
<br/>
17+
18+
519
## Build
620

721
```bash
@@ -11,5 +25,5 @@ make
1125
## Run
1226

1327
```bash
14-
./openstream install -f examples/config.yaml
28+
./dtm install -f examples/config.yaml
1529
```

cmd/argocd/main.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,34 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/ironcore864/openstream/internal/pkg/argocd"
7+
"github.com/merico-dev/stream/internal/pkg/argocd"
88
)
99

10+
// NAME is the name of this DevStream plugin.
1011
const NAME = "argocd"
1112

13+
// Plugin is the type used by DevStream core. It's a string.
1214
type Plugin string
1315

16+
// Install implements the installation of ArgoCD.
1417
func (p Plugin) Install(options *map[string]interface{}) {
1518
argocd.Install(options)
1619
log.Println("argocd install finished")
1720
}
1821

22+
// Reinstall implements the reinstallation of ArgoCD.
1923
func (p Plugin) Reinstall(options *map[string]interface{}) {
2024
log.Println("mock: argocd reinstall finished")
2125
}
2226

27+
// Uninstall implements the uninstallation of ArgoCD.
2328
func (p Plugin) Uninstall(options *map[string]interface{}) {
2429
log.Println("mock: argocd uninstall finished")
2530
}
2631

27-
var OpenStreamPlugin Plugin
32+
// DevStreamPlugin is the exported variable used by the DevStream core.
33+
var DevStreamPlugin Plugin
2834

2935
func main() {
30-
fmt.Println("This is a plugin for OpenStream. Use it with OpenStream.")
36+
fmt.Println("This is a plugin for DevStream. Use it with DevStream.")
3137
}

cmd/argocdapp/main.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,34 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/ironcore864/openstream/internal/pkg/argocdapp"
7+
"github.com/merico-dev/stream/internal/pkg/argocdapp"
88
)
99

10+
// NAME is the name of this DevStream plugin.
1011
const NAME = "argocdapps"
1112

13+
// Plugin is the type used by DevStream core. It's a string.
1214
type Plugin string
1315

16+
// Install implements the installation of an ArgoCD app.
1417
func (p Plugin) Install(options *map[string]interface{}) {
1518
argocdapp.Install(options)
1619
log.Println("argocdapps install finished")
1720
}
1821

22+
// Reinstall implements the installation of an ArgoCD app.
1923
func (p Plugin) Reinstall(options *map[string]interface{}) {
2024
log.Println("mock: argocdapps reinstall finished")
2125
}
2226

27+
// Uninstall Uninstall the installation of an ArgoCD app.
2328
func (p Plugin) Uninstall(options *map[string]interface{}) {
2429
log.Println("mock: argocdapps uninstall finished")
2530
}
2631

27-
var OpenStreamPlugin Plugin
32+
// DevStreamPlugin is the exported variable used by the DevStream core.
33+
var DevStreamPlugin Plugin
2834

2935
func main() {
30-
fmt.Println("This is a plugin for OpenStream. Use it with OpenStream.")
36+
fmt.Println("This is a plugin for DevStream. Use it with DevStream.")
3137
}

cmd/openstream/install.go renamed to cmd/devstream/install.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package main
33
import (
44
"log"
55

6-
"github.com/ironcore864/openstream/internal/pkg/config"
7-
"github.com/ironcore864/openstream/internal/pkg/plugin"
6+
"github.com/merico-dev/stream/internal/pkg/config"
7+
"github.com/merico-dev/stream/internal/pkg/plugin"
88
"github.com/spf13/cobra"
99
)
1010

cmd/openstream/main.go renamed to cmd/devstream/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ var (
88
configFile string
99

1010
rootCMD = &cobra.Command{
11-
Use: "openstream",
12-
Short: "openstream is an open source DevOps tool manager",
13-
Long: `openstream is an open source DevOps tool manager`,
11+
Use: "dtm",
12+
Short: "DevStream is an open-source DevOps tool manager",
13+
Long: `DevStream is an open-source DevOps tool manager`,
1414
}
1515
)
1616

17+
// Execute runs the rootCMD's Execute func.
1718
func Execute() error {
1819
return rootCMD.Execute()
1920
}

cmd/openstream/version.go renamed to cmd/devstream/version.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import (
55

66
"github.com/spf13/cobra"
77

8-
"github.com/ironcore864/openstream/internal/pkg/version"
8+
"github.com/merico-dev/stream/internal/pkg/version"
99
)
1010

1111
var versionCMD = &cobra.Command{
1212
Use: "version",
13-
Short: "Print the version number of openstream",
14-
Long: `All software has versions. This is openstream's`,
13+
Short: "Print the version number of DevStream",
14+
Long: `All software has versions. This is DevStream's`,
1515
Run: versionCMDFunc,
1616
}
1717

cmd/githubactions/main.go

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,34 @@ import (
44
"fmt"
55
"log"
66

7-
"github.com/ironcore864/openstream/internal/pkg/githubactions"
7+
"github.com/merico-dev/stream/internal/pkg/githubactions"
88
)
99

10+
// NAME is the name of this DevStream plugin.
1011
const NAME = "githubactions"
1112

13+
// Plugin is the type used by DevStream core. It's a string.
1214
type Plugin string
1315

16+
// Install implements the installation of some GitHub Actions workflows.
1417
func (p Plugin) Install(options *map[string]interface{}) {
1518
githubactions.Install(options)
1619
log.Println("github actions install finished")
1720
}
1821

22+
// Reinstall implements the installation of some GitHub Actions workflows.
1923
func (p Plugin) Reinstall(options *map[string]interface{}) {
2024
log.Println("mock: github actions reinstall finished")
2125
}
2226

27+
// Uninstall implements the installation of some GitHub Actions workflows.
2328
func (p Plugin) Uninstall(options *map[string]interface{}) {
2429
log.Println("mock: github actions uninstall finished")
2530
}
2631

27-
var OpenStreamPlugin Plugin
32+
// DevStreamPlugin is the exported variable used by the DevStream core.
33+
var DevStreamPlugin Plugin
2834

2935
func main() {
30-
fmt.Println("This is a plugin for OpenStream. Use it with OpenStream.")
36+
fmt.Println("This is a plugin for DevStream. Use it with DevStream.")
3137
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/ironcore864/openstream
1+
module github.com/merico-dev/stream
22

33
go 1.17
44

internal/pkg/argocd/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/mitchellh/mapstructure"
77
)
88

9+
// Install installs ArgoCD with provided options.
910
func Install(options *map[string]interface{}) {
1011
var param Param
1112
err := mapstructure.Decode(*options, &param)

internal/pkg/argocd/params.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
package argocd
22

3+
// Param is the struct for parameters used by the argocd package.
34
type Param struct {
45
Repo Repo
56
Chart Chart
67
}
78

9+
// Repo is the struct containing details of a git repository.
810
type Repo struct {
911
Name string
1012
URL string
1113
}
1214

15+
// Chart is the struct containing details of a helm chart.
1316
type Chart struct {
1417
Name string
1518
ReleaseName string `mapstructure:"release_name"`

internal/pkg/argocdapp/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"github.com/mitchellh/mapstructure"
77
)
88

9+
// Install creates an ArgoCD app yaml and apply it.
910
func Install(options *map[string]interface{}) {
1011
var param Param
1112
err := mapstructure.Decode(*options, &param)

internal/pkg/argocdapp/params.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
11
package argocdapp
22

3+
// Param is the struct for parameters used by the argocdapp package.
34
type Param struct {
45
App App
56
Destination Destination
67
Source Source
78
}
89

10+
// App is the struct for an ArgoCD app.
911
type App struct {
1012
Name string
1113
Namespace string
1214
}
1315

16+
// Destination is the struct for the destination of an ArgoCD app.
1417
type Destination struct {
1518
Server string
1619
Namespace string
1720
}
1821

22+
// Source is the struct for the source of an ArgoCD app.
1923
type Source struct {
2024
Valuefile string
2125
Path string

internal/pkg/config/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,19 @@ import (
77
"gopkg.in/yaml.v3"
88
)
99

10+
// Config is the struct for loading DevStream configuration YAML files.
1011
type Config struct {
1112
Tools []Tool `yaml:"tools"`
1213
}
1314

15+
// Tool is the struct for one section of the DevStream configuration file.
1416
type Tool struct {
1517
Name string `yaml:"name"`
1618
Version string `yaml:"version"`
1719
Options map[string]interface{} `yaml:"options"`
1820
}
1921

22+
// LoadConf reads an input file as a Config struct.
2023
func LoadConf(fname string) *Config {
2124
f, err := ioutil.ReadFile(fname)
2225
if err != nil {

0 commit comments

Comments
 (0)