Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ jobs:
- npm install -g codeclimate-test-reporter
os: linux
go: 1.10.3
cache:
directories:
- ./vendor
- $HOME/.cache/go-build
script:
- ./scripts/coverage.bash
after_success:
Expand Down
49 changes: 24 additions & 25 deletions Gopkg.lock

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

40 changes: 20 additions & 20 deletions Gopkg.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
[[constraint]]
name = "github.com/covexo/yamlq"
revision = "ee51b09a773c7e7e4e32168cbec4d47a014161b4"

[[constraint]]
name = "github.com/imdario/mergo"
version = "v0.3.6"

[[constraint]]
name = "github.com/juju/errors"
branch = "master"
revision = "22422dad46e14561a0854ad42497a75af9b61909"

[[constraint]]
name = "github.com/docker/docker"
Expand All @@ -9,23 +17,23 @@

[[constraint]]
name = "github.com/rhysd/go-github-selfupdate"
branch = "master"
revision = "41c1bbb0804a2994dae69502a8c76e7c456ad45e"

[[constraint]]
name = "github.com/sabhiram/go-gitignore"
branch = "master"
version = "1.0.2"

[[constraint]]
name = "github.com/daviddengcn/go-colortext"
branch = "master"
revision = "186a3d44e9200d7eb331356ca4864f52708e1399"

[[constraint]]
branch = "master"
name = "github.com/mitchellh/go-homedir"
version = "v1.0.0"

[[constraint]]
branch = "master"
name = "github.com/otiai10/copy"
revision = "7e9a647135a142c2669943d4a4d29be015ce9392"

[[constraint]]
name = "github.com/rjeczalik/notify"
Expand Down Expand Up @@ -53,7 +61,7 @@

[[constraint]]
name = "k8s.io/helm"
version = "~v2.9.0"
version = "v2.9.1"

[[constraint]]
name = "github.com/foomo/htpasswd"
Expand All @@ -73,23 +81,23 @@

[[override]]
name = "k8s.io/kubernetes"
branch = "release-1.10"
revision = "ba92f7aebfda56086efd08a6b231c6b60a297d2d"

[[override]]
name = "k8s.io/api"
branch = "release-1.10"
revision = "12444147eb1150aa5c80d2aae532cbc5b7be73d0"

[[override]]
name = "k8s.io/apimachinery"
branch = "release-1.10"
revision = "e386b2658ed20923da8cc9250e552f082899a1ee"

[[override]]
name = "k8s.io/apiserver"
branch = "release-1.10"
revision = "2a84596e9aad63b1c1d47491d506a64465b5e2fc"

[[override]]
name = "k8s.io/apiextensions-apiserver"
branch = "release-1.10"
revision = "f584b16eb23bd2a3fd292a027d698d95db427c5d"

[[override]]
name = "github.com/russross/blackfriday"
Expand All @@ -106,11 +114,3 @@
[prune]
go-tests = true
unused-packages = true

[[constraint]]
revision = "ee51b09a773c7e7e4e32168cbec4d47a014161b4"
name = "github.com/covexo/yamlq"

[[constraint]]
name = "github.com/imdario/mergo"
version = "v0.3.6"
16 changes: 15 additions & 1 deletion cmd/status_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,19 @@ import (

// RunStatusSync executes the devspace status sync commad logic
func (cmd *StatusCmd) RunStatusSync(cobraCmd *cobra.Command, args []string) {
//TODO
// config := configutil.GetConfig(false)

// Read syncLog
/*cwd, err := os.Getwd()
if err != nil {
log.Fatal(err)
}

syncLogPath := path.Join(cwd, ".devspace", "logs", "syncLog.log")
data, err := ioutil.ReadFile(syncLogPath)
if err != nil {
log.Fatalf("Couldn't read %s. Do you have a sync path configured?", syncLogPath)
}

_ = strings.Split(string(data), "\n")*/
}
20 changes: 16 additions & 4 deletions pkg/devspace/sync/sync_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,32 @@ type SyncConfig struct {
// Logf prints the given information to the synclog with context data
func (s *SyncConfig) Logf(format string, args ...interface{}) {
if s.silent == false {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Infof(format, args...)
if s.Pod != nil {
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Infof(format, args...)
} else {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Infof(format, args...)
}
}
}

// Logln prints the given information to the synclog with context data
func (s *SyncConfig) Logln(line interface{}) {
if s.silent == false {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Info(line)
if s.Pod != nil {
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Info(line)
} else {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Info(line)
}
}
}

// Error handles a sync error with context
func (s *SyncConfig) Error(err error) {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
if s.Pod != nil {
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
} else {
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
}

if s.errorChan != nil {
s.errorChan <- err
Expand Down Expand Up @@ -175,7 +187,7 @@ func (s *SyncConfig) initIgnoreParsers() error {
}

func (s *SyncConfig) mainLoop() {
s.Logf("[Sync] Start syncing\n")
s.Logf("[Sync] Start syncing")

err := s.initialSync()
if err != nil {
Expand Down