Skip to content

Commit

Permalink
Add dockerbuild provider (#843)
Browse files Browse the repository at this point in the history
We discussed rollout plans for the new `buildx.Image` resource and
decided to release it as its own standalone provider.

Naming is still TBD but I'm penciling in dockerbuild for now.
  • Loading branch information
blampe authored Apr 8, 2024
1 parent 0b0be71 commit e8b9d89
Show file tree
Hide file tree
Showing 28 changed files with 2,525 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/update-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
with:
repository: pulumi/pulumi-${{ inputs.provider_name }}
path: pulumi-${{ inputs.provider_name }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- name: Unshallow clone for tags
run: |
DIR="$PWD/pulumi-${{ inputs.provider_name }}"
Expand Down Expand Up @@ -133,12 +134,13 @@ jobs:
path: pulumi-${{ inputs.provider_name }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- name: "Set PR to auto-merge"
if: steps.create-pr.outputs.pull-request-operation == 'created' && inputs.automerge
# Not all providers have auto-merge enabled, and we don't want to fail providers
# that don't have auto-merge enabled.
#
# After https://github.com/pulumi/home/issues/3140 is closed, we should remove
# `continue-on-error: true`.
if:
steps.create-pr.outputs.pull-request-operation == 'created' && inputs.automerge
# Not all providers have auto-merge enabled, and we don't want to fail providers
# that don't have auto-merge enabled.
#
# After https://github.com/pulumi/home/issues/3140 is closed, we should remove
# `continue-on-error: true`.
continue-on-error: true
run: "gh pr merge --auto --squash ${{ steps.create-pr.outputs.pull-request-url }}"
# See: https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ jobs:
schema-tools compare -p ${{ env.PROVIDER }} -o ${{ github.event.repository.default_branch }} -n --local-path=provider/cmd/pulumi-resource-${{ env.PROVIDER }}/schema.json >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: github.event_name == 'pull_request'
name: Comment on PR with Details of Schema Check
uses: thollander/actions-comment-pull-request@v2
Expand Down
23 changes: 23 additions & 0 deletions native-provider-ci/providers/dockerbuild/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
provider: dockerbuild
major-version: 0
provider-default-branch: main
aws: true
gcp: true
env:
AWS_REGION: us-west-2
PULUMI_API: "https://api.pulumi-staging.io"
ARM_CLIENT_ID: "30e520fa-12b4-4e21-b473-9426c5ac2e1e"
ARM_SUBSCRIPTION_ID: "0282681f-7a9e-424b-80b2-96babd57a8a1"
ARM_TENANT_ID: "706143bc-e1d4-4593-aee2-c9dc60ab9be7"
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
AZURE_LOCATION: westus
DIGITALOCEAN_TOKEN: ${{ secrets.DIGITALOCEAN_TOKEN }}
GOLANGCI_LINT_TIMEOUT: 10m
GOOGLE_CI_SERVICE_ACCOUNT_EMAIL: [email protected]
GOOGLE_CI_WORKLOAD_IDENTITY_POOL: pulumi-ci
GOOGLE_CI_WORKLOAD_IDENTITY_PROVIDER: pulumi-ci
GOOGLE_PROJECT: pulumi-ci-gcp-provider
GOOGLE_PROJECT_NUMBER: 895284651812
GOOGLE_REGION: us-central1
GOOGLE_ZONE: us-central1-a
DOCKER_HUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
Loading

0 comments on commit e8b9d89

Please sign in to comment.