Skip to content

Commit 5d9d632

Browse files
gollergithub-actions[bot]
authored andcommitted
Update docs content from https://github.com/depot/app
1 parent 80a8ccb commit 5d9d632

File tree

6 files changed

+144
-4
lines changed

6 files changed

+144
-4
lines changed

content/cache/reference/maven.mdx

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: Maven
3+
ogTitle: Remote caching for Maven builds
4+
description: Learn how to use Depot remote caching for Maven builds
5+
---
6+
7+
[**Maven**](https://maven.apache.org/) is a build automation and project management tool primarily used for Java projects that helps developers manage dependencies, build processes, and documentation in a centralized way. It follows a convention-over-configuration approach by providing a standard project structure and build lifecycle, allowing teams to quickly begin development without extensive configuration.
8+
9+
[**Depot Cache**](/docs/cache/overview) provides a remote cache service that can be used with Maven, allowing you to incrementally cache and reuse parts of your builds. This cache is accessible from anywhere, both on your local machine and on CI/CD systems.
10+
11+
## Configuring Maven to use Depot Cache
12+
13+
Depot Cache can be used with Maven from Depot's managed GitHub Actions runners, your local machine, or any CI/CD system.
14+
15+
### From Depot-managed Actions runners
16+
17+
[Depot GitHub Actions runners](/docs/github-actions/overview) are pre-configured to use Depot Cache with Maven - each runner is launched with a `settings.xml` file that is pre-populated with the connection details for Depot Cache. You must verify that remote caching is enabled via the [Maven Build Cache extension](https://maven.apache.org/extensions/maven-build-cache-extension/index.html) in `.mvn/maven-build-cache-config.xml`:
18+
19+
```xml
20+
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
23+
<configuration>
24+
<enabled>true</enabled>
25+
<hashAlgorithm>SHA-256</hashAlgorithm>
26+
<validateXml>true</validateXml>
27+
<remote enabled="true" saveToRemote="true" id="depot-cache">
28+
<url>https://cache.depot.dev</url>
29+
</remote>
30+
<projectVersioning adjustMetaInf="true" />
31+
</configuration>
32+
</cache>
33+
```
34+
35+
It is important to note that the `id` of your remote cache must be set to `depot-cache` for the Depot Cache service to work correctly in Depot GitHub Actions Runners. The cache will not be used if you use a different ID.
36+
37+
You should also verify that you have registered the Build Cache extension in your `pom.xml` file:
38+
39+
```xml
40+
<build>
41+
<extensions>
42+
<extension>
43+
<groupId>org.apache.maven.extensions</groupId>
44+
<artifactId>maven-build-cache-extension</artifactId>
45+
<version>1.0.1</version>
46+
</extension>
47+
</extensions>
48+
</build>
49+
```
50+
51+
If this automatic configuration is incompatible with your specific setup, you can disable automatic configuration in your organization settings page and manually configure Maven to use Depot Cache, as described below.
52+
53+
### From your local machine or any CI/CD system
54+
55+
To manually configure Maven to use Depot Cache, you will need to configure remote caching in your `~/.m2/settings.xml` file. Configure Maven to use the Depot Cache service endpoints and set your API token where there is the `DEPOT_TOKEN` below:
56+
57+
`settings.xml`:
58+
59+
```xml
60+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
61+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
62+
<servers>
63+
<server>
64+
<id>depot-cache</id>
65+
<configuration>
66+
<httpHeaders>
67+
<property>
68+
<name>Authorization</name>
69+
<value>Bearer DEPOT_TOKEN</value>
70+
</property>
71+
</httpHeaders>
72+
</configuration>
73+
</server>
74+
</servers>
75+
</settings>
76+
```
77+
78+
**Note: Maven support currently only supports Depot Organization API tokens, not user tokens.**
79+
80+
## Using Depot Cache with Maven
81+
82+
Once Maven is configured to use Depot Cache, you can run your builds as usual. Maven will automatically communicate with Depot Cache to fetch and reuse any stored build artifacts from your previous builds.

content/cli/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Either install with [our installation script](https://depot.dev/install-cli.sh):
2525
curl -L https://depot.dev/install-cli.sh | sh
2626

2727
# Install a specific version
28-
curl -L https://depot.dev/install-cli.sh | sh -s 1.6.0
28+
curl -L https://depot.dev/install-cli.sh | sh -s x.y.z
2929
```
3030

3131
Or download the latest version from [GitHub releases](https://github.com/depot/cli/releases).

content/container-builds/reference/api-overview.mdx

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The Depot API is a collection of endpoints that grant access to our underlying a
99
Our API is built with Connect, offering [multiprotocol support](https://connectrpc.com/docs/introduction#seamless-multi-protocol-support) for GRPC and HTTP JSON. We currently generate the following SDKs for interacting with Depot:
1010

1111
- [Node](https://github.com/depot/sdk-node)
12+
- [Go](https://github.com/depot/depot-go)
1213

1314
## Authentication
1415

@@ -274,13 +275,43 @@ const headers = {Authorization: `Bearer ${process.env.DEPOT_TOKEN}`}
274275
await depot.build.v1.BuildService.finishBuild({buildId: 'build-id', result: {error: 'error message'}}, {headers})
275276
```
276277

278+
#### List the steps for a build
279+
280+
To list the steps for a build, you need to pass the build ID, the project ID, the number of steps to page, and an optional page token returned from a previous API call.
281+
282+
```typescript
283+
const headers = {Authorization: `Bearer ${process.env.DEPOT_TOKEN}`}
284+
const result = await depot.build.v1.BuildService.getBuildSteps(
285+
{buildId: 'build-id', projectId: 'project-id', pageSize: 100, pageToken: 'page-token'},
286+
{headers},
287+
)
288+
```
289+
290+
#### Get the logs for a build step
291+
292+
To get the logs for a build step, you need to pass the build ID, the project ID, and the build step's digest. You can also pass the number of lines to page and an optional page token returned from a previous API call.
293+
294+
```typescript
295+
const headers = {Authorization: `Bearer ${process.env.DEPOT_TOKEN}`}
296+
const result = await depot.build.v1.BuildService.getBuildStepLogs(
297+
{
298+
buildId: 'build-id',
299+
projectId: 'project-id',
300+
buildStepDigest: 'step-digest',
301+
pageSize: 100,
302+
pageToken: 'page-token',
303+
},
304+
{headers},
305+
)
306+
```
307+
277308
### Registry Service
278309

279310
Docs: [`depot.build.v1.RegistryService`](https://buf.build/depot/api/docs/main:depot.build.v1#depot.build.v1.RegistryService)
280311

281312
The Registry service provides access to the underlying registry that stores the images built by Depot. You can use this service to list and delete images.
282313

283-
### List the images for a project
314+
#### List the images for a project
284315

285316
To list the images for a project, you need to pass the ID of the project you want to list the images for. When listing more than 100 images, you can use the `pageSize` and `pageToken` fields to paginate the results.
286317

@@ -298,7 +329,7 @@ console.log(result.nextPageToken)
298329

299330
The images returned will consist of an image tag, digest, a pushedAt timestamp, and the size of the image in bytes.
300331

301-
### Delete images
332+
#### Delete images
302333

303334
To delete images, you need to pass the ID of the project and the list of image tags you want to removed.
304335

content/github-actions/reference/dagger.mdx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ on: push
3434

3535
jobs:
3636
build:
37-
runs-on: depot-ubuntu-22.04,dagger=0.15.2
37+
runs-on: depot-ubuntu-latest,dagger=0.18.4
3838
steps:
3939
- uses: actions/checkout@v4
4040
- run: dagger -m github.com/kpenfound/dagger-modules/[email protected] call \
@@ -48,6 +48,21 @@ The Dagger CLI will be available and pre-authenticated with your Dagger Cloud to
4848
4949
With these steps, your workflow is now ready to run on Depot’s accelerated infrastructure using Dagger and GitHub Actions.
5050
51+
## How does it work?
52+
53+
Using Dagger engines via Depot GitHub Actions Runners allows you to execute your Dagger pipelines and functions inside of a dedicated VM with a persistent NVMe device for cache storage that lives next to the GitHub Actions runners without having to do any additional configuration outside of the above.
54+
55+
### Architecture
56+
57+
![Depot GitHub Actions Runners with Dagger architecture](/images/dagger-arch-diagram.png)
58+
59+
The general architecture allows for fast persistent cache for your Dagger projects automatically across builds. Here is the flow of information and what happens at each step when you specify `runs-on: depot-ubuntu-latest,dagger=<version>` in your GitHub Actions workflow:
60+
61+
1. The Depot control plane receives the request for your GitHub Actions job and takes note of your request for a Dagger engine as well. We launch the Dagger Engine VM at the specified version next to your GitHub Actions runner, attaching your cache volume from previous builds to that VM. We then tell the GitHub Actions runner to pre-configure the GitHub Actions environment, installing the specific `dagger` CLI version for you and point it at the Dagger Engine running next door, and automatically authenticate to your Dagger Cloud account for logs and telemetry.
62+
2. The GitHub Actions runner starts up and runs the job, which includes the Dagger CLI. The Dagger CLI is pre-configured to use the Dagger Engine running next door, the `dagger` step is thus kicked off on the separate Dagger Engine VM with it's persistent cache. The Dagger execution runs to completion and logs + telemetry are shipped to your Dagger Cloud account.
63+
3. The Dagger Engine VM is automatically shut down after the job completes, and the cache volume is detached from the VM and returned to Depot's control plane for future use.
64+
4. The GitHub Actions runner completes the job and returns the results to GitHub.
65+
5166
## Pricing
5267

5368
Dagger engines accessed via our GitHub Actions Runners are charged by the build minute at $0.04/minute, in addition to the GitHub Actions Runner build time.

content/github-actions/runner-types.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,14 @@ Note that on your Billing summary, costs are broken down by `Billed minutes` and
116116
- `Billed minutes` multiples the `Minutes multiplier` (from the table above) by the `Elapsed minutes`.
117117
- The rate at which `Billed minutes` accumulates is based on the size of the `Minutes multiplier`.
118118
- What you pay is the total `Billed minutes` minus the included minutes of your plan.
119+
120+
## What software and tools are included?
121+
122+
If you'd like to see what tools and software are installed in each runner image, please see the links to the `README` in GitHub's repository:
123+
124+
- [`depot-ubuntu-24.04`](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md) and `depot-ubuntu-latest`
125+
- [`depot-ubuntu-22.04`](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md)
126+
- [`depot-macos-14`](https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md) and `depot-macos-latest`
127+
- [`depot-windows-2022`](https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md)
128+
129+
_Note: We do our best to keep our images in sync with GitHub's, but there may be a slight delay between when GitHub updates their images and when we update ours. If you need a specific version of a tool or software, please check the links above to see if it's available in the image you're using._

content/registry/overview.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ By default, builds saved in the Depot Registry persist for **7 days** from when
5050

5151
Possible values for the retention policy are:
5252

53+
- **1 day**
5354
- **7 days** (default)
5455
- **14 days**
5556
- **30 days**

0 commit comments

Comments
 (0)