Skip to content

Commit 8e2090a

Browse files
authored
Merge pull request #162 from covexo/travis-cache
Travis cache
2 parents 982dad4 + b4ae7a2 commit 8e2090a

5 files changed

Lines changed: 79 additions & 50 deletions

File tree

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ jobs:
1212
- npm install -g codeclimate-test-reporter
1313
os: linux
1414
go: 1.10.3
15+
cache:
16+
directories:
17+
- ./vendor
18+
- $HOME/.cache/go-build
1519
script:
1620
- ./scripts/coverage.bash
1721
after_success:

Gopkg.lock

Lines changed: 24 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1+
[[constraint]]
2+
name = "github.com/covexo/yamlq"
3+
revision = "ee51b09a773c7e7e4e32168cbec4d47a014161b4"
4+
5+
[[constraint]]
6+
name = "github.com/imdario/mergo"
7+
version = "v0.3.6"
8+
19
[[constraint]]
210
name = "github.com/juju/errors"
3-
branch = "master"
11+
revision = "22422dad46e14561a0854ad42497a75af9b61909"
412

513
[[constraint]]
614
name = "github.com/docker/docker"
@@ -9,23 +17,23 @@
917

1018
[[constraint]]
1119
name = "github.com/rhysd/go-github-selfupdate"
12-
branch = "master"
20+
revision = "41c1bbb0804a2994dae69502a8c76e7c456ad45e"
1321

1422
[[constraint]]
1523
name = "github.com/sabhiram/go-gitignore"
16-
branch = "master"
24+
version = "1.0.2"
1725

1826
[[constraint]]
1927
name = "github.com/daviddengcn/go-colortext"
20-
branch = "master"
28+
revision = "186a3d44e9200d7eb331356ca4864f52708e1399"
2129

2230
[[constraint]]
23-
branch = "master"
2431
name = "github.com/mitchellh/go-homedir"
32+
version = "v1.0.0"
2533

2634
[[constraint]]
27-
branch = "master"
2835
name = "github.com/otiai10/copy"
36+
revision = "7e9a647135a142c2669943d4a4d29be015ce9392"
2937

3038
[[constraint]]
3139
name = "github.com/rjeczalik/notify"
@@ -53,7 +61,7 @@
5361

5462
[[constraint]]
5563
name = "k8s.io/helm"
56-
version = "~v2.9.0"
64+
version = "v2.9.1"
5765

5866
[[constraint]]
5967
name = "github.com/foomo/htpasswd"
@@ -73,23 +81,23 @@
7381

7482
[[override]]
7583
name = "k8s.io/kubernetes"
76-
branch = "release-1.10"
84+
revision = "ba92f7aebfda56086efd08a6b231c6b60a297d2d"
7785

7886
[[override]]
7987
name = "k8s.io/api"
80-
branch = "release-1.10"
88+
revision = "12444147eb1150aa5c80d2aae532cbc5b7be73d0"
8189

8290
[[override]]
8391
name = "k8s.io/apimachinery"
84-
branch = "release-1.10"
92+
revision = "e386b2658ed20923da8cc9250e552f082899a1ee"
8593

8694
[[override]]
8795
name = "k8s.io/apiserver"
88-
branch = "release-1.10"
96+
revision = "2a84596e9aad63b1c1d47491d506a64465b5e2fc"
8997

9098
[[override]]
9199
name = "k8s.io/apiextensions-apiserver"
92-
branch = "release-1.10"
100+
revision = "f584b16eb23bd2a3fd292a027d698d95db427c5d"
93101

94102
[[override]]
95103
name = "github.com/russross/blackfriday"
@@ -106,11 +114,3 @@
106114
[prune]
107115
go-tests = true
108116
unused-packages = true
109-
110-
[[constraint]]
111-
revision = "ee51b09a773c7e7e4e32168cbec4d47a014161b4"
112-
name = "github.com/covexo/yamlq"
113-
114-
[[constraint]]
115-
name = "github.com/imdario/mergo"
116-
version = "v0.3.6"

cmd/status_sync.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,19 @@ import (
66

77
// RunStatusSync executes the devspace status sync commad logic
88
func (cmd *StatusCmd) RunStatusSync(cobraCmd *cobra.Command, args []string) {
9-
//TODO
9+
// config := configutil.GetConfig(false)
10+
11+
// Read syncLog
12+
/*cwd, err := os.Getwd()
13+
if err != nil {
14+
log.Fatal(err)
15+
}
16+
17+
syncLogPath := path.Join(cwd, ".devspace", "logs", "syncLog.log")
18+
data, err := ioutil.ReadFile(syncLogPath)
19+
if err != nil {
20+
log.Fatalf("Couldn't read %s. Do you have a sync path configured?", syncLogPath)
21+
}
22+
23+
_ = strings.Split(string(data), "\n")*/
1024
}

pkg/devspace/sync/sync_config.go

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,32 @@ type SyncConfig struct {
5757
// Logf prints the given information to the synclog with context data
5858
func (s *SyncConfig) Logf(format string, args ...interface{}) {
5959
if s.silent == false {
60-
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Infof(format, args...)
60+
if s.Pod != nil {
61+
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Infof(format, args...)
62+
} else {
63+
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Infof(format, args...)
64+
}
6165
}
6266
}
6367

6468
// Logln prints the given information to the synclog with context data
6569
func (s *SyncConfig) Logln(line interface{}) {
6670
if s.silent == false {
67-
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Info(line)
71+
if s.Pod != nil {
72+
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Info(line)
73+
} else {
74+
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Info(line)
75+
}
6876
}
6977
}
7078

7179
// Error handles a sync error with context
7280
func (s *SyncConfig) Error(err error) {
73-
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).WithKey("excluded", s.ExcludePaths).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
81+
if s.Pod != nil {
82+
syncLog.WithKey("pod", s.Pod.Name).WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
83+
} else {
84+
syncLog.WithKey("local", s.WatchPath).WithKey("container", s.DestPath).Errorf("Error: %v, Stack: %v", err, errors.ErrorStack(err))
85+
}
7486

7587
if s.errorChan != nil {
7688
s.errorChan <- err
@@ -175,7 +187,7 @@ func (s *SyncConfig) initIgnoreParsers() error {
175187
}
176188

177189
func (s *SyncConfig) mainLoop() {
178-
s.Logf("[Sync] Start syncing\n")
190+
s.Logf("[Sync] Start syncing")
179191

180192
err := s.initialSync()
181193
if err != nil {

0 commit comments

Comments
 (0)