Added sirupsen and updated all occurances

Updated `sirupsen`, `docker/cli`, `docker/libcompose` in `glide`,
Also changed `Sirupsen` with `sirupsen` in all kompose packages as well as in
`docker/distribution` packages
This commit is contained in:
Suraj Narwade 2017-11-27 12:28:46 +05:30
parent d02492ad59
commit 5de4aa85f8
20 changed files with 35 additions and 34 deletions

View File

@ -6,7 +6,7 @@ import (
"io" "io"
"os" "os"
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -19,9 +19,9 @@ package cmd
import ( import (
"strings" "strings"
log "github.com/Sirupsen/logrus"
"github.com/kubernetes/kompose/pkg/app" "github.com/kubernetes/kompose/pkg/app"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/spf13/viper" "github.com/spf13/viper"
) )

View File

@ -21,7 +21,7 @@ import (
"os" "os"
"strings" "strings"
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -17,7 +17,7 @@ limitations under the License.
package cmd package cmd
import ( import (
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/kubernetes/kompose/pkg/app" "github.com/kubernetes/kompose/pkg/app"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"

View File

@ -7,11 +7,6 @@ import:
- package: github.com/sirupsen/logrus - package: github.com/sirupsen/logrus
version: 1.0.3 version: 1.0.3
- package: github.com/Sirupsen/logrus
repo: git@github.com:/sirupsen/logrus
vcs: git
version: 1.0.3
- package: github.com/xeipuuv/gojsonschema - package: github.com/xeipuuv/gojsonschema
version: 93e72a773fade158921402d6a24c819b48aba29d version: 93e72a773fade158921402d6a24c819b48aba29d
@ -24,7 +19,7 @@ import:
# We use libcompose to parse v1 and v2 of Docker Compose # We use libcompose to parse v1 and v2 of Docker Compose
- package: github.com/docker/libcompose - package: github.com/docker/libcompose
version: 4a647d664afbe05c41455c9d534d8239671eb46a version: 57bd716502dcbe1799f026148016022b0f3b989c
subpackages: subpackages:
- config - config
- lookup - lookup
@ -32,7 +27,7 @@ import:
# We use docker/cli to parse v3 of Docker Compose # We use docker/cli to parse v3 of Docker Compose
- package: github.com/docker/cli - package: github.com/docker/cli
version: 9bdb0763b9e667dc01adf36ba98a2b7bd47bdc75 version: 9b7656cc05d2878c85dc1252f5813f0ad77d808f
# Docker parser library for image names # Docker parser library for image names
- package: github.com/novln/docker-parser - package: github.com/novln/docker-parser

View File

@ -19,7 +19,7 @@ package app
import ( import (
"strings" "strings"
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/spf13/cobra" "github.com/spf13/cobra"
// install kubernetes api // install kubernetes api

View File

@ -26,10 +26,10 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
log "github.com/Sirupsen/logrus"
"github.com/fatih/structs" "github.com/fatih/structs"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
) )
// Bundle is docker bundle file loader, implements Loader interface // Bundle is docker bundle file loader, implements Loader interface

View File

@ -24,11 +24,11 @@ import (
yaml "gopkg.in/yaml.v2" yaml "gopkg.in/yaml.v2"
log "github.com/Sirupsen/logrus"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/fatih/structs" "github.com/fatih/structs"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
) )
// Compose is docker compose file loader, implements Loader interface // Compose is docker compose file loader, implements Loader interface

View File

@ -25,6 +25,8 @@ import (
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"time"
"github.com/docker/cli/cli/compose/types" "github.com/docker/cli/cli/compose/types"
"github.com/docker/libcompose/config" "github.com/docker/libcompose/config"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
@ -32,14 +34,18 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
) )
func durationPtr(value time.Duration) *time.Duration {
return &value
}
func TestParseHealthCheck(t *testing.T) { func TestParseHealthCheck(t *testing.T) {
helperValue := uint64(2) helperValue := uint64(2)
check := types.HealthCheckConfig{ check := types.HealthCheckConfig{
Test: []string{"CMD-SHELL", "echo", "foobar"}, Test: []string{"CMD-SHELL", "echo", "foobar"},
Timeout: "1s", Timeout: durationPtr(1 * time.Second),
Interval: "2s", Interval: durationPtr(2 * time.Second),
Retries: &helperValue, Retries: &helperValue,
StartPeriod: "3s", StartPeriod: durationPtr(3 * time.Second),
} }
// CMD-SHELL or SHELL is included Test within docker/cli, thus we remove the first value in Test // CMD-SHELL or SHELL is included Test within docker/cli, thus we remove the first value in Test

View File

@ -26,13 +26,13 @@ import (
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
log "github.com/Sirupsen/logrus"
"github.com/docker/libcompose/config" "github.com/docker/libcompose/config"
"github.com/docker/libcompose/lookup" "github.com/docker/libcompose/lookup"
"github.com/docker/libcompose/project" "github.com/docker/libcompose/project"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer" "github.com/kubernetes/kompose/pkg/transformer"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
) )
// Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will // Parse Docker Compose with libcompose (only supports v1 and v2). Eventually we will

View File

@ -31,9 +31,9 @@ import (
"os" "os"
log "github.com/Sirupsen/logrus"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
) )
// converts os.Environ() ([]string) to map[string]string // converts os.Environ() ([]string) to map[string]string
@ -171,16 +171,16 @@ func parseHealthCheck(composeHealthCheck types.HealthCheckConfig) (kobject.Healt
var timeout, interval, retries, startPeriod int32 var timeout, interval, retries, startPeriod int32
// Here we convert the timeout from 1h30s (example) to 36030 seconds. // Here we convert the timeout from 1h30s (example) to 36030 seconds.
if composeHealthCheck.Timeout != "" { if composeHealthCheck.Timeout != nil {
parse, err := time.ParseDuration(composeHealthCheck.Timeout) parse, err := time.ParseDuration(composeHealthCheck.Timeout.String())
if err != nil { if err != nil {
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check timeout variable") return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check timeout variable")
} }
timeout = int32(parse.Seconds()) timeout = int32(parse.Seconds())
} }
if composeHealthCheck.Interval != "" { if composeHealthCheck.Interval != nil {
parse, err := time.ParseDuration(composeHealthCheck.Interval) parse, err := time.ParseDuration(composeHealthCheck.Interval.String())
if err != nil { if err != nil {
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check interval variable") return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check interval variable")
} }
@ -191,8 +191,8 @@ func parseHealthCheck(composeHealthCheck types.HealthCheckConfig) (kobject.Healt
retries = int32(*composeHealthCheck.Retries) retries = int32(*composeHealthCheck.Retries)
} }
if composeHealthCheck.StartPeriod != "" { if composeHealthCheck.StartPeriod != nil {
parse, err := time.ParseDuration(composeHealthCheck.StartPeriod) parse, err := time.ParseDuration(composeHealthCheck.StartPeriod.String())
if err != nil { if err != nil {
return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check startPeriod variable") return kobject.HealthCheck{}, errors.Wrap(err, "unable to parse health check startPeriod variable")
} }

View File

@ -30,11 +30,11 @@ import (
"text/template" "text/template"
"time" "time"
log "github.com/Sirupsen/logrus"
"github.com/ghodss/yaml" "github.com/ghodss/yaml"
"github.com/joho/godotenv" "github.com/joho/godotenv"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer" "github.com/kubernetes/kompose/pkg/transformer"
log "github.com/sirupsen/logrus"
"k8s.io/kubernetes/pkg/api" "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/unversioned"

View File

@ -22,12 +22,12 @@ import (
"strconv" "strconv"
"time" "time"
log "github.com/Sirupsen/logrus"
"github.com/fatih/structs" "github.com/fatih/structs"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer" "github.com/kubernetes/kompose/pkg/transformer"
buildapi "github.com/openshift/origin/pkg/build/api" buildapi "github.com/openshift/origin/pkg/build/api"
deployapi "github.com/openshift/origin/pkg/deploy/api" deployapi "github.com/openshift/origin/pkg/deploy/api"
log "github.com/sirupsen/logrus"
// install kubernetes api // install kubernetes api
_ "k8s.io/kubernetes/pkg/api/install" _ "k8s.io/kubernetes/pkg/api/install"

View File

@ -23,7 +23,7 @@ import (
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
"github.com/kubernetes/kompose/pkg/transformer/kubernetes" "github.com/kubernetes/kompose/pkg/transformer/kubernetes"
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
kapi "k8s.io/kubernetes/pkg/api" kapi "k8s.io/kubernetes/pkg/api"
"k8s.io/kubernetes/pkg/api/unversioned" "k8s.io/kubernetes/pkg/api/unversioned"

View File

@ -24,8 +24,8 @@ import (
"path" "path"
"strings" "strings"
log "github.com/Sirupsen/logrus"
"github.com/kubernetes/kompose/pkg/kobject" "github.com/kubernetes/kompose/pkg/kobject"
log "github.com/sirupsen/logrus"
"path/filepath" "path/filepath"

View File

@ -18,10 +18,10 @@ package docker
import ( import (
"bytes" "bytes"
log "github.com/Sirupsen/logrus"
dockerlib "github.com/fsouza/go-dockerclient" dockerlib "github.com/fsouza/go-dockerclient"
"github.com/kubernetes/kompose/pkg/utils/archive" "github.com/kubernetes/kompose/pkg/utils/archive"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
"io/ioutil" "io/ioutil"
"os" "os"
"path" "path"

View File

@ -18,10 +18,10 @@ package docker
import ( import (
"bytes" "bytes"
log "github.com/Sirupsen/logrus"
dockerlib "github.com/fsouza/go-dockerclient" dockerlib "github.com/fsouza/go-dockerclient"
"github.com/novln/docker-parser" "github.com/novln/docker-parser"
"github.com/pkg/errors" "github.com/pkg/errors"
log "github.com/sirupsen/logrus"
) )
// Push will provide methods for interaction with API regarding pushing images // Push will provide methods for interaction with API regarding pushing images

View File

@ -8,7 +8,7 @@ import (
"sync" "sync"
"time" "time"
log "github.com/Sirupsen/logrus" log "github.com/sirupsen/logrus"
"github.com/docker/distribution/uuid" "github.com/docker/distribution/uuid"
"github.com/gorilla/mux" "github.com/gorilla/mux"
) )

View File

@ -3,7 +3,7 @@ package context
import ( import (
"fmt" "fmt"
"github.com/Sirupsen/logrus" "github.com/sirupsen/logrus"
"runtime" "runtime"
) )

View File

@ -3,7 +3,7 @@ package schema1
import ( import (
"crypto/x509" "crypto/x509"
"github.com/Sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/docker/libtrust" "github.com/docker/libtrust"
) )