-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add flag to request and gather a flamegraph (#299)
- Loading branch information
1 parent
af4c0f9
commit 818bc30
Showing
4 changed files
with
67 additions
and
1 deletion.
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
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,32 @@ | ||
# Build the dummy Dockerfile | ||
exec docker build -qt flamegraph-updater . | ||
|
||
# Run the dependabot command | ||
dependabot update go_modules dependabot/cli --updater-image flamegraph-updater --flamegraph | ||
|
||
# There should be a flamegraph file in the current directory | ||
exists flamegraph.html | ||
|
||
exec docker rmi -f flamegraph-updater | ||
|
||
-- Dockerfile -- | ||
FROM ubuntu:22.04 | ||
|
||
RUN useradd dependabot | ||
|
||
COPY --chown=dependabot --chmod=755 update-ca-certificates /usr/bin/update-ca-certificates | ||
COPY --chown=dependabot --chmod=755 run bin/run | ||
|
||
-- update-ca-certificates -- | ||
#!/usr/bin/env bash | ||
|
||
echo "Updated those certificates for ya" | ||
|
||
-- run -- | ||
#!/usr/bin/env bash | ||
|
||
# if there's an environment variable "FLAMEGRAPH" set, create a fake flamegraph in tmp | ||
if [ -n "$FLAMEGRAPH" ]; then | ||
echo "Creating flamegraph" | ||
echo "fake flamegraph" > /tmp/dependabot-flamegraph.html | ||
fi |