Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing changes from last PR #58

Merged
merged 48 commits into from
Dec 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1a2193b
Add builder workflow
maxmcd Dec 3, 2021
0b50100
workflow dispatch
maxmcd Dec 3, 2021
1b6e394
ci debug
maxmcd Dec 4, 2021
e76b60d
inputs
maxmcd Dec 5, 2021
2d7d58c
fixed
maxmcd Dec 5, 2021
f782629
Add register
maxmcd Dec 5, 2021
a39c7ee
syntax
maxmcd Dec 5, 2021
d1b370e
remove ssh
maxmcd Dec 5, 2021
d5a91bc
run_id with template format
maxmcd Dec 6, 2021
63e6650
builder-worker working
maxmcd Dec 8, 2021
c53d3dd
better
maxmcd Dec 8, 2021
f85bf7b
can I?
maxmcd Dec 8, 2021
202e46c
nope
maxmcd Dec 8, 2021
b3d29c8
try new build
maxmcd Dec 8, 2021
ef62bfa
Add releases to builds
maxmcd Dec 8, 2021
7db3e04
sudo
maxmcd Dec 8, 2021
eefa829
try without upgrade
maxmcd Dec 8, 2021
82e54f0
quick edits
maxmcd Dec 8, 2021
7b9c116
remove musl check
maxmcd Dec 8, 2021
927b429
try a release
maxmcd Dec 8, 2021
eb14075
try and fix a release
maxmcd Dec 8, 2021
ed7fbdf
explicit
maxmcd Dec 8, 2021
fac44b3
add linux headers generic
maxmcd Dec 8, 2021
a747c41
upgrade
maxmcd Dec 8, 2021
e0d4e97
upgrade for real
maxmcd Dec 8, 2021
96bc7e4
try docker
maxmcd Dec 8, 2021
12437af
relative to build dir
maxmcd Dec 8, 2021
f9d1166
fine
maxmcd Dec 8, 2021
21aac80
missing file
maxmcd Dec 8, 2021
aa1ce95
no tty
maxmcd Dec 8, 2021
03227f8
prepare for merge
maxmcd Dec 8, 2021
261d977
upload
maxmcd Dec 8, 2021
f70e34b
more logs
maxmcd Dec 8, 2021
3caff72
add install to separate section
maxmcd Dec 8, 2021
ac8a999
does this build everything?
maxmcd Dec 8, 2021
6c1583f
naming
maxmcd Dec 8, 2021
9d307bb
specific builder
maxmcd Dec 9, 2021
8d32c89
tmate
maxmcd Dec 9, 2021
cf0d59c
is it explicit?
maxmcd Dec 9, 2021
d0d7b1f
ah
maxmcd Dec 9, 2021
ad7fd8f
intentional error
maxmcd Dec 9, 2021
0cd675c
register earlier
maxmcd Dec 9, 2021
facd340
intentional error
maxmcd Dec 9, 2021
0d8799b
intentional error
maxmcd Dec 9, 2021
7838475
publish complete
maxmcd Dec 9, 2021
85c2fc3
Missed from PR
maxmcd Dec 9, 2021
c06fe35
Merge branch 'main' into infra-2
maxmcd Dec 9, 2021
9cdd865
move builder to main branch, move secrets to default environment
maxmcd Dec 9, 2021
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
1 change: 0 additions & 1 deletion .github/workflows/builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
name: Building Package
jobs:
build:
environment: builder
runs-on: ubuntu-latest
steps:
- name: Register
Expand Down
2 changes: 1 addition & 1 deletion infra/builder-worker/src/builder-worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class BuilderWorker {
owner: "maxmcd",
repo: "bramble",
workflow_id: ".github/workflows/builder.yml",
ref: "infra-2",
ref: "main",
inputs: { ...body, JobID: id },
},
);
Expand Down
1 change: 0 additions & 1 deletion internal/command/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ their public functions with documentation. If an immediate subdirectory has a
drvs = append(drvs, drv)
}
// TODO: replace with something generally usable
fmt.Println(len(os.Getenv("DIGITALOCEAN_SPACES_ACCESS_ID")), len(os.Getenv("DIGITALOCEAN_SPACES_SECRET_KEY")))
s3 := simples3.New("",
os.Getenv("DIGITALOCEAN_SPACES_ACCESS_ID"),
os.Getenv("DIGITALOCEAN_SPACES_SECRET_KEY"))
Expand Down
63 changes: 31 additions & 32 deletions internal/command/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
Expand Down Expand Up @@ -133,37 +132,37 @@ func TestRun(t *testing.T) {
}
}

func TestDep_handler(t *testing.T) {
initIntegrationTest(t)
app := cliApp(".")
ctx, cancel := context.WithCancel(context.Background())
errChan := make(chan error)
test.SetEnv(t, "BRAMBLE_PATH", t.TempDir())
go func() {
if err := app.RunContext(ctx, []string{"bramble", "server"}); err != nil {
errChan <- err
}
}()
t.Cleanup(func() { cancel() })
for {
resp, _ := http.Get("http://localhost:2726")
if resp != nil {
resp.Body.Close()
}
if resp != nil && resp.StatusCode == http.StatusNotFound {
break
}
select {
case err := <-errChan:
t.Fatal(err)
default:
}
}
// TODO: this actually pulls from github, no network access in tests
if err := app.RunContext(ctx, []string{"bramble", "publish", "github.com/maxmcd/busybox"}); err != nil {
t.Fatal(err)
}
}
// TODO: don't hit the real build server
// func TestDep_handler(t *testing.T) {
// initIntegrationTest(t)
// app := cliApp(".")
// ctx, cancel := context.WithCancel(context.Background())
// errChan := make(chan error)
// test.SetEnv(t, "BRAMBLE_PATH", t.TempDir())
// go func() {
// if err := app.RunContext(ctx, []string{"bramble", "server"}); err != nil {
// errChan <- err
// }
// }()
// t.Cleanup(func() { cancel() })
// for {
// resp, _ := http.Get("http://localhost:2726")
// if resp != nil {
// resp.Body.Close()
// }
// if resp != nil && resp.StatusCode == http.StatusNotFound {
// break
// }
// select {
// case err := <-errChan:
// t.Fatal(err)
// default:
// }
// }
// if err := app.RunContext(ctx, []string{"bramble", "publish", "github.com/maxmcd/busybox"}); err != nil {
// t.Fatal(err)
// }
// }

func TestBuildAllFunction(t *testing.T) {
initIntegrationTest(t)
Expand Down
7 changes: 0 additions & 7 deletions internal/dependency/dependency.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,13 @@ func PostJob(ctx context.Context, url, pkg, reference string) (err error) {
return err
}
dur := (time.Millisecond * 1000)
count := 0
fmt.Println("Waiting for build result...")
for {
select {
case <-ctx.Done():
return context.Canceled
default:
}
if count > 5 {
// Many jobs finish quickly, but if they don't, we can check less
// often
dur = time.Second
}
job, err := dc.getJob(context.Background(), id)
if err != nil {
return err
Expand All @@ -197,7 +191,6 @@ func PostJob(ctx context.Context, url, pkg, reference string) (err error) {
fmt.Printf("Build complete in %s\n", job.End.Sub(job.Start))
break
}
count++
time.Sleep(dur)
}
return nil
Expand Down