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

Remove stackdriver debugger #375

Merged
merged 1 commit into from
Feb 9, 2024
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
11 changes: 0 additions & 11 deletions .github/pipeline-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@ docker_credentials:
password: ${{ secrets.PAKETO_BUILDPACKS_DOCKERHUB_PASSWORD }}

dependencies:
- id: google-stackdriver-debugger-java
uses: docker://ghcr.io/paketo-buildpacks/actions/github-release-dependency:main
with:
glob: cdbg_java_agent_gce\.tar\.gz
owner: GoogleCloudPlatform
repository: cloud-debug-java
token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }}
- id: google-stackdriver-debugger-nodejs
uses: docker://ghcr.io/paketo-buildpacks/actions/npm-dependency:main
with:
package: "@google-cloud/debug-agent"
- id: google-stackdriver-profiler-java
uses: docker://ghcr.io/paketo-buildpacks/actions/google-stackdriver-profiler-dependency:main
- id: google-stackdriver-profiler-nodejs
Expand Down
122 changes: 0 additions & 122 deletions .github/workflows/pb-update-google-stackdriver-debugger-java.yml

This file was deleted.

119 changes: 0 additions & 119 deletions .github/workflows/pb-update-google-stackdriver-debugger-nodejs.yml

This file was deleted.

29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,45 @@
# `gcr.io/paketo-buildpacks/google-stackdriver`
The Paketo Buildpack for Google Stackdriver is a Cloud Native Buildpack that contributes Stackdriver agents and configures them to connect to the service.

The Paketo Buildpack for Google Stackdriver is a Cloud Native Buildpack that contributes Stackdriver profiler agent and configure it to connect to the service.

## Behavior

This buildpack will participate if any of the following conditions are met

* A binding exists with `type` of `StackdriverDebugger`
* A binding exists with `type` of `StackdriverProfiler`

The buildpack will do the following for Java applications:

* If `StackdriverDebugger` binding exists contributes a Java debugger agent to a layer and configures `$JAVA_TOOL_OPTIONS` to use it
* If `StackdriverProfiler` binding exists contributes a Java profiler agent to a layer and configures `$JAVA_TOOL_OPTIONS` to use it
* Sets `$GOOGLE_APPLICATION_CREDENTIALS` to the path of the `ApplicationCredentials` secret

The buildpack will do the following for NodeJS applications:

* If `StackdriverDebugger` binding exists
* Contributes a NodeJS debugger agent to a layer and configures `$NODE_MODULES` to use it
* If main module does not already require `@google-cloud/debug-agent` module, prepends the main module with `require('@google-cloud/debug-agent').start();`
* If `StackdriverProfiler` binding exists
* Contributes a NodeJS profiler agent to a layer and configures `$NODE_MODULES` to use it
* If main module does not already require `@google-cloud/profiler` module, prepends the main module with `require('@google-cloud/profiler').start();`
* Sets `$GOOGLE_APPLICATION_CREDENTIALS` to the path of the `ApplicationCredentials` secret

## Configuration
| Environment Variable | Description
| -------------------- | -----------
| `$BPL_GOOGLE_STACKDRIVER_MODULE` | Configure the name of the application. Defaults to `default-module`.
| `$BPL_GOOGLE_STACKDRIVER_PROJECT_ID` | Configure the project id for the application. Defaults to `<EMPTY>`.
| `$BPL_GOOGLE_STACKDRIVER_VERSION` | Configure the version of the application. Defaults to `<EMPTY>`.

| Environment Variable | Description |
| ------------------------------------ | --------------------------------------------------------------------- |
| `$BPL_GOOGLE_STACKDRIVER_MODULE` | Configure the name of the application. Defaults to `default-module`. |
| `$BPL_GOOGLE_STACKDRIVER_PROJECT_ID` | Configure the project id for the application. Defaults to `<EMPTY>`. |
| `$BPL_GOOGLE_STACKDRIVER_VERSION` | Configure the version of the application. Defaults to `<EMPTY>`. |

## Bindings

The buildpack optionally accepts the following bindings:

### Type: `dependency-mapping`
|Key | Value | Description
|----------------------|---------|------------
|`<dependency-digest>` | `<uri>` | If needed, the buildpack will fetch the dependency with digest `<dependency-digest>` from `<uri>`

| Key | Value | Description |
| --------------------- | ------- | ------------------------------------------------------------------------------------------------- |
| `<dependency-digest>` | `<uri>` | If needed, the buildpack will fetch the dependency with digest `<dependency-digest>` from `<uri>` |

## License

This buildpack is released under version 2.0 of the [Apache License][a].

[a]: http://www.apache.org/licenses/LICENSE-2.0
Expand Down
46 changes: 4 additions & 42 deletions buildpack.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2018-2020 the original author or authors.
# Copyright 2018-2024 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -47,45 +47,13 @@ api = "0.7"
launch = true
name = "BPL_GOOGLE_STACKDRIVER_VERSION"

[[metadata.dependencies]]
cpes = ["cpe:2.3:a:google:google-stackdriver-debugger-java:4.1.0:*:*:*:*:*:*:*"]
id = "google-stackdriver-debugger-java"
name = "Google Stackdriver Debugger Java Agent"
purl = "pkg:generic/[email protected]"
sha256 = "931e8d5301828bb3ee1ba5948308eb678f33aa148a5381768263ac9fa0fa6349"
source = "https://github.com/GoogleCloudPlatform/cloud-debug-java/archive/refs/tags/v4.1.tar.gz"
source-sha256 = "d676df0e195457797284cd2da8e450da54b030b70135e3157358feff7d1d1b88"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://github.com/GoogleCloudPlatform/cloud-debug-java/releases/download/v4.1/cdbg_java_agent_gce.tar.gz"
version = "4.1.0"

[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/GoogleCloudPlatform/cloud-debug-java/blob/master/LICENSE"

[[metadata.dependencies]]
cpes = ["cpe:2.3:a:google:google-stackdriver-debugger-nodejs:9.0.1:*:*:*:*:*:*:*"]
id = "google-stackdriver-debugger-nodejs"
name = "Google Stackdriver Debugger NodeJS Agent"
purl = "pkg:generic/[email protected]"
sha256 = "826a0a542d6cd148458c01bdf1b297018a8203712609f7895d786228c77801c3"
source = "https://registry.npmjs.org/@google-cloud/debug-agent/-/debug-agent-9.0.1.tgz"
source-sha256 = "826a0a542d6cd148458c01bdf1b297018a8203712609f7895d786228c77801c3"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
uri = "https://registry.npmjs.org/@google-cloud/debug-agent/-/debug-agent-9.0.1.tgz"
version = "9.0.1"

[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/googleapis/cloud-debug-nodejs/blob/master/LICENSE"

[[metadata.dependencies]]
cpes = ["cpe:2.3:a:google:google-stackdriver-profiler-java:2024.2.500:*:*:*:*:*:*:*"]
id = "google-stackdriver-profiler-java"
name = "Google Stackdriver Profiler Java Agent"
purl = "pkg:generic/[email protected]"
sha256 = "bd266710d8af36ad127480ce21ef4d1e403e578f99af7e5de4c52b39e2d8f746"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
stacks = ["*"]
uri = "https://storage.googleapis.com/cloud-profiler/java/cloud-profiler-java-agent_20240205_RC00.tar.gz"
version = "2024.2.500"

Expand All @@ -101,19 +69,13 @@ api = "0.7"
sha256 = "66261e02b7bb368265c260fa05d270c5e50459a8f191f6720666828878467a36"
source = "https://registry.npmjs.org/@google-cloud/profiler/-/profiler-6.0.1.tgz"
source-sha256 = "66261e02b7bb368265c260fa05d270c5e50459a8f191f6720666828878467a36"
stacks = ["io.buildpacks.stacks.bionic", "io.paketo.stacks.tiny", "*"]
stacks = ["*"]
uri = "https://registry.npmjs.org/@google-cloud/profiler/-/profiler-6.0.1.tgz"
version = "6.0.1"

[[metadata.dependencies.licenses]]
type = "Apache-2.0"
uri = "https://github.com/googleapis/cloud-debug-nodejs/blob/master/LICENSE"

[[stacks]]
id = "io.buildpacks.stacks.bionic"

[[stacks]]
id = "io.paketo.stacks.tiny"
uri = "https://github.com/googleapis/cloud-profiler-nodejs/blob/main/LICENSE"

[[stacks]]
id = "*"
Loading
Loading