vendor: update buildkit to master@b49a8873179b
Signed-off-by: Justin Chadwell <me@jedevc.com>pull/1987/head
parent
5ed8f1b7d9
commit
4e7709e54c
@ -1,66 +1,284 @@
|
||||
# This file lists all individuals having contributed content to the repository.
|
||||
# For how it is generated, see `scripts/generate-authors.sh`.
|
||||
# For how it is generated, see hack/dockerfiles/authors.Dockerfile.
|
||||
|
||||
a-palchikov <deemok@gmail.com>
|
||||
Aaron L. Xu <likexu@harmonycloud.cn>
|
||||
Aaron Lehmann <aaron.lehmann@docker.com>
|
||||
Aaron Lehmann <alehmann@netflix.com>
|
||||
Abdur Rehman <abdur_rehman@mentor.com>
|
||||
Addam Hardy <addam.hardy@gmail.com>
|
||||
Adrian Plata <adrian.plata@docker.com>
|
||||
Aidan Hobson Sayers <aidanhs@cantab.net>
|
||||
Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
|
||||
Alan Fregtman <941331+darkvertex@users.noreply.github.com>
|
||||
Alex Couture-Beil <alex@earthly.dev>
|
||||
Alex Mayer <amayer5125@gmail.com>
|
||||
Alex Suraci <suraci.alex@gmail.com>
|
||||
Alexander Morozov <lk4d4@docker.com>
|
||||
Alexis Murzeau <amubtdx@gmail.com>
|
||||
Alice Frosi <afrosi@de.ibm.com>
|
||||
Allen Sun <allen.sun@daocloud.io>
|
||||
Amen Belayneh <amenbelayneh@gmail.com>
|
||||
Anca Iordache <anca.iordache@docker.com>
|
||||
Anda Xu <anda.xu@docker.com>
|
||||
Anders F Björklund <anders.f.bjorklund@gmail.com>
|
||||
Andrea Bolognani <abologna@redhat.com>
|
||||
Andrea Luzzardi <aluzzardi@gmail.com>
|
||||
Andrew Chang <chang331006@gmail.com>
|
||||
Andrey Smirnov <smirnov.andrey@gmail.com>
|
||||
Andy Alt <andy5995@users.noreply.github.com>
|
||||
Andy Caldwell <andrew.caldwell@metaswitch.com>
|
||||
Ankush Agarwal <ankushagarwal11@gmail.com>
|
||||
Anthony Sottile <asottile@umich.edu>
|
||||
Anurag Goel <anurag@render.com>
|
||||
Anusha Ragunathan <anusha@docker.com>
|
||||
Arnaud Bailly <arnaud.oqube@gmail.com>
|
||||
Avi Deitcher <avi@deitcher.net>
|
||||
Bastiaan Bakker <bbakker@xebia.com>
|
||||
Ben Longo <benlongo9807@gmail.com>
|
||||
Bertrand Paquet <bertrand.paquet@gmail.com>
|
||||
Bin Liu <liubin0329@gmail.com>
|
||||
Brandon Mitchell <git@bmitch.net>
|
||||
Brian Goff <cpuguy83@gmail.com>
|
||||
Ce Gao <ce.gao@outlook.com>
|
||||
Chaerim Yeo <yeochaerim@gmail.com>
|
||||
Changwei Ge <gechangwei@bytedance.com>
|
||||
Chanhun Jeong <chanhun.jeong@navercorp.com>
|
||||
ChaosGramer <ChaosGramer@users.noreply.github.com>
|
||||
Charles Chan <charleswhchan@users.noreply.github.com>
|
||||
Charles Korn <me@charleskorn.com>
|
||||
Charles Law <claw@conduce.com>
|
||||
Chenbin <chen.bin11@zte.com.cn>
|
||||
Chris Goller <goller@gmail.com>
|
||||
Chris McKinnel <chrismckinnel@gmail.com>
|
||||
Christian Höltje <docwhat@gerf.org>
|
||||
Christian Weichel <chris@gitpod.io>
|
||||
Ciro S. Costa <cscosta@pivotal.io>
|
||||
Claudiu Belu <cbelu@cloudbasesolutions.com>
|
||||
Colin Chartier <colin.n.chartier@gmail.com>
|
||||
Corey Larson <corey@earthly.dev>
|
||||
Cory Bennett <cbennett@netflix.com>
|
||||
Cory Snider <csnider@mirantis.com>
|
||||
coryb <cbennett@netflix.com>
|
||||
CrazyMax <github@crazymax.dev>
|
||||
Csaba Apagyi <csaba.apagyi@gmail.com>
|
||||
Dan Duvall <dduvall@wikimedia.org>
|
||||
Daniel Cassidy <mail@danielcassidy.me.uk>
|
||||
Daniel Nephin <dnephin@gmail.com>
|
||||
Darren Shepherd <darren@rancher.com>
|
||||
Dave Chen <dave.chen@arm.com>
|
||||
Dave Henderson <dhenderson@gmail.com>
|
||||
Dave Tucker <dt@docker.com>
|
||||
David Calavera <david.calavera@gmail.com>
|
||||
David Dooling <dooling@gmail.com>
|
||||
David Gageot <david.gageot@docker.com>
|
||||
David Karlsson <david.karlsson@docker.com>
|
||||
Davis Schirmer <djds@bghost.xyz>
|
||||
Dennis Chen <dennis.chen@arm.com>
|
||||
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
|
||||
Derek McGowan <derek@mcgstyle.net>
|
||||
Dharmit Shah <shahdharmit@gmail.com>
|
||||
Ding Fei <dingfei@stars.org.cn>
|
||||
dito <itodaisuke00@gmail.com>
|
||||
Doug Davis <dug@us.ibm.com>
|
||||
Edgar Lee <edgarl@netflix.com>
|
||||
Edgar Lee <edgarhinshunlee@gmail.com>
|
||||
Eli Uriegas <eli.uriegas@docker.com>
|
||||
Elias Faxö <elias.faxo@tre.se>
|
||||
Eng Zer Jun <engzerjun@gmail.com>
|
||||
Eric Engestrom <eric@engestrom.ch>
|
||||
Erik Sipsma <erik@sipsma.dev>
|
||||
eyherabh <hugogabriel.eyherabide@gmail.com>
|
||||
f0 <f0@users.noreply.github.com>
|
||||
Fernando Miguel <github@FernandoMiguel.net>
|
||||
Fiona Klute <fiona.klute@gmx.de>
|
||||
Foysal Iqbal <foysal.iqbal.fb@gmail.com>
|
||||
Fred Cox <mcfedr@gmail.com>
|
||||
Frieder Bluemle <frieder.bluemle@gmail.com>
|
||||
Gabriel <samfiragabriel@gmail.com>
|
||||
Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
|
||||
Gaetan de Villele <gdevillele@gmail.com>
|
||||
Gahl Saraf <saraf.gahl@gmail.com>
|
||||
genglu.gl <luzigeng32@163.com>
|
||||
George <george@betterde.com>
|
||||
ggjulio <juligonz@student.42.fr>
|
||||
Govind Rai <raigovind93@gmail.com>
|
||||
Grant Reaber <grant.reaber@gmail.com>
|
||||
Guilhem C <guilhem.charles@gmail.com>
|
||||
Hans van den Bogert <hansbogert@gmail.com>
|
||||
Hao Hu <hao.hu.fr@gmail.com>
|
||||
Hector S <hfsam88@gmail.com>
|
||||
Helen Xie <chenjg@harmonycloud.cn>
|
||||
Himanshu Pandey <hpandey@pivotal.io>
|
||||
Hiromu Nakamura <abctail30@gmail.com>
|
||||
HowJMay <vulxj0j8j8@gmail.com>
|
||||
Hugo Santos <hugo@namespacelabs.com>
|
||||
Ian Campbell <ijc@docker.com>
|
||||
Ilya Dmitrichenko <errordeveloper@gmail.com>
|
||||
Iskander (Alex) Sharipov <quasilyte@gmail.com>
|
||||
Jacob Gillespie <jacobwgillespie@gmail.com>
|
||||
Jacob MacElroy <jacob@okteto.com>
|
||||
Jean-Pierre Huynh <jean-pierre.huynh@ounet.fr>
|
||||
Jeffrey Huang <jeffreyhuang23@gmail.com>
|
||||
Jesse Rittner <rittneje@gmail.com>
|
||||
Jessica Frazelle <acidburn@microsoft.com>
|
||||
jgeiger <jgeiger@gmail.com>
|
||||
Jitender Kumar <jitender.kumar@intel.com>
|
||||
jlecordier <jeanlecordier@hotmail.fr>
|
||||
joey <zchengjoey@gmail.com>
|
||||
John Howard <jhoward@microsoft.com>
|
||||
John Maguire <jmaguire@duosecurity.com>
|
||||
John Mulhausen <john@docker.com>
|
||||
John Tims <john.k.tims@gmail.com>
|
||||
Jon Zeolla <zeolla@gmail.com>
|
||||
Jonathan Azoff <azoff@users.noreply.github.com>
|
||||
Jonathan Giannuzzi <jonathan@giannuzzi.me>
|
||||
Jonathan Stoppani <jonathan.stoppani@divio.com>
|
||||
Jonny Stoten <jonny.stoten@docker.com>
|
||||
JordanGoasdoue <jordan.goasdoue@dailymotion.com>
|
||||
jroenf <jeroenfranse@gmail.com>
|
||||
Julian Goede <julian.goede@pm.me>
|
||||
Justas Brazauskas <brazauskasjustas@gmail.com>
|
||||
Justin Chadwell <me@jedevc.com>
|
||||
Justin Cormack <justin.cormack@docker.com>
|
||||
Justin Garrison <justin@linux.com>
|
||||
Jörg Franke <359489+NewJorg@users.noreply.github.com>
|
||||
Kang, Matthew <impulsecss@gmail.com>
|
||||
Kees Cook <keescook@chromium.org>
|
||||
Kevin Burke <kev@inburke.com>
|
||||
kevinmeredith <kevin.m.meredith@gmail.com>
|
||||
Kir Kolyshkin <kolyshkin@gmail.com>
|
||||
Kohei Tokunaga <ktokunaga.mail@gmail.com>
|
||||
Koichi Shiraishi <zchee.io@gmail.com>
|
||||
Kris-Mikael Krister <krismikael@protonmail.com>
|
||||
Kunal Kushwaha <kushwaha_kunal_v7@lab.ntt.co.jp>
|
||||
Kyle <Kylemit@gmail.com>
|
||||
l00397676 <lujingxiao@huawei.com>
|
||||
Lajos Papp <lalyos@yahoo.com>
|
||||
lalyos <lalyos@yahoo.com>
|
||||
Levi Harrison <levisamuelharrison@gmail.com>
|
||||
liwenqi <vikilwq@zju.edu.cn>
|
||||
lixiaobing10051267 <li.xiaobing1@zte.com.cn>
|
||||
lomot <lomot@qq.com>
|
||||
Lu Jingxiao <lujingxiao@huawei.com>
|
||||
Luca Visentin <luck.visentin@gmail.com>
|
||||
Maciej Kalisz <mdkalish@users.noreply.github.com>
|
||||
Madhav Puri <madhav.puri@gmail.com>
|
||||
Manu Gupta <manugupt1@gmail.com>
|
||||
Marcus Comstedt <marcus@mc.pp.se>
|
||||
Mark Gordon <msg555@gmail.com>
|
||||
Marko Kohtala <marko.kohtala@gmail.com>
|
||||
Mary Anthony <mary@docker.com>
|
||||
masibw <masi19bw@gmail.com>
|
||||
Matias Insaurralde <matias@insaurral.de>
|
||||
Matt Kang <impulsecss@gmail.com>
|
||||
Matt Rickard <mrick@google.com>
|
||||
Maxime Lagresle <maxime@angel.co>
|
||||
Michael Crosby <crosbymichael@gmail.com>
|
||||
Michael Friis <friism@gmail.com>
|
||||
Michael Irwin <mikesir87@gmail.com>
|
||||
Miguel Ángel Jimeno <miguelangel4b@gmail.com>
|
||||
Mihai Borobocea <MihaiBorob@gmail.com>
|
||||
Mike Brown <brownwm@us.ibm.com>
|
||||
mikelinjie <294893458@qq.com>
|
||||
Mikhail Vasin <vasin@cloud-tv.ru>
|
||||
Misty Stanley-Jones <misty@docker.com>
|
||||
Miyachi Katsuya <miyachi_katsuya@r.recruit.co.jp>
|
||||
Morgan Bauer <mbauer@us.ibm.com>
|
||||
Morlay <morlay.null@gmail.com>
|
||||
msg <msg@clinc.com>
|
||||
Nao YONASHIRO <yonashiro@r.recruit.co.jp>
|
||||
Natasha Jarus <linuxmercedes@gmail.com>
|
||||
Nathan Sullivan <nathan@nightsys.net>
|
||||
Nick Miyake <nmiyake@users.noreply.github.com>
|
||||
Nick Santos <nick.santos@docker.com>
|
||||
Nikhil Pandeti <nikhil.pandeti@utexas.edu>
|
||||
Noel Georgi <18496730+frezbo@users.noreply.github.com>
|
||||
Oliver Bristow <oliver.bristow@project-tracr.com>
|
||||
Omer Duchovne <79370724+od-cyera@users.noreply.github.com>
|
||||
Omer Mizrahi <ommizrah@microsoft.com>
|
||||
Ondrej Fabry <ofabry@cisco.com>
|
||||
Otto Kekäläinen <otto@seravo.fi>
|
||||
Pablo Chico de Guzman <pchico83@gmail.com>
|
||||
Patrick Hemmer <patrick.hemmer@gmail.com>
|
||||
Patrick Lang <plang@microsoft.com>
|
||||
Patrick Van Stee <patrick@vanstee.me>
|
||||
Paul "TBBle" Hampson <Paul.Hampson@Pobox.com>
|
||||
Paweł Gronowski <pawel.gronowski@docker.com>
|
||||
Peter Dave Hello <hsu@peterdavehello.org>
|
||||
Petr Fedchenkov <giggsoff@gmail.com>
|
||||
Phil Estes <estesp@gmail.com>
|
||||
Pierre Fenoll <pierrefenoll@gmail.com>
|
||||
pieterdd <pieterdd@users.noreply.github.com>
|
||||
Pranav Pandit <pranavp@microsoft.com>
|
||||
Pratik Raj <rajpratik71@gmail.com>
|
||||
Prayag Verma <prayag.verma@gmail.com>
|
||||
Qiang Huang <h.huangqiang@huawei.com>
|
||||
Remy Suen <remy.suen@gmail.com>
|
||||
Ri Xu <xuri.me@gmail.com>
|
||||
Rob Taylor <rob@shape.build>
|
||||
Robert Estelle <robertestelle@gmail.com>
|
||||
Rubens Figueiredo <r.figueiredo.52@gmail.com>
|
||||
Sam Whited <sam@samwhited.com>
|
||||
Sascha Schwarze <schwarzs@de.ibm.com>
|
||||
Sean P. Kane <spkane00@gmail.com>
|
||||
Sebastiaan van Stijn <github@gone.nl>
|
||||
Seiya Miyata <odradek38@gmail.com>
|
||||
Serhat Gülçiçek <serhat25@gmail.com>
|
||||
Sertac Ozercan <sozercan@gmail.com>
|
||||
Shev Yan <yandong_8212@163.com>
|
||||
Shijiang Wei <mountkin@gmail.com>
|
||||
Shingo Omura <everpeace@gmail.com>
|
||||
Shiwei Zhang <shizh@microsoft.com>
|
||||
Siebe Schaap <siebe@digibites.nl>
|
||||
Silvin Lubecki <31478878+silvin-lubecki@users.noreply.github.com>
|
||||
Simon Ferquel <simon.ferquel@docker.com>
|
||||
Slava Semushin <semushin@redhat.com>
|
||||
Solomon Hykes <sh.github.6811@hykes.org>
|
||||
squeegels <1674195+squeegels@users.noreply.github.com>
|
||||
Stefan Scherer <stefan.scherer@docker.com>
|
||||
Stefan Weil <sw@weilnetz.de>
|
||||
StefanSchoof <Stefan.Schoof@direkt-gruppe.de>
|
||||
Stepan Blyshchak <stepanblischak@gmail.com>
|
||||
Steve Lohr <schdief.law@gmail.com>
|
||||
sunchunming <sunchunming1@jd.com>
|
||||
Sven Dowideit <SvenDowideit@home.org.au>
|
||||
Takuya Noguchi <takninnovationresearch@gmail.com>
|
||||
Thomas Leonard <thomas.leonard@docker.com>
|
||||
Thomas Riccardi <riccardi@systran.fr>
|
||||
Thomas Shaw <tomwillfixit@users.noreply.github.com>
|
||||
Tianon Gravi <admwiggin@gmail.com>
|
||||
Tibor Vass <tibor@docker.com>
|
||||
Tiffany Jernigan <tiffany.f.j@gmail.com>
|
||||
Tim Waugh <twaugh@redhat.com>
|
||||
Tim Wraight <tim.wraight@tangentlabs.co.uk>
|
||||
Tino Rusch <tino.rusch@gmail.com>
|
||||
Tobias Klauser <tklauser@distanz.ch>
|
||||
Tomas Tomecek <ttomecek@redhat.com>
|
||||
Tomasz Kopczynski <tomek@kopczynski.net.pl>
|
||||
Tomohiro Kusumoto <zabio1192@gmail.com>
|
||||
Troels Liebe Bentsen <tlb@nversion.dk>
|
||||
Tõnis Tiigi <tonistiigi@gmail.com>
|
||||
Valentin Lorentz <progval+git@progval.net>
|
||||
Vasek - Tom C <tom.chauveau@epitech.eu>
|
||||
Victor Vieux <victorvieux@gmail.com>
|
||||
Victoria Bialas <victoria.bialas@docker.com>
|
||||
Vincent Demeester <vincent.demeester@docker.com>
|
||||
Vlad A. Ionescu <vladaionescu@users.noreply.github.com>
|
||||
Vladislav Ivanov <vlad@ivanov.email>
|
||||
Wang Yumu <37442693@qq.com>
|
||||
Wei Fu <fuweid89@gmail.com>
|
||||
Wei Zhang <kweizh@gmail.com>
|
||||
wingkwong <wingkwong.code@gmail.com>
|
||||
Xiaofan Zhang <xiaofan.zhang@clinc.com>
|
||||
Ximo Guanter <ximo.guanter@gmail.com>
|
||||
Yamazaki Masashi <masi19bw@gmail.com>
|
||||
Yan Song <imeoer@linux.alibaba.com>
|
||||
Yong Tang <yong.tang.github@outlook.com>
|
||||
Yuichiro Kaneko <spiketeika@gmail.com>
|
||||
Yurii Rashkovskii <yrashk@gmail.com>
|
||||
Zach Badgett <zach.badgett@gmail.com>
|
||||
zhangwenlong <zhangwenlong8911@163.com>
|
||||
Ziv Tsarfati <digger18@gmail.com>
|
||||
岁丰 <genglu.gl@antfin.com>
|
||||
沈陵 <shenling.yyb@alibaba-inc.com>
|
||||
郑泽宇 <perhapszzy@sina.com>
|
||||
|
24
vendor/github.com/moby/buildkit/frontend/dockerfile/dockerignore/dockerignore.go
generated
vendored
24
vendor/github.com/moby/buildkit/frontend/dockerfile/dockerignore/dockerignore.go
generated
vendored
@ -1,89 +0,0 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
azuriteBin = "azurite-blob"
|
||||
)
|
||||
|
||||
type AzuriteOpts struct {
|
||||
AccountName string
|
||||
AccountKey string
|
||||
}
|
||||
|
||||
func NewAzuriteServer(t *testing.T, sb Sandbox, opts AzuriteOpts) (address string, cl func() error, err error) {
|
||||
t.Helper()
|
||||
|
||||
if _, err := exec.LookPath(azuriteBin); err != nil {
|
||||
return "", nil, errors.Wrapf(err, "failed to lookup %s binary", azuriteBin)
|
||||
}
|
||||
|
||||
deferF := &multiCloser{}
|
||||
cl = deferF.F()
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
deferF.F()()
|
||||
cl = nil
|
||||
}
|
||||
}()
|
||||
|
||||
l, err := net.Listen("tcp", "localhost:0")
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
addr := l.Addr().String()
|
||||
if err = l.Close(); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
host, port, err := net.SplitHostPort(addr)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
address = fmt.Sprintf("http://%s/%s", addr, opts.AccountName)
|
||||
|
||||
// start server
|
||||
cmd := exec.Command(azuriteBin, "--disableProductStyleUrl", "--blobHost", host, "--blobPort", port, "--location", t.TempDir())
|
||||
cmd.Env = append(os.Environ(), []string{
|
||||
"AZURITE_ACCOUNTS=" + opts.AccountName + ":" + opts.AccountKey,
|
||||
}...)
|
||||
azuriteStop, err := startCmd(cmd, sb.Logs())
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
if err = waitAzurite(address, 15*time.Second); err != nil {
|
||||
azuriteStop()
|
||||
return "", nil, errors.Wrapf(err, "azurite did not start up: %s", formatLogs(sb.Logs()))
|
||||
}
|
||||
deferF.append(azuriteStop)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func waitAzurite(address string, d time.Duration) error {
|
||||
step := 1 * time.Second
|
||||
i := 0
|
||||
for {
|
||||
if resp, err := http.Get(fmt.Sprintf("%s?comp=list", address)); err == nil {
|
||||
resp.Body.Close()
|
||||
break
|
||||
}
|
||||
i++
|
||||
if time.Duration(i)*step > d {
|
||||
return errors.Errorf("failed dialing: %s", address)
|
||||
}
|
||||
time.Sleep(step)
|
||||
}
|
||||
return nil
|
||||
}
|
@ -1,116 +0,0 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"os/exec"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
const (
|
||||
minioBin = "minio"
|
||||
mcBin = "mc"
|
||||
)
|
||||
|
||||
type MinioOpts struct {
|
||||
Region string
|
||||
AccessKeyID string
|
||||
SecretAccessKey string
|
||||
}
|
||||
|
||||
func NewMinioServer(t *testing.T, sb Sandbox, opts MinioOpts) (address string, bucket string, cl func() error, err error) {
|
||||
t.Helper()
|
||||
bucket = randomString(10)
|
||||
|
||||
if _, err := exec.LookPath(minioBin); err != nil {
|
||||
return "", "", nil, errors.Wrapf(err, "failed to lookup %s binary", minioBin)
|
||||
}
|
||||
if _, err := exec.LookPath(mcBin); err != nil {
|
||||
return "", "", nil, errors.Wrapf(err, "failed to lookup %s binary", mcBin)
|
||||
}
|
||||
|
||||
deferF := &multiCloser{}
|
||||
cl = deferF.F()
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
deferF.F()()
|
||||
cl = nil
|
||||
}
|
||||
}()
|
||||
|
||||
l, err := net.Listen("tcp", "localhost:0")
|
||||
if err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
addr := l.Addr().String()
|
||||
if err = l.Close(); err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
address = "http://" + addr
|
||||
|
||||
// start server
|
||||
cmd := exec.Command(minioBin, "server", "--json", "--address", addr, t.TempDir())
|
||||
cmd.Env = append(os.Environ(), []string{
|
||||
"MINIO_ROOT_USER=" + opts.AccessKeyID,
|
||||
"MINIO_ROOT_PASSWORD=" + opts.SecretAccessKey,
|
||||
}...)
|
||||
minioStop, err := startCmd(cmd, sb.Logs())
|
||||
if err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
if err = waitMinio(address, 15*time.Second); err != nil {
|
||||
minioStop()
|
||||
return "", "", nil, errors.Wrapf(err, "minio did not start up: %s", formatLogs(sb.Logs()))
|
||||
}
|
||||
deferF.append(minioStop)
|
||||
|
||||
// create alias config
|
||||
alias := randomString(10)
|
||||
cmd = exec.Command(mcBin, "alias", "set", alias, address, opts.AccessKeyID, opts.SecretAccessKey)
|
||||
if err := runCmd(cmd, sb.Logs()); err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
deferF.append(func() error {
|
||||
return exec.Command(mcBin, "alias", "rm", alias).Run()
|
||||
})
|
||||
|
||||
// create bucket
|
||||
cmd = exec.Command(mcBin, "mb", "--region", opts.Region, fmt.Sprintf("%s/%s", alias, bucket)) // #nosec G204
|
||||
if err := runCmd(cmd, sb.Logs()); err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
|
||||
// trace
|
||||
cmd = exec.Command(mcBin, "admin", "trace", "--json", alias)
|
||||
traceStop, err := startCmd(cmd, sb.Logs())
|
||||
if err != nil {
|
||||
return "", "", nil, err
|
||||
}
|
||||
deferF.append(traceStop)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func waitMinio(address string, d time.Duration) error {
|
||||
step := 1 * time.Second
|
||||
i := 0
|
||||
for {
|
||||
if resp, err := http.Get(fmt.Sprintf("%s/minio/health/live", address)); err == nil {
|
||||
resp.Body.Close()
|
||||
break
|
||||
}
|
||||
i++
|
||||
if time.Duration(i)*step > d {
|
||||
return errors.Errorf("failed dialing: %s", address)
|
||||
}
|
||||
time.Sleep(step)
|
||||
}
|
||||
return nil
|
||||
}
|
@ -1,15 +1,16 @@
|
||||
package integration
|
||||
|
||||
var pins = map[string]map[string]string{
|
||||
// busybox is pinned to 1.35. Newer produces has "illegal instruction" panic on some of Github infra on sha256sum
|
||||
// busybox 1.36
|
||||
"busybox:latest": {
|
||||
"amd64": "sha256:0d5a701f0ca53f38723108687add000e1922f812d4187dea7feaee85d2f5a6c5",
|
||||
"arm64v8": "sha256:ffe38d75e44d8ffac4cd6d09777ffc31e94ea0ded6a0164e825a325dc17a3b68",
|
||||
"library": "sha256:f4ed5f2163110c26d42741fdc92bd1710e118aed4edb19212548e8ca4e5fca22",
|
||||
"amd64": "sha256:023917ec6a886d0e8e15f28fb543515a5fcd8d938edb091e8147db4efed388ee",
|
||||
"arm64v8": "sha256:1fa89c01cd0473cedbd1a470abb8c139eeb80920edf1bc55de87851bfb63ea11",
|
||||
"library": "sha256:3fbc632167424a6d997e74f52b878d7cc478225cffac6bc977eedfe51c7f4e79",
|
||||
},
|
||||
// alpine 3.18
|
||||
"alpine:latest": {
|
||||
"amd64": "sha256:c0d488a800e4127c334ad20d61d7bc21b4097540327217dfab52262adc02380c",
|
||||
"arm64v8": "sha256:af06af3514c44a964d3b905b498cf6493db8f1cde7c10e078213a89c87308ba0",
|
||||
"library": "sha256:8914eb54f968791faf6a8638949e480fef81e697984fba772b3976835194c6d4",
|
||||
"amd64": "sha256:25fad2a32ad1f6f510e528448ae1ec69a28ef81916a004d3629874104f8a7f70",
|
||||
"arm64v8": "sha256:e3bd82196e98898cae9fe7fbfd6e2436530485974dc4fb3b7ddb69134eda2407",
|
||||
"library": "sha256:82d1e9d7ed48a7523bdebc18cf6290bdb97b82302a8a9c27d4fe885949ea94d1",
|
||||
},
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package integration
|
||||
|
||||
import "syscall"
|
||||
|
||||
func getSysProcAttr() *syscall.SysProcAttr {
|
||||
return &syscall.SysProcAttr{
|
||||
Setsid: true, // stretch sudo needs this for sigterm
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package integration
|
||||
|
||||
import "syscall"
|
||||
|
||||
func getSysProcAttr() *syscall.SysProcAttr {
|
||||
return &syscall.SysProcAttr{}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package workers
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type backend struct {
|
||||
address string
|
||||
dockerAddress string
|
||||
containerdAddress string
|
||||
rootless bool
|
||||
snapshotter string
|
||||
unsupportedFeatures []string
|
||||
isDockerd bool
|
||||
}
|
||||
|
||||
func (b backend) Address() string {
|
||||
return b.address
|
||||
}
|
||||
|
||||
func (b backend) DockerAddress() string {
|
||||
return b.dockerAddress
|
||||
}
|
||||
|
||||
func (b backend) ContainerdAddress() string {
|
||||
return b.containerdAddress
|
||||
}
|
||||
|
||||
func (b backend) Rootless() bool {
|
||||
return b.rootless
|
||||
}
|
||||
|
||||
func (b backend) Snapshotter() string {
|
||||
return b.snapshotter
|
||||
}
|
||||
|
||||
func (b backend) Supports(feature string) bool {
|
||||
if enabledFeatures := os.Getenv("BUILDKIT_TEST_ENABLE_FEATURES"); enabledFeatures != "" {
|
||||
for _, enabledFeature := range strings.Split(enabledFeatures, ",") {
|
||||
if feature == enabledFeature {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
if disabledFeatures := os.Getenv("BUILDKIT_TEST_DISABLE_FEATURES"); disabledFeatures != "" {
|
||||
for _, disabledFeature := range strings.Split(disabledFeatures, ",") {
|
||||
if feature == disabledFeature {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
for _, unsupportedFeature := range b.unsupportedFeatures {
|
||||
if feature == unsupportedFeature {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package workers
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/moby/buildkit/util/testutil/integration"
|
||||
)
|
||||
|
||||
const (
|
||||
FeatureCacheExport = "cache_export"
|
||||
FeatureCacheImport = "cache_import"
|
||||
FeatureCacheBackendAzblob = "cache_backend_azblob"
|
||||
FeatureCacheBackendGha = "cache_backend_gha"
|
||||
FeatureCacheBackendInline = "cache_backend_inline"
|
||||
FeatureCacheBackendLocal = "cache_backend_local"
|
||||
FeatureCacheBackendRegistry = "cache_backend_registry"
|
||||
FeatureCacheBackendS3 = "cache_backend_s3"
|
||||
FeatureDirectPush = "direct_push"
|
||||
FeatureFrontendOutline = "frontend_outline"
|
||||
FeatureFrontendTargets = "frontend_targets"
|
||||
FeatureImageExporter = "image_exporter"
|
||||
FeatureInfo = "info"
|
||||
FeatureMergeDiff = "merge_diff"
|
||||
FeatureMultiCacheExport = "multi_cache_export"
|
||||
FeatureMultiPlatform = "multi_platform"
|
||||
FeatureOCIExporter = "oci_exporter"
|
||||
FeatureOCILayout = "oci_layout"
|
||||
FeatureProvenance = "provenance"
|
||||
FeatureSBOM = "sbom"
|
||||
FeatureSecurityMode = "security_mode"
|
||||
FeatureSourceDateEpoch = "source_date_epoch"
|
||||
FeatureCNINetwork = "cni_network"
|
||||
)
|
||||
|
||||
var features = map[string]struct{}{
|
||||
FeatureCacheExport: {},
|
||||
FeatureCacheImport: {},
|
||||
FeatureCacheBackendAzblob: {},
|
||||
FeatureCacheBackendGha: {},
|
||||
FeatureCacheBackendInline: {},
|
||||
FeatureCacheBackendLocal: {},
|
||||
FeatureCacheBackendRegistry: {},
|
||||
FeatureCacheBackendS3: {},
|
||||
FeatureDirectPush: {},
|
||||
FeatureFrontendOutline: {},
|
||||
FeatureFrontendTargets: {},
|
||||
FeatureImageExporter: {},
|
||||
FeatureInfo: {},
|
||||
FeatureMergeDiff: {},
|
||||
FeatureMultiCacheExport: {},
|
||||
FeatureMultiPlatform: {},
|
||||
FeatureOCIExporter: {},
|
||||
FeatureOCILayout: {},
|
||||
FeatureProvenance: {},
|
||||
FeatureSBOM: {},
|
||||
FeatureSecurityMode: {},
|
||||
FeatureSourceDateEpoch: {},
|
||||
FeatureCNINetwork: {},
|
||||
}
|
||||
|
||||
func CheckFeatureCompat(t *testing.T, sb integration.Sandbox, reason ...string) {
|
||||
integration.CheckFeatureCompat(t, sb, features, reason...)
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
//go:build !windows
|
||||
// +build !windows
|
||||
|
||||
package workers
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func getSysProcAttr() *syscall.SysProcAttr {
|
||||
return &syscall.SysProcAttr{
|
||||
Setsid: true, // stretch sudo needs this for sigterm
|
||||
}
|
||||
}
|
||||
|
||||
func getBuildkitdAddr(tmpdir string) string {
|
||||
return "unix://" + filepath.Join(tmpdir, "buildkitd.sock")
|
||||
}
|
||||
|
||||
func getTraceSocketPath(tmpdir string) string {
|
||||
return filepath.Join(tmpdir, "otel-grpc.sock")
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
//go:build windows
|
||||
// +build windows
|
||||
|
||||
package workers
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func getSysProcAttr() *syscall.SysProcAttr {
|
||||
return &syscall.SysProcAttr{}
|
||||
}
|
||||
|
||||
func getBuildkitdAddr(tmpdir string) string {
|
||||
return "//./pipe/buildkitd-" + filepath.Base(tmpdir)
|
||||
}
|
||||
|
||||
func getTraceSocketPath(tmpdir string) string {
|
||||
return `\\.\pipe\buildkit-otel-grpc-` + filepath.Base(tmpdir)
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package workers
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"context"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/moby/buildkit/util/testutil/integration"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
func requireRoot() error {
|
||||
if os.Getuid() != 0 {
|
||||
return errors.Wrap(integration.ErrRequirements, "requires root")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func runBuildkitd(ctx context.Context, conf *integration.BackendConfig, args []string, logs map[string]*bytes.Buffer, uid, gid int, extraEnv []string) (address string, cl func() error, err error) {
|
||||
deferF := &integration.MultiCloser{}
|
||||
cl = deferF.F()
|
||||
|
||||
defer func() {
|
||||
if err != nil {
|
||||
deferF.F()()
|
||||
cl = nil
|
||||
}
|
||||
}()
|
||||
|
||||
if conf.ConfigFile != "" {
|
||||
args = append(args, "--config="+conf.ConfigFile)
|
||||
}
|
||||
|
||||
tmpdir, err := os.MkdirTemp("", "bktest_buildkitd")
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
if err := os.Chown(tmpdir, uid, gid); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
if err := os.MkdirAll(filepath.Join(tmpdir, "tmp"), 0711); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
if err := os.Chown(filepath.Join(tmpdir, "tmp"), uid, gid); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
deferF.Append(func() error { return os.RemoveAll(tmpdir) })
|
||||
|
||||
address = getBuildkitdAddr(tmpdir)
|
||||
|
||||
args = append(args, "--root", tmpdir, "--addr", address, "--debug")
|
||||
cmd := exec.Command(args[0], args[1:]...) //nolint:gosec // test utility
|
||||
cmd.Env = append(os.Environ(), "BUILDKIT_DEBUG_EXEC_OUTPUT=1", "BUILDKIT_DEBUG_PANIC_ON_ERROR=1", "BUILDKIT_TRACE_SOCKET="+getTraceSocketPath(tmpdir), "TMPDIR="+filepath.Join(tmpdir, "tmp"))
|
||||
cmd.Env = append(cmd.Env, extraEnv...)
|
||||
cmd.SysProcAttr = getSysProcAttr()
|
||||
|
||||
stop, err := integration.StartCmd(cmd, logs)
|
||||
if err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
deferF.Append(stop)
|
||||
|
||||
if err := integration.WaitUnix(address, 15*time.Second, cmd); err != nil {
|
||||
return "", nil, err
|
||||
}
|
||||
|
||||
deferF.Append(func() error {
|
||||
f, err := os.Open("/proc/self/mountinfo")
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "failed to open mountinfo")
|
||||
}
|
||||
defer f.Close()
|
||||
s := bufio.NewScanner(f)
|
||||
for s.Scan() {
|
||||
if strings.Contains(s.Text(), tmpdir) {
|
||||
return errors.Errorf("leaked mountpoint for %s", tmpdir)
|
||||
}
|
||||
}
|
||||
return s.Err()
|
||||
})
|
||||
|
||||
return address, cl, err
|
||||
}
|
Loading…
Reference in New Issue