Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .ci-mgmt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
template: external-bridged-provider
provider: doppler
organization: DopplerHQ
major-version: 0
providerDefaultBranch: main
upstreamProviderOrg: DopplerHQ
publishRegistry: false
# Upstream upgrade PRs wait for a human review instead of merging once CI passes.
autoMergeProviderUpgrades: false
# Workflows authenticate with the PULUMI_PROVIDER_AUTOMATION_TOKEN secret (a fine-grained
# token with contents, pull-requests and workflows write on this repo) rather than minting
# GitHub App tokens. The secret also lets automated upgrade PRs trigger CI, which PRs opened
# with GITHUB_TOKEN don't.
github-app:
enabled: false
# The examples/ integration tests create real resources in a Doppler test workplace, and skip
# when DOPPLER_TOKEN is empty (as on fork PRs). See examples/README.md.
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
DOPPLER_TEST_MEMBER_EMAIL: ${{ vars.DOPPLER_TEST_MEMBER_EMAIL }}
# Also run the integration tests daily, so API or upstream regressions surface between PRs.
generate-nightly-test-workflow: true
languages:
- dotnet
- go
- nodejs
- python
publish:
sdk: "all,!java"
cdn: false
# license:
# ignore:
# - github.com/apache/arrow/go/v15
# - github.com/grafana/grafana-com-public-clients/go/gcom # Temporary while Grafana provider hasn't been upgraded yet
pulumiConvert: 1
3 changes: 3 additions & 0 deletions .config/mise.test.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi-labs/ci-mgmt

# Overrides for test workflows -- currently empty.
34 changes: 34 additions & 0 deletions .config/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# WARNING: This file is autogenerated - changes will be overwritten when regenerated by https://github.com/pulumi-labs/ci-mgmt
# You can create your own root-level mise.toml file to override/augment this. See https://mise.jdx.dev/configuration.html

[env]
_.vfox-pulumi = { module_path = "provider" } # Sets GO_VERSION_MISE and PULUMI_VERSION_MISE
PULUMI_HOME = "{{config_root}}/.pulumi"

[tools]

# Runtimes
go = "{{ env.GO_VERSION_MISE }}"
node = '20.19.5'
python = '3.11.8'
"vfox:version-fox/vfox-dotnet" = "8.0.20" # vfox backend doesn't work on Windows, gives "error converting Lua table to PreInstall (no version returned from vfox plugin)" https://github.com/jdx/mise/discussions/5876 https://github.com/jdx/mise/discussions/5550
# Corretto version used as Java SE/OpenJDK version no longer offered
java = 'corretto-11'

# Executable tools
"github:pulumi/pulumi" = "{{ env.PULUMI_VERSION_MISE }}"
"github:pulumi/pulumictl" = '0.0.50'
"github:pulumi/schema-tools" = "0.6.0"
"aqua:gradle/gradle-distributions" = '7.6.6'
golangci-lint = "2.5.0" # See note about about overrides if you need to customize this.
"npm:yarn" = "1.22.22"

[settings]
experimental = true # Required for Go binaries (e.g. pulumictl).
lockfile = false
http_retries = 3
pin = true # `mise use` should pin versions instead of defaulting to latest.
fetch_remote_versions_cache = "24h" # Mise queries versions even if they're pinned to confirm they exist. Reduce GitHub API calls by doing that less often.

[plugins]
vfox-pulumi = "https://github.com/pulumi/vfox-pulumi"
74 changes: 9 additions & 65 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,68 +1,12 @@
ARG UBUNTU_VERSION=latest
FROM ubuntu:${UBUNTU_VERSION}
FROM mcr.microsoft.com/devcontainers/base:ubuntu

# Update apt-get and install various needed utilities
RUN apt-get update && \
apt-get install -y curl && \
apt-get install -y wget && \
apt-get install -y xz-utils && \
apt-get install -y make && \
apt-get install -y gcc && \
apt-get install -y git
# Install mise
RUN curl https://mise.run | sh
ENV PATH="/root/.local/bin:${PATH}"

# Install bridged provider prerequisites
# See README.md
# Setup mise
WORKDIR /code
RUN mise install

# Install go
ARG GO_VERSION=1.18.3
RUN rm -rf /usr/local/go && \
wget -O ${GO_VERSION}.tar.gz https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
tar -C /usr/local -xzf ${GO_VERSION}.tar.gz && \
rm ${GO_VERSION}.tar.gz

ENV GOPATH=/root/go
ENV PATH=$PATH:/usr/local/go/bin

# Install go linter
RUN mkdir -p $GOPATH/bin && \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $GOPATH/bin v1.46.2

ENV PATH=$PATH:$GOPATH/bin

# Install pulumictl
ARG PULUMICTL_VERSION=v0.0.32
RUN rm -rf /usr/local/bin/pulumictl && \
wget -O pulumictl.${PULUMICTL_VERSION}.tar.gz https://github.com/pulumi/pulumictl/releases/download/${PULUMICTL_VERSION}/pulumictl-${PULUMICTL_VERSION}-linux-amd64.tar.gz && \
tar -C /usr/local/bin -xzf pulumictl.${PULUMICTL_VERSION}.tar.gz

# Install nodejs
ARG NODEJS_VERSION=v16.16.0
ARG NODEJS_PKG=node-${NODEJS_VERSION}-linux-x64
ARG NODEJS_TARBALL=${NODEJS_PKG}.tar.xz
RUN rm -rf /usr/local/node && \
wget -O ${NODEJS_TARBALL} https://nodejs.org/dist/${NODEJS_VERSION}/${NODEJS_TARBALL} && \
tar -C /usr/local -xf ${NODEJS_TARBALL} && \
mv /usr/local/${NODEJS_PKG} /usr/local/node

ENV PATH=$PATH:/usr/local/node/bin

# Install yarn
RUN npm install --global yarn

# Install python and related items
RUN apt-get install -y python3 && \
apt-get install -y python3-setuptools

# Install .NET
RUN wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
rm packages-microsoft-prod.deb

RUN apt-get update && \
apt-get install -y apt-transport-https && \
apt-get update && \
apt-get install -y dotnet-sdk-6.0

# Install Pulumi
RUN curl -fsSL https://get.pulumi.com | sh
ENV PATH=$PATH:/root/.pulumi/bin
# Activate mise in shell
RUN echo 'eval "$(mise activate bash)"' >> ~/.bashrc
16 changes: 11 additions & 5 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.202.3/containers/hugo
{
"name": "TFProvider",
"name": "Provider Dev Container",
"build": {
"dockerfile": "Dockerfile"
}
"dockerfile": "./Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {},
"extensions": []
}
},
"remoteUser": "root"
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sdk/**/* linguist-generated=true
28 changes: 28 additions & 0 deletions .github/actions/download-prerequisites/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Download the code generator binary
description: Downloads the code generator binary to `bin/`.

runs:
using: "composite"
steps:
- name: Download the prerequisites bin
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: prerequisites-bin
path: bin

- name: Restore executable permissions
shell: bash
run: chmod +x $(< bin/executables.txt)

- name: Remove executables list
shell: bash
run: rm bin/executables.txt

- name: Download schema-embed.json
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
# Use a pattern to avoid failing if the artifact doesn't exist
pattern: schema-embed.*
# Avoid creating directories for each artifact
merge-multiple: true
path: provider/cmd/pulumi-resource-doppler
23 changes: 23 additions & 0 deletions .github/actions/download-provider/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Download the provider binary
description: Downloads the provider binary to `bin/`.

runs:
using: "composite"
steps:

- name: Download pulumi-resource-doppler
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
pattern: pulumi-resource-doppler-*-linux-amd64.tar.gz
path: ${{ github.workspace }}/bin
merge-multiple: true

- name: Untar pulumi-resource-doppler
shell: bash
run: |
tar -zxf ${{ github.workspace }}/bin/*amd64.tar.gz -C ${{ github.workspace}}/bin

- name: Mark pulumi-resource-doppler as executable
shell: bash
run: |
find ${{ github.workspace }} -name "pulumi-*-doppler" -print -exec chmod +x {} \;
19 changes: 19 additions & 0 deletions .github/actions/download-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Download SDK asset
description: Restores the SDK asset for a language.

inputs:
language:
required: true
description: One of nodejs, python, dotnet, go, java

runs:
using: "composite"
steps:
- name: Download ${{ inputs.language }} SDK
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/
- name: Uncompress SDK folder
shell: bash
run: tar -zxf ${{ github.workspace }}/sdk/${{ inputs.language }}.tar.gz -C ${{ github.workspace }}/sdk/${{ inputs.language }}
23 changes: 23 additions & 0 deletions .github/actions/upload-prerequisites/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Upload SDK asset
description: Upload the SDK for a specific language as an asset for the workflow.

runs:
using: "composite"
steps:
- name: Capture executable permissions
shell: bash
run: find bin -type f -executable > bin/executables.txt

- name: Upload prerequisites bin
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: prerequisites-bin
path: bin/*
retention-days: 30

- name: Upload schema-embed.json
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: schema-embed.json
path: provider/cmd/pulumi-resource-doppler/schema-embed.json
retention-days: 30
20 changes: 20 additions & 0 deletions .github/actions/upload-sdk/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Upload SDK asset
description: Upload the SDK for a specific language as an asset for the workflow.

inputs:
language:
required: true
description: One of nodejs, python, dotnet, go, java

runs:
using: "composite"
steps:
- name: Compress SDK folder
shell: bash
run: tar -zcf sdk/${{ inputs.language }}.tar.gz -C sdk/${{ inputs.language }} .
- name: Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ inputs.language }}-sdk.tar.gz
path: ${{ github.workspace}}/sdk/${{ inputs.language }}.tar.gz
retention-days: 30
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Version updates only for the test modules. Everything else is updated another way:
# - provider/ and sdk/: the upgrade-provider and upgrade-bridge workflows bump upstream, the
# bridge and Pulumi, and regenerate the schema and SDKs, which Dependabot can't do.
# - GitHub Actions: workflows are generated by ci-mgmt (`make ci-mgmt`), which would
# overwrite any pin Dependabot changes.
version: 2
updates:
- package-ecosystem: "gomod"
directories:
- "/examples"
- "/examples/core-go"
schedule:
interval: "weekly"
groups:
examples:
patterns:
- "*"
Loading
Loading