Skip to content
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
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ for (const [env, stage] of Object.entries({ dev, staging, prod })) {

You need a Pulumi Cloud organization and Pulumi CLI v3.277.0 or later.

Create the pipeline program as a Pulumi project of its own and add the Delivery package:
Create the pipeline program as a Pulumi project of its own and install the Delivery SDK:

```sh
mkdir delivery && cd delivery
pulumi new typescript --name shop-delivery --stack main --yes
pulumi package add delivery
npm install @pulumi/delivery
```

The SDKs for the other languages are `pulumi_delivery` on PyPI, `Pulumi.Delivery` on NuGet, `com.pulumi:delivery` on Maven and the Go module `github.com/pulumi/pulumi-delivery/sdk`. The installed SDK brings the matching provider plugin with it.

Then work with the pipeline in two ways:

- **Register it** with `pulumi delivery register`. Pulumi Cloud stores the pipeline, and from then on its triggers start runs. Run the command from a Git checkout with no uncommitted changes, at a commit that is pushed to the branch the pipeline tracks. If the stack config has no `delivery:source` setting, the command writes the program's location to it. Commit the config file after that.
Expand Down
19 changes: 12 additions & 7 deletions docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ Write the `repository` of a source like this:
- Bitbucket: `workspace/repo`
- Azure DevOps: `org/project/repo`

### Add the SDK
### Install the SDK

Run this command in the directory of the pipeline program:
Install the SDK in the directory of the pipeline program, with the package manager of your language:

```sh
pulumi package add delivery
```
- TypeScript: `npm install @pulumi/delivery`
- Python: add `pulumi_delivery` to `requirements.txt`, then run `pulumi install`
- Go: `go get github.com/pulumi/pulumi-delivery/sdk/go/delivery`
- C#: `dotnet add package Pulumi.Delivery`
- Java: add the dependency `com.pulumi:delivery` to `pom.xml`

A YAML or HCL program needs no SDK.

The command adds the latest version of the SDK and writes it to the `packages` section of `Pulumi.yaml`, for example `delivery: delivery@<version>`. Keep that entry. The hosted runner reads it and runs `pulumi install` for your program. To add a specific version, run `pulumi package add delivery@<version>`.
Commit the dependency file that the command changes, such as `package.json` and its lock file. The hosted runner runs `pulumi install` for your program and installs the SDK from that file.

The Pulumi CLI downloads the provider plugin when a program needs it.

Expand Down Expand Up @@ -124,7 +128,7 @@ pulumi stack init acme/shop-infra/prod

### The pipeline program

`delivery/Pulumi.yaml` names the project. Run `pulumi package add` in this directory to add the `packages` entry.
`delivery/Pulumi.yaml` names the project.

```yaml
name: shop-delivery
Expand All @@ -138,6 +142,7 @@ runtime: nodejs
"name": "shop-delivery",
"private": true,
"dependencies": {
"@pulumi/delivery": "^0.1.0",
"@pulumi/pulumi": "^3.0.0"
},
"devDependencies": {
Expand Down
Loading