diff --git a/glide.lock b/glide.lock index a5d50fb0aa06..93d4795d4148 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 1511c1c08d724d5b2f6c586490bfa154f305c5b0038fb2a4bf3c0404aabc72a6 -updated: 2018-06-24T03:58:28.501190286-04:00 +hash: f6c313daf71c664707bed1f649639897c0690fd47c45615bed5abf7c4971e086 +updated: 2018-07-09T09:13:12.866398637-04:00 imports: - name: bitbucket.org/ww/goautoneg version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 @@ -656,7 +656,6 @@ imports: version: e47cf1f2e83a02443d7115c54f838be8ee959644 subpackages: - client - - client/v2 - models - pkg/escape - name: github.com/JeffAshton/win_pdh @@ -770,8 +769,6 @@ imports: version: d59fa0ac68bb5dd932ee8d24eed631cdd519efc3 subpackages: - format - - gstruct - - gstruct/errors - internal/assertion - internal/asyncassertion - internal/oraclematcher @@ -947,7 +944,7 @@ imports: - user/informers/externalversions/user/v1 - user/listers/user/v1 - name: github.com/openshift/imagebuilder - version: 937f2b31b364190f90c4bc51a1ae8b80125b374b + version: bfc0aea02ce95dcfc1a83d452270dbc66933709b subpackages: - dockerclient - imageprogress @@ -1140,9 +1137,6 @@ imports: - pbm/types - property - session - - simulator - - simulator/esx - - simulator/vpx - task - vim25 - vim25/debug @@ -1254,11 +1248,7 @@ imports: - name: golang.org/x/tools version: 2382e3994d48b1d22acc2c86bcad0a2aff028e32 subpackages: - - benchmark/parse - container/intsets - - go/ast/astutil - - go/vcs - - imports - name: google.golang.org/api version: 7f657476956314fee258816aaf81c0ff65cf8bee subpackages: @@ -1270,9 +1260,6 @@ imports: - gensupport - googleapi - googleapi/internal/uritemplates - - logging/v2beta1 - - monitoring/v3 - - pubsub/v1 - tpu/v1alpha1 - name: google.golang.org/appengine version: 12d5545dc1cfa6047a286d5e853841b6471f4c19 @@ -1766,7 +1753,7 @@ imports: - util/testing - util/workqueue - name: k8s.io/code-generator - version: 006eedfdf16ff9bda1d82e13062f5e17be611d23 + version: 895b23721034b22084c5afd7814cb9bd14ee5abd repo: https://github.com/openshift/kubernetes-code-generator.git - name: k8s.io/gengo version: 01a732e01d00cb9a81bb0ca050d3e6d2b947927b @@ -1815,7 +1802,7 @@ imports: - pkg/util/proto - pkg/util/proto/validation - name: k8s.io/kubernetes - version: d500745e6519d922e3dc9735cbafc5f2a67e0e44 + version: a745c520ef9f526306f56ae7bd27e33d5062cb59 repo: https://github.com/openshift/kubernetes.git subpackages: - cmd/controller-manager/app diff --git a/glide.yaml b/glide.yaml index 7c0c32a3834f..ebe1e0732ae7 100644 --- a/glide.yaml +++ b/glide.yaml @@ -42,7 +42,7 @@ import: - package: github.com/openshift/client-go version: release-3.10 - package: github.com/openshift/imagebuilder - version: master + version: bfc0aea02ce95dcfc1a83d452270dbc66933709b - package: github.com/openshift/library-go version: release-3.10 # master already branched for 3.11 @@ -202,8 +202,361 @@ import: # force glide to pull this in - package: github.com/google/uuid +# pin to level + version: dec09d789f3dba190787f8b4454c7d3c936fed9e # yours that I suspect aren't pinning because vendor.conf is respected # yours: containers/image. No idea why this isn't self-pinning. - package: github.com/containers/storage version: 47536c89fcc545a87745e1a1573addc439409165 + + +# generated by tools/depcheck +- package: bitbucket.org/ww/goautoneg + version: 75cd24fc2f2c2a2088577d12123ddee5f54e0675 +- package: cloud.google.com/go + version: 3b1ae45394a234c385be014e9a488f2bb6eef821 +- package: github.com/AaronO/go-git-http + version: 1d9485b3a98f7484772acb5f0dda28b69b958fdd +- package: github.com/abbot/go-http-auth + version: c0ef4539dfab4d21c8ef20ba2924f9fc6f186d35 +- package: github.com/apcera/gssapi + version: 5fb4217df13b8e6878046fe1e5c10e560e1b86dc +- package: github.com/appc/spec + version: fc380db5fc13c6dd71a5b0bf2af0d182865d1b1d +- package: github.com/armon/circbuf + version: bbbad097214e2918d8543d5201d12bfd7bca254d +- package: github.com/asaskevich/govalidator + version: 593d64559f7600f29581a3ee42177f5dbded27a9 +- package: github.com/aws/aws-sdk-go + version: 760741802ad40f49ae9fc4a69ef6706d2527d62e +- package: github.com/Azure/azure-sdk-for-go + version: f111fc2fa3861c5fdced76cae4c9c71821969577 +- package: github.com/Azure/go-ansiterm + version: 19f72df4d05d31cbe1c56bfc8045c96babff6c7e +- package: github.com/Azure/go-autorest + version: d4e6b95c12a08b4de2d48b45d5b4d594e5d32fab +- package: github.com/beorn7/perks + version: 3ac7bf7a47d159a033b107610db8a1b6575507a4 +- package: github.com/blang/semver + version: b38d23b8782a487059e8fc8773e9a5b228a77cb6 +- package: github.com/certifi/gocertifi + version: deb3ae2ef2610fde3330947281941c562861188b +- package: github.com/chai2010/gettext-go + version: c6fed771bfd517099caf0f7a961671fa8ed08723 +- package: github.com/clusterhq/flocker-go + version: 2b8b7259d3139c96c4a6871031355808ab3fd3b3 +- package: github.com/codedellemc/goscaleio + version: 20e2ce2cf8852dc78bd42b76698dcd8dcd77b7b1 +- package: github.com/container-storage-interface/spec + version: 35d9f9d77954980e449e52c3f3e43c21bd8171f5 +- package: github.com/containerd/console + version: 84eeaae905fa414d03e07bcd6c8d3f19e7cf180e +- package: github.com/containerd/containerd + version: 27d450a01bb533d7ebc5701eb52792565396b084 +- package: github.com/containernetworking/cni + version: a7885cb6f8ab03fba07852ded351e4f5e7a112bf +- package: github.com/coreos/go-iptables + version: 259c8e6a4275d497442c721fa52204d7a58bde8b +- package: github.com/coreos/go-oidc + version: 065b426bd41667456c1a924468f507673629c46b +- package: github.com/coreos/go-semver + version: 568e959cd89871e61434c1143528d9162da89ef2 +- package: github.com/coreos/go-systemd + version: 48702e0da86bd25e76cfef347e2adeb434a0d0a6 +- package: github.com/coreos/pkg + version: fa29b1d70f0beaddd4c7021607cc3c3be8ce94b8 +- package: github.com/coreos/rkt + version: ec37f3cb649bfb72408906e7cbf330e4aeda1075 +- package: github.com/cyphar/filepath-securejoin + version: ae69057f2299fb9e5ba2df738607e6a505b74ab6 +- package: github.com/d2g/dhcp4 + version: a1d1b6c41b1ce8a71a5121a9cee31809c4707d9c +- package: github.com/d2g/dhcp4client + version: 6e570ed0a266b730a860ba1068090f683b2c213a +- package: github.com/davecgh/go-spew + version: 782f4967f2dc4564575ca782fe2d04090b5faca8 +- package: github.com/daviddengcn/go-colortext + version: 511bcaf42ccd42c38aba7427b6673277bf19e2a1 +- package: github.com/dchest/safefile + version: 855e8d98f1852d48dde521e0522408d1fe7e836a +- package: github.com/dgrijalva/jwt-go + version: 01aeca54ebda6e0fbfafd0a524d234159c05ec20 +- package: github.com/docker/go-connections + version: 3ede32e2033de7505e6500d6c868c2b9ed9f169d +- package: github.com/docker/go-units + version: 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1 +- package: github.com/docker/libnetwork + version: ba46b928444931e6865d8618dc03622cac79aa6f +- package: github.com/docker/libtrust + version: 9cbd2a1374f46905c68a4eb3694a130610adc62a +- package: github.com/docker/spdystream + version: 449fdfce4d962303d702fec724ef0ad181c92528 +- package: github.com/elazarl/go-bindata-assetfs + version: 3dcc96556217539f50599357fb481ac0dc7439b9 +- package: github.com/emicklei/go-restful + version: ff4f55a206334ef123e4f79bbf348980da81ca46 +- package: github.com/euank/go-kmsg-parser + version: 5ba4d492e455a77d25dcf0d2c4acc9f2afebef4e +- package: github.com/evanphx/json-patch + version: 944e07253867aacae43c04b2e6a239005443f33a +- package: github.com/exponent-io/jsonpath + version: d6023ce2651d8eafb5c75bb0c7167536102ec9f5 +- package: github.com/fatih/camelcase + version: f6a740d52f961c60348ebb109adde9f4635d7540 +- package: github.com/ghodss/yaml + version: 73d445a93680fa1a78ae23a5839bad48f32ba1ee +- package: github.com/go-ini/ini + version: 300e940a926eb277d3901b20bdfcc54928ad3642 +- package: github.com/go-openapi/analysis + version: b44dc874b601d9e4e2f6e19140e794ba24bead3b +- package: github.com/go-openapi/errors + version: d24ebc2075bad502fac3a8ae27aa6dd58e1952dc +- package: github.com/go-openapi/jsonpointer + version: 46af16f9f7b149af66e5d1bd010e3574dc06de98 +- package: github.com/go-openapi/jsonreference + version: 13c6e3589ad90f49bd3e3bbe2c2cb3d7a4142272 +- package: github.com/go-openapi/runtime + version: 11e322eeecc1032d5a0a96c566ed53f2b5c26e22 +- package: github.com/go-openapi/spec + version: 1de3e0542de65ad8d75452a595886fdd0befb363 +- package: github.com/go-openapi/strfmt + version: d65c7fdb29eca313476e529628176fe17e58c488 +- package: github.com/go-openapi/swag + version: f3f9494671f93fcff853e3c6e9e948b3eb71e590 +- package: github.com/go-openapi/validate + version: d509235108fcf6ab4913d2dcb3a2260c0db2108e +- package: github.com/godbus/dbus + version: c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f +- package: github.com/gogo/protobuf + version: c0656edd0d9eab7c66d1eb0c568f9039345796f7 +- package: github.com/golang/groupcache + version: 02826c3e79038b59d737d3b1c0a1d937f71a4433 +- package: github.com/golang/mock + version: bd3c8e81be01eef76d4b503f5e687d2d1354d2d9 +- package: github.com/golang/protobuf + version: 1643683e1b54a9e88ad26d98f81400c8c9d9f4f9 +- package: github.com/google/gofuzz + version: 44d81051d367757e1c7c6a5a86423ece9afcf63c +- package: github.com/googleapis/gnostic + version: 0c5108395e2debce0d731cf0287ddf7242066aba +- package: github.com/gophercloud/gophercloud + version: 6da026c32e2d622cc242d32984259c77237aefe1 +- package: github.com/gorilla/context + version: 215affda49addc4c8ef7e2534915df2c8c35c6cd +- package: github.com/gorilla/mux + version: 8096f47503459bcc74d1f4c487b7e6e42e5746b5 +- package: github.com/gorilla/securecookie + version: 78f3d318a8bf316cda921f25e96fd0b441c5173d +- package: github.com/gorilla/websocket + version: 6eb6ad425a89d9da7a5549bc6da8f79ba5c17844 +- package: github.com/gregjones/httpcache + version: 787624de3eb7bd915c329cba748687a3b22666a6 +- package: github.com/grpc-ecosystem/go-grpc-prometheus + version: 2500245aa6110c562d17020fb31a2c133d737799 +- package: github.com/hashicorp/golang-lru + version: a0d98a5f288019575c6d1f4bb1573fef2d1fcdc4 +- package: github.com/hashicorp/hcl + version: d8c773c4cba11b11539e3d45f93daeaa5dcf1fa1 +- package: github.com/hawkular/hawkular-client-go + version: 1d46ce7e1eca635f372357a8ccbf1fa7cc28b7d2 +- package: github.com/heketi/heketi + version: aaf40619d85fda757e7a1c1ea1b5118cea65594b +- package: github.com/howeyc/gopass + version: bf9dde6d0d2c004a008c27aaee91170c786f6db8 +- package: github.com/imdario/mergo + version: 6633656539c1639d9d78127b7d47c622b5d7b6dc +- package: github.com/inconshreveable/mousetrap + version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 +- package: github.com/influxdata/influxdb + version: e47cf1f2e83a02443d7115c54f838be8ee959644 +- package: github.com/JeffAshton/win_pdh + version: 76bb4ee9f0ab50f77826f2a2ee7fb9d3880d6ec2 +- package: github.com/jmespath/go-jmespath + version: 0b12d6b521d83fc7f755e7cfc1b1fbdd35a01a74 +- package: github.com/jonboulle/clockwork + version: 72f9bd7c4e0c2a40055ab3d0f09654f730cce982 +- package: github.com/kardianos/osext + version: 8fef92e41e22a70e700a96b29f066cda30ea24ef +- package: github.com/kr/fs + version: 2788f0dbd16903de03cb8186e5c7d97b69ad387b +- package: github.com/kr/pty + version: f7ee69f31298ecbe5d2b349c711e2547a617d398 +- package: github.com/lestrrat/go-pdebug + version: 569c97477ae8837e053e5a50bc739e15172b8ebe +- package: github.com/lestrrat/go-structinfo + version: 8204d40bbcd79eb7603cd4c2c998e60eb2479ded +- package: github.com/libopenstorage/openstorage + version: 093a0c3888753c2056e7373183693d670c6bba01 +- package: github.com/lpabon/godbc + version: 9577782540c1398b710ddae1b86268ba03a19b0c +- package: github.com/magiconair/properties + version: 61b492c03cf472e0c6419be5899b8e0dc28b1b88 +- package: github.com/mailru/easyjson + version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d +- package: github.com/MakeNowJust/heredoc + version: bb23615498cded5e105af4ce27de75b089cbe851 +- package: github.com/marstr/guid + version: 8bdf7d1a087ccc975cf37dd6507da50698fd19ca +- package: github.com/matttproud/golang_protobuf_extensions + version: fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a +- package: github.com/Microsoft/go-winio + version: 78439966b38d69bf38227fbf57ac8a6fee70f69a +- package: github.com/Microsoft/hcsshim + version: 6ea7fe54f719d95721e7d9b26ac0add224c9b923 +- package: github.com/mindprince/gonvml + version: fee913ce8fb235edf54739d259ca0ecc226c7b8a +- package: github.com/mistifyio/go-zfs + version: 1b4ae6fb4e77b095934d4430860ff202060169f8 +- package: github.com/mitchellh/go-wordwrap + version: ad45545899c7b13c020ea92b2072220eefad42b8 +- package: github.com/mitchellh/mapstructure + version: 53818660ed4955e899c0bcafa97299a388bd7c8e +- package: github.com/mohae/deepcopy + version: 491d3605edfb866af34a48075bd4355ac1bf46ca +- package: github.com/mreiferson/go-httpclient + version: 31f0106b4474f14bc441575c19d3a5fa21aa1f6c +- package: github.com/mrunalp/fileutils + version: 4ee1cc9a80582a0c75febdd5cfa779ee4361cbca +- package: github.com/mtrmac/gpgme + version: b2432428689ca58c2b8e8dea9449d3295cf96fc9 +- package: github.com/mxk/go-flowrate + version: cca7078d478f8520f85629ad7c68962d31ed7682 +- package: github.com/Nvveen/Gotty + version: cd527374f1e5bff4938207604a14f2e38a9cf512 +- package: github.com/NYTimes/gziphandler + version: 56545f4a5d46df9a6648819d1664c3a03a13ffdb +- package: github.com/onsi/gomega + version: d59fa0ac68bb5dd932ee8d24eed631cdd519efc3 +- package: github.com/opencontainers/go-digest + version: a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb +- package: github.com/opencontainers/image-spec + version: 372ad780f63454fbbbbcc7cf80e5b90245c13e13 +- package: github.com/opencontainers/runtime-spec + version: 02137cd4e50b37a01665e1731fcd4ac2d2178230 +- package: github.com/opencontainers/selinux + version: 4a2974bf1ee960774ffd517717f1f45325af0206 +- package: github.com/pborman/uuid + version: ca53cad383cad2479bbba7f7a1a05797ec1386e4 +- package: github.com/pelletier/go-buffruneio + version: df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d +- package: github.com/pelletier/go-toml + version: 0049ab3dc4c4c70a9eee23087437b69c0dde2130 +- package: github.com/peterbourgon/diskv + version: 5f041e8faa004a95c88a202771f4cc3e991971e6 +- package: github.com/pkg/errors + version: 645ef00459ed84a119197bfb8d8205042c6df63d +- package: github.com/pkg/profile + version: 5b67d428864e92711fcbd2f8629456121a56d91f +- package: github.com/pkg/sftp + version: 4d0e916071f68db74f8a73926335f809396d6b42 +- package: github.com/pmezard/go-difflib + version: d8ed2627bdf02c080bf22230dbb337003b7aba2d +- package: github.com/pquerna/cachecontrol + version: 0dec1b30a0215bb68605dfc568e8855066c9202d +- package: github.com/prometheus/client_golang + version: e7e903064f5e9eb5da98208bae10b475d4db0f8c +- package: github.com/prometheus/client_model + version: fa8ad6fec33561be4280a8f0514318c79d7f6cb6 +- package: github.com/prometheus/common + version: 13ba4ddd0caa9c28ca7b7bffe1dfa9ed8d5ef207 +- package: github.com/prometheus/procfs + version: 65c1f6f8f0fc1e2185eb9863a3bc751496404259 +- package: github.com/PuerkitoBio/purell + version: 8a290539e2e8629dbc4e6bad948158f790ec31f4 +- package: github.com/PuerkitoBio/urlesc + version: 5bd2802263f21d8788851d5305584c82a5c75d7e +- package: github.com/quobyte/api + version: f2b94aa4aa4f8fcf279fe667ccd916abe6a064d5 +- package: github.com/rancher/go-rancher + version: 09693a8743ba5ee58c58c1b1e8a4abd17af00d45 +- package: github.com/renstrom/dedent + version: 020d11c3b9c0c7a3c2efcc8e5cf5b9ef7bcea21f +- package: github.com/robfig/cron + version: df38d32658d8788cd446ba74db4bb5375c4b0cb3 +- package: github.com/rubiojr/go-vhd + version: 0bfd3b39853cdde5762efda92289f14b0ac0491b +- package: github.com/russross/blackfriday + version: 300106c228d52c8941d4b3de6054a6062a86dda3 +- package: github.com/satori/go.uuid + version: 879c5887cd475cd7864858769793b2ceb0d44feb +- package: github.com/seccomp/libseccomp-golang + version: 1b506fc7c24eec5a3693cdcbed40d9c226cfc6a1 +- package: github.com/shurcooL/sanitized_anchor_name + version: 10ef21a441db47d8b13ebcc5fd2310f636973c77 +- package: github.com/sirupsen/logrus + version: 89742aefa4b206dcf400792f3bd35b542998eb3b +- package: github.com/spf13/afero + version: b28a7effac979219c2a2ed6205a4d70e4b1bcd02 +- package: github.com/spf13/cast + version: e31f36ffc91a2ba9ddb72a4b6a607ff9b3d3cb63 +- package: github.com/spf13/cobra + version: 6644d46b81fa1831979c4cded0106e774e0ef0ab +- package: github.com/spf13/jwalterweatherman + version: 33c24e77fb80341fe7130ee7c594256ff08ccc46 +- package: github.com/spf13/pflag + version: 4c012f6dcd9546820e378d0bdda4d8fc772cdfea +- package: github.com/spf13/viper + version: 7fb2782df3d83e0036cc89f461ed0422628776f4 +- package: github.com/storageos/go-api + version: 3a4032328d99c1b43fbda3d85bd3c80fa06e1707 +- package: github.com/stretchr/objx + version: 1a9d0bb9f541897e62256577b352fdbc1fb4fd94 +- package: github.com/stretchr/testify + version: f6abca593680b2315d2075e0f5e2a9751e3f431a +- package: github.com/syndtr/gocapability + version: e7cb7fa329f456b3855136a2642b197bad7366ba +- package: github.com/vishvananda/netns + version: be1fbeda19366dea804f00efff2dd73a1642fdcc +- package: github.com/vjeantet/asn1-ber + version: 85041cd0f4769ebf4a5ae600b1e921e630d6aff0 +- package: github.com/vmware/govmomi + version: 0f82f03a2bbf14037d2331cf02f1d4157bbef6cc +- package: github.com/vmware/photon-controller-go-sdk + version: 4a435daef6ccd3d0edaac1161e76f51a70c2589a +- package: github.com/xanzy/go-cloudstack + version: 1e2cbf647e57fa90353612074fdfc42faf5073bf +- package: github.com/xiang90/probing + version: 07dd2e8dfe18522e9c447ba95f2fe95262f63bb2 +- package: golang.org/x/crypto + version: 81e90905daefcd6fd217b62423c0908922eadb30 +- package: golang.org/x/exp + version: 292a51b8d262487dab23a588950e8052d63d9113 +- package: golang.org/x/net + version: 1c05540f6879653db88113bc4a2b70aec4bd491f +- package: golang.org/x/oauth2 + version: a6bd8cefa1811bd24b86f8902872e4e8225f74c4 +- package: golang.org/x/sys + version: 95c6576299259db960f6c5b9b69ea52422860fce +- package: golang.org/x/text + version: b19bf474d317b857955b12035d2c5acb57ce8b01 +- package: golang.org/x/time + version: f51c12702a4d776e4c1fa9b0fabab841babae631 +- package: golang.org/x/tools + version: 2382e3994d48b1d22acc2c86bcad0a2aff028e32 +- package: google.golang.org/api + version: 7f657476956314fee258816aaf81c0ff65cf8bee +- package: google.golang.org/genproto + version: 09f6ed296fc66555a25fe4ce95173148778dfa85 +- package: gopkg.in/asn1-ber.v1 + version: 379148ca0225df7a432012b8df0355c2a2063ac0 +- package: gopkg.in/gcfg.v1 + version: 27e4946190b4a327b539185f2b5b1f7c84730728 +- package: gopkg.in/inf.v0 + version: 3887ee99ecf07df5b447e9b00d9c0b2adaa9f3e4 +- package: gopkg.in/ldap.v2 + version: bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9 +- package: gopkg.in/natefinch/lumberjack.v2 + version: 20b71e5b60d756d3d2f80def009790325acc2b23 +- package: gopkg.in/square/go-jose.v2 + version: f8f38de21b4dcd69d0413faf231983f5fd6634b1 +- package: gopkg.in/warnings.v0 + version: 8a331561fe74dadba6edfc59f3be66c22c3b065d +- package: gopkg.in/yaml.v2 + version: 670d4cfef0544295bc27a114dbac37980d83185a +- package: k8s.io/heapster + version: c2ac40f1adf8c42a79badddb2a2acd673cae3bcb +- package: k8s.io/utils + version: aedf551cdb8b0119df3a19c65fde413a13b34997 +- package: vbom.ml/util + version: db5cfe13f5cc80a4990d98e2e1b0707a4d1a5394 diff --git a/vendor/github.com/openshift/imagebuilder/cmd/imagebuilder/imagebuilder.go b/vendor/github.com/openshift/imagebuilder/cmd/imagebuilder/imagebuilder.go index 62a932c27049..499e466f987b 100644 --- a/vendor/github.com/openshift/imagebuilder/cmd/imagebuilder/imagebuilder.go +++ b/vendor/github.com/openshift/imagebuilder/cmd/imagebuilder/imagebuilder.go @@ -82,7 +82,7 @@ func main() { if glog.V(2) { log.Printf("Builder: "+format, args...) } else { - fmt.Fprintf(options.ErrOut, "--> %s\n", fmt.Sprintf(format, args...)) + fmt.Fprintf(options.Out, "--> %s\n", fmt.Sprintf(format, args...)) } } diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/archive.go b/vendor/github.com/openshift/imagebuilder/dockerclient/archive.go index ee5ca9a30e51..c8c0f68bc92f 100644 --- a/vendor/github.com/openshift/imagebuilder/dockerclient/archive.go +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/archive.go @@ -38,7 +38,9 @@ func FilterArchive(r io.Reader, w io.Writer, fn TransformFileFunc) error { } var body io.Reader = tr + name := h.Name data, ok, skip, err := fn(h, tr) + glog.V(6).Infof("Transform %s -> %s: data=%t ok=%t skip=%t err=%v", name, h.Name, data != nil, ok, skip, err) if err != nil { return err } @@ -100,7 +102,7 @@ func NewLazyArchive(fn CreateFileFunc) io.ReadCloser { return pr } -func archiveFromURL(src, dst, tempDir string) (io.Reader, io.Closer, error) { +func archiveFromURL(src, dst, tempDir string, check DirectoryCheck) (io.Reader, io.Closer, error) { // get filename from URL u, err := url.Parse(src) if err != nil { @@ -151,7 +153,7 @@ func archiveFromURL(src, dst, tempDir string) (io.Reader, io.Closer, error) { return archive, closers{resp.Body.Close, archive.Close}, nil } -func archiveFromDisk(directory string, src, dst string, allowDownload bool, excludes []string) (io.Reader, io.Closer, error) { +func archiveFromDisk(directory string, src, dst string, allowDownload bool, excludes []string, check DirectoryCheck) (io.Reader, io.Closer, error) { var err error if filepath.IsAbs(src) { src, err = filepath.Rel(filepath.Dir(src), src) @@ -173,13 +175,66 @@ func archiveFromDisk(directory string, src, dst string, allowDownload bool, excl directory = filepath.Dir(directory) } - options := archiveOptionsFor(infos, dst, excludes) + options, err := archiveOptionsFor(infos, dst, excludes, check) + if err != nil { + return nil, nil, err + } glog.V(4).Infof("Tar of %s %#v", directory, options) rc, err := archive.TarWithOptions(directory, options) return rc, rc, err } +func archiveFromFile(file string, src, dst string, excludes []string, check DirectoryCheck) (io.Reader, io.Closer, error) { + var err error + if filepath.IsAbs(src) { + src, err = filepath.Rel(filepath.Dir(src), src) + if err != nil { + return nil, nil, err + } + } + + mapper, _, err := newArchiveMapper(src, dst, excludes, true, check) + if err != nil { + return nil, nil, err + } + + f, err := os.Open(file) + if err != nil { + return nil, nil, err + } + + r, err := transformArchive(f, true, mapper.Filter) + return r, f, err +} + +func archiveFromContainer(in io.Reader, src, dst string, excludes []string, check DirectoryCheck) (io.Reader, string, error) { + mapper, archiveRoot, err := newArchiveMapper(src, dst, excludes, false, check) + if err != nil { + return nil, "", err + } + + r, err := transformArchive(in, false, mapper.Filter) + return r, archiveRoot, err +} + +func transformArchive(r io.Reader, compressed bool, fn TransformFileFunc) (io.Reader, error) { + pr, pw := io.Pipe() + go func() { + if compressed { + in, err := archive.DecompressStream(r) + if err != nil { + pw.CloseWithError(err) + return + } + r = in + } + err := FilterArchive(r, pw, fn) + pw.CloseWithError(err) + }() + return pr, nil +} + // * -> test // a (dir) -> test // a (file) -> test @@ -193,9 +248,15 @@ func archivePathMapper(src, dst string, isDestDir bool) (fn func(name string, is } pattern := filepath.Base(srcPattern) + glog.V(6).Infof("creating mapper for srcPattern=%s pattern=%s dst=%s isDestDir=%t", srcPattern, pattern, dst, isDestDir) + // no wildcards if !containsWildcards(pattern) { return func(name string, isDir bool) (string, bool) { + // when extracting from the working directory, Docker prefaces with ./ + if strings.HasPrefix(name, "."+string(filepath.Separator)) { + name = name[2:] + } if name == srcPattern { if isDir { return "", false @@ -232,7 +293,7 @@ func archivePathMapper(src, dst string, isDestDir bool) (fn func(name string, is } prefix += string(filepath.Separator) - // nested with pattern pattern + // nested with pattern return func(name string, isDir bool) (string, bool) { remainder := strings.TrimPrefix(name, prefix) if remainder == name { @@ -251,56 +312,6 @@ func archivePathMapper(src, dst string, isDestDir bool) (fn func(name string, is } } -func archiveFromFile(file string, src, dst string, excludes []string) (io.Reader, io.Closer, error) { - var err error - if filepath.IsAbs(src) { - src, err = filepath.Rel(filepath.Dir(src), src) - if err != nil { - return nil, nil, err - } - } - - mapper, _, err := newArchiveMapper(src, dst, excludes, true) - if err != nil { - return nil, nil, err - } - - f, err := os.Open(file) - if err != nil { - return nil, nil, err - } - - r, err := transformArchive(f, true, mapper.Filter) - return r, f, err -} - -func archiveFromContainer(in io.Reader, src, dst string, excludes []string) (io.Reader, string, error) { - mapper, archiveRoot, err := newArchiveMapper(src, dst, excludes, false) - if err != nil { - return nil, "", err - } - - r, err := transformArchive(in, false, mapper.Filter) - return r, archiveRoot, err -} - -func transformArchive(r io.Reader, compressed bool, fn TransformFileFunc) (io.Reader, error) { - pr, pw := io.Pipe() - go func() { - if compressed { - in, err := archive.DecompressStream(r) - if err != nil { - pw.CloseWithError(err) - return - } - r = in - } - err := FilterArchive(r, pw, fn) - pw.CloseWithError(err) - }() - return pr, nil -} - type archiveMapper struct { exclude *fileutils.PatternMatcher rename func(name string, isDir bool) (string, bool) @@ -308,7 +319,7 @@ type archiveMapper struct { resetOwners bool } -func newArchiveMapper(src, dst string, excludes []string, resetOwners bool) (*archiveMapper, string, error) { +func newArchiveMapper(src, dst string, excludes []string, resetOwners bool, check DirectoryCheck) (*archiveMapper, string, error) { ex, err := fileutils.NewPatternMatcher(excludes) if err != nil { return nil, "", err @@ -316,6 +327,13 @@ func newArchiveMapper(src, dst string, excludes []string, resetOwners bool) (*ar isDestDir := strings.HasSuffix(dst, "/") || path.Base(dst) == "." dst = path.Clean(dst) + if !isDestDir && check != nil { + isDir, err := check.IsDirectory(dst) + if err != nil { + return nil, "", err + } + isDestDir = isDir + } var prefix string archiveRoot := src @@ -380,19 +398,27 @@ func (m *archiveMapper) Filter(h *tar.Header, r io.Reader) ([]byte, bool, bool, return nil, false, false, nil } -func archiveOptionsFor(infos []CopyInfo, dst string, excludes []string) *archive.TarOptions { +func archiveOptionsFor(infos []CopyInfo, dst string, excludes []string, check DirectoryCheck) (*archive.TarOptions, error) { dst = trimLeadingPath(dst) dstIsDir := strings.HasSuffix(dst, "/") || dst == "." || dst == "/" || strings.HasSuffix(dst, "/.") dst = trimTrailingSlash(dst) dstIsRoot := dst == "." || dst == "/" + if !dstIsDir && check != nil { + isDir, err := check.IsDirectory(dst) + if err != nil { + return nil, fmt.Errorf("unable to check whether %s is a directory: %v", dst, err) + } + dstIsDir = isDir + } + options := &archive.TarOptions{ ChownOpts: &idtools.IDPair{UID: 0, GID: 0}, } pm, err := fileutils.NewPatternMatcher(excludes) if err != nil { - return options + return options, nil } for _, info := range infos { @@ -418,12 +444,9 @@ func archiveOptionsFor(infos []CopyInfo, dst string, excludes []string) *archive case len(infos) > 1: // put each input into the target, which is assumed to be a directory ([Dockerfile, dir] -> [a/Dockerfile, a/dir]) options.RebaseNames[infoPath] = path.Join(dst, path.Base(infoPath)) - case info.FileInfo.IsDir() && dstIsDir: - // mapping a directory to an explicit directory ([dir] -> [a]) - options.RebaseNames[infoPath] = dst case info.FileInfo.IsDir(): - // mapping a directory to an implicit directory ([Dockerfile] -> [dir/Dockerfile]) - options.RebaseNames[infoPath] = path.Join(dst, path.Base(infoPath)) + // mapping a directory to a destination, explicit or not ([dir] -> [a]) + options.RebaseNames[infoPath] = dst case info.FromDir: // this is a file that was part of an explicit directory request, no transformation options.RebaseNames[infoPath] = path.Join(dst, path.Base(infoPath)) @@ -437,7 +460,7 @@ func archiveOptionsFor(infos []CopyInfo, dst string, excludes []string) *archive } options.ExcludePatterns = excludes - return options + return options, nil } func sourceToDestinationName(src, dst string, forceDir bool) string { diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/archive_test.go b/vendor/github.com/openshift/imagebuilder/dockerclient/archive_test.go index 89961c769b63..978c8564bfd3 100644 --- a/vendor/github.com/openshift/imagebuilder/dockerclient/archive_test.go +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/archive_test.go @@ -13,6 +13,20 @@ import ( "github.com/docker/docker/pkg/archive" ) +type testDirectoryCheck map[string]bool + +func (c testDirectoryCheck) IsDirectory(path string) (bool, error) { + if c == nil { + return false, nil + } + + isDir, ok := c[path] + if !ok { + return false, fmt.Errorf("no path defined for %s", path) + } + return isDir, nil +} + type archiveGenerator struct { Headers []*tar.Header } @@ -81,6 +95,7 @@ func Test_archiveFromFile(t *testing.T) { dst string excludes []string expect []string + check map[string]bool }{ { file: testArchive, @@ -233,6 +248,7 @@ func Test_archiveFromFile(t *testing.T) { testCase.src, testCase.dst, testCase.excludes, + testDirectoryCheck(testCase.check), ) if err != nil { t.Fatal(err) @@ -266,6 +282,7 @@ func Test_archiveFromContainer(t *testing.T) { excludes []string expect []string path string + check map[string]bool }{ { gen: newArchiveGenerator().File("file").Dir("test").File("test/file2"), @@ -394,6 +411,14 @@ func Test_archiveFromContainer(t *testing.T) { path: "/a", expect: nil, }, + { + gen: newArchiveGenerator().File("b"), + src: "/a/b", + dst: "/a", + check: map[string]bool{"/a": true}, + path: "/a", + expect: nil, + }, { gen: newArchiveGenerator().Dir("a/").File("a/b"), src: "/a/b", @@ -403,6 +428,13 @@ func Test_archiveFromContainer(t *testing.T) { "/a", }, }, + { + gen: newArchiveGenerator().Dir("./a").File("./a/b"), + src: "a", + dst: "/a", + path: ".", + expect: []string{"/a/b"}, + }, } for i := range testCases { testCase := testCases[i] @@ -412,6 +444,7 @@ func Test_archiveFromContainer(t *testing.T) { testCase.src, testCase.dst, testCase.excludes, + testDirectoryCheck(testCase.check), ) if err != nil { t.Fatal(err) diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/client.go b/vendor/github.com/openshift/imagebuilder/dockerclient/client.go index 4340191c51f0..fa8b4a8fa2be 100644 --- a/vendor/github.com/openshift/imagebuilder/dockerclient/client.go +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/client.go @@ -455,10 +455,9 @@ func (e *ClientExecutor) PopulateTransientMounts(opts docker.CreateContainerOpti var copies []imagebuilder.Copy for i, mount := range transientMounts { - source := mount.SourcePath copies = append(copies, imagebuilder.Copy{ FromFS: true, - Src: []string{filepath.Join(e.Directory, source)}, + Src: []string{mount.SourcePath}, Dest: filepath.Join(e.ContainerTransientMount, strconv.Itoa(i)), }) } @@ -800,8 +799,9 @@ func (e *ClientExecutor) archiveFromContainer(from string, src, dst string) (io. e.Deferred = append([]func() error{func() error { return e.removeContainer(containerID) }}, e.Deferred...) } + check := newDirectoryCheck(e.Client, e.Container.ID) pr, pw := io.Pipe() - ar, archiveRoot, err := archiveFromContainer(pr, src, dst, nil) + ar, archiveRoot, err := archiveFromContainer(pr, src, dst, nil, check) if err != nil { pr.Close() return nil, nil, err @@ -819,26 +819,30 @@ func (e *ClientExecutor) archiveFromContainer(from string, src, dst string) (io. // TODO: this does not support decompressing nested archives for ADD (when the source is a compressed file) func (e *ClientExecutor) Archive(fromFS bool, src, dst string, allowDownload bool, excludes []string) (io.Reader, io.Closer, error) { + var check DirectoryCheck + if e.Container != nil { + check = newDirectoryCheck(e.Client, e.Container.ID) + } if isURL(src) { if !allowDownload { return nil, nil, fmt.Errorf("source can't be a URL") } glog.V(5).Infof("Archiving %s -> %s from URL", src, dst) - return archiveFromURL(src, dst, e.TempDir) + return archiveFromURL(src, dst, e.TempDir, check) } // the input is from the filesystem, use the source as the input if fromFS { glog.V(5).Infof("Archiving %s %s -> %s from a filesystem location", src, ".", dst) - return archiveFromDisk(src, ".", dst, allowDownload, excludes) + return archiveFromDisk(src, ".", dst, allowDownload, excludes, check) } // if the context is in archive form, read from it without decompressing if len(e.ContextArchive) > 0 { glog.V(5).Infof("Archiving %s %s -> %s from context archive", e.ContextArchive, src, dst) - return archiveFromFile(e.ContextArchive, src, dst, excludes) + return archiveFromFile(e.ContextArchive, src, dst, excludes, check) } // if the context is a directory, we only allow relative includes glog.V(5).Infof("Archiving %q %q -> %q from disk", e.Directory, src, dst) - return archiveFromDisk(e.Directory, src, dst, allowDownload, excludes) + return archiveFromDisk(e.Directory, src, dst, allowDownload, excludes, check) } // ContainerVolumeTracker manages tracking archives of specific paths inside a container. diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/conformance_test.go b/vendor/github.com/openshift/imagebuilder/dockerclient/conformance_test.go index 27a99ae9f1a5..911083ada297 100644 --- a/vendor/github.com/openshift/imagebuilder/dockerclient/conformance_test.go +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/conformance_test.go @@ -60,7 +60,6 @@ func TestMount(t *testing.T) { out := &bytes.Buffer{} e.Out, e.ErrOut = out, out - e.Directory = "." e.Tag = filepath.Base(tmpDir) e.TransientMounts = []Mount{ {SourcePath: "testdata/volume/", DestinationPath: "/tmp/test"}, @@ -87,6 +86,72 @@ func TestMount(t *testing.T) { } } +func TestCopyFrom(t *testing.T) { + c, err := docker.NewClientFromEnv() + if err != nil { + t.Fatal(err) + } + + testCases := []struct { + name string + create string + copy string + extra string + expect string + }{ + {name: "copy file to root", create: "touch /a /b", copy: "/a /", expect: "[[ -f /a ]]"}, + {name: "copy file to same file", create: "touch /a", copy: "/a /a", expect: "[[ -f /a ]]"}, + {name: "copy file to workdir", create: "touch /a", extra: "WORKDIR /b", copy: "/a .", expect: "[[ -f /b/a ]]"}, + {name: "copy file to workdir rename", create: "touch /a", extra: "WORKDIR /b", copy: "/a ./b", expect: "[[ -f /b/b ]]"}, + {name: "copy folder contents to higher level", create: "mkdir -p /a/b && touch /a/b/1 /a/b/2", copy: "/a/b/ /b/", expect: "[[ -f /b/1 && -f /b/2 && ! -e /a ]]"}, + {name: "copy wildcard folder contents to higher level", create: "mkdir -p /a/b && touch /a/b/1 /a/b/2", copy: "/a/b/* /b/", expect: "ls -al /b/1 /b/2 /b && ! ls -al /a /b/a /b/b"}, + {name: "copy folder with dot contents to higher level", create: "mkdir -p /a/b && touch /a/b/1 /a/b/2", copy: "/a/b/. /b/", expect: "ls -al /b/1 /b/2 /b && ! ls -al /a /b/a /b/b"}, + {name: "copy root file to different root name", create: "touch /b", copy: "/b /a", expect: "ls -al /a && ! ls -al /b"}, + {name: "copy nested file to different root name", create: "mkdir -p /a && touch /a/b", copy: "/a/b /a", expect: "ls -al /a && ! ls -al /b"}, + {name: "copy file to deeper directory with explicit slash", create: "mkdir -p /a && touch /a/1", copy: "/a/1 /a/b/c/", expect: "ls -al /a/b/c/1 && ! ls -al /a/b/1"}, + {name: "copy file to deeper directory without explicit slash", create: "mkdir -p /a && touch /a/1", copy: "/a/1 /a/b/c", expect: "ls -al /a/b/c && ! ls -al /a/b/1"}, + {name: "copy directory to deeper directory without explicit slash", create: "mkdir -p /a && touch /a/1", copy: "/a /a/b/c", expect: "ls -al /a/b/c/1 && ! ls -al /a/b/1"}, + {name: "copy directory to root without explicit slash", create: "mkdir -p /a && touch /a/1", copy: "a /a", expect: "ls -al /a/1 && ! ls -al /a/a"}, + {name: "copy directory trailing to root without explicit slash", create: "mkdir -p /a && touch /a/1", copy: "a/. /a", expect: "ls -al /a/1 && ! ls -al /a/a"}, + } + for i, testCase := range testCases { + name := fmt.Sprintf("%d", i) + if len(testCase.name) > 0 { + name = testCase.name + } + test := testCase + t.Run(name, func(t *testing.T) { + t.Parallel() + e := NewClientExecutor(c) + defer e.Release() + + out := &bytes.Buffer{} + e.Out, e.ErrOut = out, out + b := imagebuilder.NewBuilder(nil) + dockerfile := fmt.Sprintf(` + FROM busybox AS base + RUN %s + FROM busybox + %s + COPY --from=base %s + RUN %s + `, test.create, test.extra, test.copy, test.expect, + ) + t.Log(dockerfile) + node, err := imagebuilder.ParseDockerfile(strings.NewReader(dockerfile)) + if err != nil { + t.Fatal(err) + } + + stages := imagebuilder.NewStages(node, b) + if _, err := e.Stages(b, stages, ""); err != nil { + t.Log(out.String()) + t.Fatal(err) + } + }) + } +} + func TestShell(t *testing.T) { tmpDir, err := ioutil.TempDir("", "dockerbuild-conformance-") if err != nil { @@ -188,6 +253,18 @@ func TestConformanceInternal(t *testing.T) { Name: "directory", ContextDir: "testdata/dir", }, + { + Name: "copy to dir", + ContextDir: "testdata/copy", + }, + { + Name: "copy dir", + ContextDir: "testdata/copydir", + }, + { + Name: "copy to renamed file", + ContextDir: "testdata/copyrename", + }, { Name: "directory with slash", ContextDir: "testdata/overlapdir", @@ -329,8 +406,8 @@ func TestTransientMount(t *testing.T) { e.AllowPull = true e.Directory = "testdata" e.TransientMounts = []Mount{ - {SourcePath: "dir", DestinationPath: "/mountdir"}, - {SourcePath: "Dockerfile.env", DestinationPath: "/mountfile"}, + {SourcePath: "testdata/dir", DestinationPath: "/mountdir"}, + {SourcePath: "testdata/Dockerfile.env", DestinationPath: "/mountfile"}, } e.Tag = fmt.Sprintf("conformance%d", rand.Int63()) diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/copyinfo_test.go b/vendor/github.com/openshift/imagebuilder/dockerclient/copyinfo_test.go index 7828e3511850..24854441b945 100644 --- a/vendor/github.com/openshift/imagebuilder/dockerclient/copyinfo_test.go +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/copyinfo_test.go @@ -17,6 +17,7 @@ func TestCalcCopyInfo(t *testing.T) { paths map[string]struct{} excludes []string rebaseNames map[string]string + check map[string]bool }{ { origPath: "subdir/*", @@ -106,6 +107,33 @@ func TestCalcCopyInfo(t *testing.T) { "Dockerfile": "copy/Dockerfile", }, }, + { + origPath: "Dockerfile", + dstPath: "copy", + rootPath: "testdata/singlefile", + allowWildcards: true, + errFn: nilErr, + paths: map[string]struct{}{ + "Dockerfile": {}, + }, + rebaseNames: map[string]string{ + "Dockerfile": "copy", + }, + }, + { + origPath: "Dockerfile", + dstPath: "copy", + check: map[string]bool{"copy": true}, + rootPath: "testdata/singlefile", + allowWildcards: true, + errFn: nilErr, + paths: map[string]struct{}{ + "Dockerfile": {}, + }, + rebaseNames: map[string]string{ + "Dockerfile": "copy/Dockerfile", + }, + }, { origPath: "existing/", dstPath: ".", @@ -185,6 +213,20 @@ func TestCalcCopyInfo(t *testing.T) { "subdir": "test", }, }, + { + origPath: "dir", + dstPath: "/dir", + check: map[string]bool{"dir": false}, + rootPath: "testdata/copydir", + allowWildcards: true, + errFn: nilErr, + paths: map[string]struct{}{ + "dir": {}, + }, + rebaseNames: map[string]string{ + "dir": "dir", + }, + }, } for i, test := range tests { @@ -211,7 +253,10 @@ func TestCalcCopyInfo(t *testing.T) { t.Errorf("did not see paths: %#v", expect) } - options := archiveOptionsFor(infos, test.dstPath, test.excludes) + options, err := archiveOptionsFor(infos, test.dstPath, test.excludes, testDirectoryCheck(test.check)) + if err != nil { + t.Fatal(err) + } if !reflect.DeepEqual(test.rebaseNames, options.RebaseNames) { t.Errorf("rebase names did not match:\n%#v\n%#v", test.rebaseNames, options.RebaseNames) } diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/directory.go b/vendor/github.com/openshift/imagebuilder/dockerclient/directory.go new file mode 100644 index 000000000000..4e0a9f8bf01a --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/directory.go @@ -0,0 +1,87 @@ +package dockerclient + +import ( + "archive/tar" + "context" + "io" + "io/ioutil" + + "github.com/golang/glog" + + docker "github.com/fsouza/go-dockerclient" +) + +type DirectoryCheck interface { + IsDirectory(path string) (bool, error) +} + +type directoryCheck struct { + containerID string + client *docker.Client +} + +func newDirectoryCheck(client *docker.Client, containerID string) *directoryCheck { + return &directoryCheck{ + containerID: containerID, + client: client, + } +} + +func (c *directoryCheck) IsDirectory(path string) (bool, error) { + if path == "/" || path == "." || path == "./" { + return true, nil + } + + dir, err := isContainerPathDirectory(c.client, c.containerID, path) + if err != nil { + return false, err + } + + return dir, nil +} + +func isContainerPathDirectory(client *docker.Client, containerID, path string) (bool, error) { + pr, pw := io.Pipe() + defer pw.Close() + ctx, cancel := context.WithCancel(context.TODO()) + go func() { + err := client.DownloadFromContainer(containerID, docker.DownloadFromContainerOptions{ + OutputStream: pw, + Path: path, + Context: ctx, + }) + if err != nil { + if apiErr, ok := err.(*docker.Error); ok && apiErr.Status == 404 { + glog.V(4).Infof("path %s did not exist in container %s: %v", path, containerID, err) + err = nil + } + if err != nil && err != context.Canceled { + glog.V(6).Infof("error while checking directory contents for container %s at path %s: %v", containerID, path, err) + } + } + pw.CloseWithError(err) + }() + + tr := tar.NewReader(pr) + + h, err := tr.Next() + if err != nil { + if err == io.EOF { + err = nil + } + return false, err + } + + glog.V(4).Infof("Retrieved first header from container %s at path %s: %#v", containerID, path, h) + + // take the remainder of the input and discard it + go func() { + cancel() + n, err := io.Copy(ioutil.Discard, pr) + if n > 0 || err != nil { + glog.V(6).Infof("Discarded %d bytes from end of container directory check, and got error: %v", n, err) + } + }() + + return h.FileInfo().IsDir(), nil +} diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/Dockerfile b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/Dockerfile new file mode 100644 index 000000000000..815de493ba73 --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/Dockerfile @@ -0,0 +1,3 @@ +FROM centos:7 +COPY script /usr/bin +RUN ls -al /usr/bin/script \ No newline at end of file diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/script b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/script new file mode 100644 index 000000000000..c3c3f3f53f62 --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copy/script @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 \ No newline at end of file diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copydir/Dockerfile b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copydir/Dockerfile new file mode 100644 index 000000000000..92c53fdf6dad --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copydir/Dockerfile @@ -0,0 +1,3 @@ +FROM centos:7 +COPY dir /dir +RUN ls -al /dir/file \ No newline at end of file diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copydir/dir/file b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copydir/dir/file new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/Dockerfile b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/Dockerfile new file mode 100644 index 000000000000..575bf2cd4de4 --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/Dockerfile @@ -0,0 +1,3 @@ +FROM centos:7 +COPY file1 /usr/bin/file2 +RUN ls -al /usr/bin/file2 && ! ls -al /usr/bin/file1 \ No newline at end of file diff --git a/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/file1 b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/file1 new file mode 100644 index 000000000000..c3c3f3f53f62 --- /dev/null +++ b/vendor/github.com/openshift/imagebuilder/dockerclient/testdata/copyrename/file1 @@ -0,0 +1,2 @@ +#!/bin/bash +exit 0 \ No newline at end of file