-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2040 from buildkite/polyglot-hooks
Experiment: Polyglot hooks
- Loading branch information
Showing
25 changed files
with
549 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
FROM golang:1.20.4@sha256:6876eff5b20336c5c2896b0c3055f3258bdeba7aa38bbdabcb5a4abb5cdd39c7 | ||
COPY build/ssh.conf /etc/ssh/ssh_config.d/ | ||
RUN go install github.com/google/go-licenses@latest | ||
|
||
# Ruby used for polyglot hook integration tests | ||
RUN apt update && apt install -y ruby |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"log" | ||
|
||
"github.com/buildkite/agent/v3/jobapi" | ||
) | ||
|
||
// This file gets built and commited to this repo, then used as part of the hooks integration test to ensure that the | ||
// bootstrap can run binary hooks | ||
func main() { | ||
c, err := jobapi.NewDefaultClient(context.TODO()) | ||
if err != nil { | ||
log.Fatalf("error: %v", fmt.Errorf("creating job api client: %w", err)) | ||
} | ||
|
||
_, err = c.EnvUpdate(context.TODO(), &jobapi.EnvUpdateRequest{ | ||
Env: map[string]string{ | ||
"OCEAN": "Pacífico", | ||
"MOUNTAIN": "chimborazo", | ||
}, | ||
}) | ||
|
||
if err != nil { | ||
log.Fatalf("error: %v", fmt.Errorf("updating env: %w", err)) | ||
} | ||
|
||
fmt.Println("hi there from golang 🌊") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.