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

feat: display artifact branch #4

Merged
merged 2 commits into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 12 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
# Auto detect text files and perform LF normalization
* text=auto

# Collapse vendored and generated files on GitHub
# Collapse generated files on GitHub
vendor/* linguist-vendored
*/vendor/* linguist-vendored
*.gen.* linguist-generated
gen.sum linguist-generated
go.mod linguist-generated
go.sum linguist-generated
*.gen.go linguist-generated
*.gen.yml linguist-generated
*.gen.graphql linguist-generated
*.pb.go linguist-generated
*pb_test.go linguist-generated
*.pb.js linguist-generated
*.pb.d.ts linguist-generated
yarn.lock linguist-generated
*.gen.js linguist-generated

# Reduce conflicts on markdown files
*.md merge=union
2 changes: 1 addition & 1 deletion api/yolo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ message Artifact {
State state = 8 [(gogoproto.moretags) = "quad:\"schema:state,optional\""];
Kind kind = 9 [(gogoproto.moretags) = "quad:\"schema:kind,optional\""];

string has_build = 101 [(gogoproto.moretags) = "quad:\"hasBuild,optional\"", (gogoproto.casttype) = "github.com/cayleygraph/quad.IRI"];
Build has_build = 101 [(gogoproto.moretags) = "quad:\"hasBuild,optional\""];

enum State {
UnknownState = 0;
Expand Down
2 changes: 1 addition & 1 deletion buildkite.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ func buildkiteArtifactsToBatch(artifacts []buildkite.Artifact, build buildkite.B
LocalPath: *artifact.Path,
DownloadUrl: *artifact.DownloadURL,
MimeType: *artifact.MimeType,
HasBuild: &Build{ID: quad.IRI(*build.WebURL)},
// FIXME: Sha1Sum: *artifact.Sha1Sum,
HasBuild: quad.IRI(*build.WebURL),
}
switch filepath.Ext(newArtifact.LocalPath) {
case ".ipa":
Expand Down
2 changes: 1 addition & 1 deletion gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ <h1 class="jumbotron-heading">Yolo World!</h1>
<div class="col-md-4">
<div class="card mb-4 box-shadow">
<div class="card-body">
<p class="card-text">{{has_build}}</a>
<p class="card-text"><small class="text-muted">{{local_path}}</small></p>
<p class="card-text"><small class="text-muted">{{created_at}}</small></p>
<p class="card-text"><small class="text-muted">{{state}}</small></p>
<p class="card-text">{{has_build.id}}</a>
<p class="card-text"><small class="text-muted">branch: {{has_build.branch}}</small></p>
<p class="card-text"><small class="text-muted">message: {{has_build.message}}</small></p>
<p class="card-text"><small class="text-muted">path: {{local_path}}</small></p>
<p class="card-text"><small class="text-muted">date: {{created_at}}</small></p>
<p class="card-text"><small class="text-muted">state: {{state}}</small></p>
<div class="d-flex justify-content-between align-items-center">
<div class="btn-group">
<a type="button" class="btn btn-sm btn-outline-secondary" href="/api/artifact-dl?id={{id}}">DL</a>
Expand Down
205 changes: 107 additions & 98 deletions yolo.pb.go

Large diffs are not rendered by default.