Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/master' into kubectl-deploy-to-e…
Browse files Browse the repository at this point in the history
…ks-in-a-box
  • Loading branch information
laverya committed Aug 7, 2018
2 parents 7439600 + 218776e commit 1e53ae5
Show file tree
Hide file tree
Showing 117 changed files with 6,079 additions and 801 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ jobs:
steps:
- checkout
- run: mkdir -p web/dist
- run: make build-deps citest ci-upload-coverage

- run: |
make build-deps citest
if [ "${CIRCLE_PROJECT_USERNAME}" == "replicatedhq" ]; then
make ci-upload-coverage
fi
build_ui:
docker:
- image: circleci/node:9
Expand Down Expand Up @@ -96,7 +99,7 @@ jobs:
- run: make build-deps embed-ui
- run: docker pull alpine:latest # make sure it's fresh
- deploy:
command: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --config .goreleaser.unstable.yml
command: curl -sL https://git.io/goreleaser | bash -s -- --snapshot --config deploy/.goreleaser.unstable.yml
- run: docker login -u="$DOCKERHUB_DOCKER_USER" -p="$DOCKERHUB_DOCKER_PASS"
- deploy:
command: docker push replicated/ship:unstable
Expand Down Expand Up @@ -126,7 +129,7 @@ jobs:
- run: docker pull alpine:latest # make sure it's fresh
- run: docker login -u="$DOCKERHUB_DOCKER_USER" -p="$DOCKERHUB_DOCKER_PASS"
- deploy:
command: curl -sL https://git.io/goreleaser | bash
command: curl -sL https://git.io/goreleaser | bash -s -- --config deploy/.goreleaser.yml
# todo drop a release-api message to bump a version in the DB

workflows:
Expand Down
14 changes: 0 additions & 14 deletions BUILD.mill

This file was deleted.

24 changes: 21 additions & 3 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@
name = "github.com/spf13/viper"
version = "1.0.0"

[[constraint]]
name = "github.com/mholt/archiver"
revision = "e4ef56d48eb029648b0e895bb0b6a393ef0829c3"

[[constraint]]
name = "github.com/docker/docker"
revision = "4047cede65862aa0ea5616297d7c0f3b12526ad4"
Expand Down
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ _mockgen:
mkdir -p pkg/test-mocks/ui
mkdir -p pkg/test-mocks/config
mkdir -p pkg/test-mocks/planner
mkdir -p pkg/test-mocks/lifecycle
mkdir -p pkg/test-mocks/images/saver
mkdir -p pkg/test-mocks/docker
mkdir -p pkg/test-mocks/helm
Expand All @@ -61,7 +62,7 @@ _mockgen:
mockgen \
-destination pkg/test-mocks/daemon/daemon.go \
-package daemon \
github.com/replicatedhq/ship/pkg/lifecycle/daemon \
github.com/replicatedhq/ship/pkg/lifecycle/daemon/daemontypes \
Daemon
mockgen \
-destination pkg/test-mocks/planner/planner_mock.go \
Expand Down Expand Up @@ -128,6 +129,11 @@ _mockgen:
-package state \
github.com/replicatedhq/ship/pkg/state \
Manager
mockgen \
-destination pkg/test-mocks/lifecycle/messenger_mock.go \
-package lifecycle \
github.com/replicatedhq/ship/pkg/lifecycle \
Messenger

mockgen: _mockgen fmt

Expand Down Expand Up @@ -194,13 +200,13 @@ integration-test-kustomize:

goreleaser: .state/goreleaser

.state/goreleaser: .goreleaser.unstable.yml deploy/Dockerfile $(SRC)
.state/goreleaser: deploy/.goreleaser.unstable.yml deploy/Dockerfile $(SRC)
@mkdir -p .state
curl -sL https://git.io/goreleaser | bash -s -- --snapshot --rm-dist --config .goreleaser.unstable.yml
curl -sL https://git.io/goreleaser | bash -s -- --snapshot --rm-dist --config deploy/.goreleaser.unstable.yml
@touch .state/goreleaser

run: bin/ship
./bin/ship app --log-level=debug --runbook=./app.yml
./bin/ship app --log-level=debug --runbook=./fixtures/app.yml

# this should really be in a different repo
build_yoonit_docker_image:
Expand Down
60 changes: 0 additions & 60 deletions app.hcl

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions integration/update/basic/expected/base/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- deployment.yaml
- service.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bases:
- ../../base
patches:
- /templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
resources:
- deployment.yaml
- service.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bases:
- ../../base
patches:
- /templates/deployment.yaml
6 changes: 0 additions & 6 deletions notes.mill

This file was deleted.

1 change: 1 addition & 0 deletions pkg/api/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type HelmChartMetadata struct {
Name string `json:"name" yaml:"name" hcl:"name" meta:"name"`
Readme string `json:"readme" yaml:"readme" hcl:"readme" meta:"readme"`
URL string `json:"url" yaml:"url" hcl:"url" meta:"url"`
ContentSHA string `json:"contentSHA" yaml:"contentSHA" hcl:"contentSHA" meta:"contentSHA"`
}

// ReleaseMetadata
Expand Down
1 change: 1 addition & 0 deletions pkg/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func RootCmd() *cobra.Command {
cmd.PersistentFlags().String("state-file", "", "path to the state file to read from, defaults to .ship/state.json")

cmd.AddCommand(Init())
cmd.AddCommand(Watch())
cmd.AddCommand(Update())
cmd.AddCommand(App())
cmd.AddCommand(Version())
Expand Down
33 changes: 33 additions & 0 deletions pkg/cli/watch.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package cli

import (
"context"

_ "github.com/kubernetes-sigs/kustomize/pkg/app"
_ "github.com/kubernetes-sigs/kustomize/pkg/fs"
_ "github.com/kubernetes-sigs/kustomize/pkg/loader"
_ "github.com/kubernetes-sigs/kustomize/pkg/resmap"
"github.com/replicatedhq/ship/pkg/ship"
"github.com/spf13/cobra"
)

func Watch() *cobra.Command {
cmd := &cobra.Command{
Use: "watch",
Short: "Watch an upstream for updates",
Long: `Watch will poll the upstream source for changes, and block until a
change has been published. The watch command will return with an exit code
of 0 when there's an update available.`,
RunE: func(cmd *cobra.Command, args []string) error {
s, err := ship.Get()
if err != nil {
return err
}

s.WatchAndExit(context.Background())
return nil
},
}

return cmd
}
9 changes: 5 additions & 4 deletions pkg/filetree/api.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package filetree

type Node struct {
Children []Node `json:"children" yaml:"children"`
Name string `json:"name" yaml:"name"`
Path string `json:"path" yaml:"path"`
HasOverlay bool `json:"hasOverlay,omitempty" yaml:"hasOverlay,omitempty"`
Children []Node `json:"children" yaml:"children"`
Name string `json:"name" yaml:"name"`
Path string `json:"path" yaml:"path"`
HasOverlay bool `json:"hasOverlay" yaml:"hasOverlay"`
IsSupported bool `json:"isSupported" yaml:"isSupported"`
}
Loading

0 comments on commit 1e53ae5

Please sign in to comment.