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

Update GitHub Actions workflows. #432

Merged
merged 1 commit into from
Nov 30, 2022
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
1 change: 0 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TRAVIS_OS_NAME: linux
VERSION_PREFIX: 4.0.0
jobs:
build_sdk:
name: build_sdk
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
AWS_REGION: us-west-2
AZURE_LOCATION: westus
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IS_PRERELEASE: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
Expand All @@ -24,9 +25,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TRAVIS_OS_NAME: linux
VERSION_PREFIX: 4.0.0
IS_PRERELEASE: true

jobs:
build_sdk:
name: build_sdk
Expand Down
122 changes: 122 additions & 0 deletions .github/workflows/resync-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# WARNING: This file is autogenerated - changes will be overwritten if not made via https://github.com/pulumi/ci-mgmt

env:
ARM_CLIENT_ID: 30e520fa-12b4-4e21-b473-9426c5ac2e1e
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: 0282681f-7a9e-424b-80b2-96babd57a8a1
ARM_TENANT_ID: 706143bc-e1d4-4593-aee2-c9dc60ab9be7
AWS_REGION: us-west-2
AZURE_LOCATION: westus
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NUGET_PUBLISH_KEY: ${{ secrets.NUGET_PUBLISH_KEY }}
PROVIDER: docker
PUBLISH_REPO_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
PUBLISH_REPO_USERNAME: ${{ secrets.OSSRH_USERNAME }}
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }}
PULUMI_API: https://api.pulumi-staging.io
PULUMI_EXTRA_MAPPING_ERROR: true
PULUMI_GO_DEP_ROOT: /home/runner/work/pulumi-docker
PULUMI_LOCAL_NUGET: ${{ github.workspace }}/nuget
PULUMI_MISSING_MAPPING_ERROR: true
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
SIGNING_KEY: ${{ secrets.JAVA_SIGNING_KEY }}
SIGNING_KEY_ID: ${{ secrets.JAVA_SIGNING_KEY_ID }}
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TRAVIS_OS_NAME: linux
jobs:
resync_build:
name: resync-build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Checkout repo
uses: actions/checkout@v3
with:
path: ci-mgmt
repository: pulumi/ci-mgmt
- id: run-url
name: Create URL to the run output
run: echo ::set-output
name=run-url::https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
- name: Unshallow clone for tags
run: git fetch --prune --unshallow --tags
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{matrix.goversion}}
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v2
- name: Setup DotNet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnetversion}}
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.nodeversion}}
registry-url: https://registry.npmjs.org
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.pythonversion}}
- name: Sync with ci-mgmt
run: cp -r ci-mgmt/provider-ci/providers/$PROVIDER/repo/. .
- name: Remove ci-mgmt directory
run: rm -rf ci-mgmt
- name: Required entries for gitignore
run: |-
cat <<- EOF > $RUNNER_TEMP/gitignore
sdk/java/build
sdk/java/.gradle
sdk/java/gradle
sdk/java/gradlew
sdk/java/gradlew.bat
EOF
shell: bash
- name: Adding missing lines to .gitignore
run: comm -23 <(sort $RUNNER_TEMP/gitignore) <(sort .gitignore) >> .gitignore
shell: bash
- name: Build
run: make build
- name: Create PR (no linked issue)
uses: peter-evans/[email protected]
with:
author: pulumi-bot <[email protected]>
base: master
body: This pull request was generated automatically by the resync-build workflow
in this repository.
branch: pulumi-bot/resync-${{ github.run_id}}
commit-message: Resync build for pulumi-${{ env.PROVIDER }}
committer: pulumi-bot <[email protected]>
labels: impact/no-changelog-required
team-reviewers: platform-integrations
title: Fix up build for pulumi-${{ env.PROVIDER }}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
strategy:
fail-fast: true
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.19.x
nodeversion:
- 16.x
pythonversion:
- "3.9"
name: Resync build
on:
workflow_dispatch:
inputs:
automerge:
default: false
description: Mark created PR for auto-merging?
required: true
type: boolean
1 change: 0 additions & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ env:
SIGNING_PASSWORD: ${{ secrets.JAVA_SIGNING_PASSWORD }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
TRAVIS_OS_NAME: linux
VERSION_PREFIX: 4.0.0
jobs:
build_sdk:
if: github.event_name == 'repository_dispatch' ||
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/update-bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ jobs:
title: Update pulumi-terraform-bridge to v${{ github.event.inputs.bridge_version
}}
token: ${{ secrets.PULUMI_BOT_TOKEN }}
- if: steps.create-pr.outputs.pull-request-operation == 'created' &&
github.event.inputs.automerge == 'true'
run: gh pr merge --auto --squash ${{ steps.create-pr.outputs.pull-request-number
}}
strategy:
fail-fast: true
matrix:
Expand All @@ -81,6 +85,11 @@ name: Update pulumi-terraform-bridge
on:
workflow_dispatch:
inputs:
automerge:
default: false
description: Mark created PR for auto-merging?
required: true
type: boolean
bridge_version:
description: The version of pulumi/pulumi-terraform-bridge to update to. Do not
include the 'v' prefix. Must be major version 3.
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/update-upstream-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
with:
python-version: ${{matrix.pythonversion}}
- name: Get upstream provider sha
run: echo "UPSTREAM_PROVIDER_SHA=$(curl https://api.github.com/repos/${{
run: echo "UPSTREAM_PROVIDER_SHA=$(curl -L https://api.github.com/repos/${{
env.UPSTREAM_PROVIDER_ORG }}/${{ env.UPSTREAM_PROVIDER_REPO
}}/git/ref/tags/v${{ github.event.inputs.version }} | jq .object.sha
-r)" >> $GITHUB_ENV
Expand Down Expand Up @@ -148,6 +148,11 @@ name: Update upstream provider
on:
workflow_dispatch:
inputs:
automerge:
default: false
description: Mark created PR for auto-merging?
required: true
type: boolean
linked_issue_number:
description: The issue number of a PR in this repository to which the generated
pull request should be linked.
Expand Down
11 changes: 6 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ only_build: build
build_dotnet: DOTNET_VERSION := $(shell pulumictl get version --language dotnet)
build_dotnet:
pulumictl get version --language dotnet
$(WORKING_DIR)/bin/$(TFGEN) dotnet --overlays provider/overlays/dotnet --out sdk/dotnet/
$(WORKING_DIR)/bin/$(TFGEN) dotnet --out sdk/dotnet/
cd sdk/dotnet/ && \
echo "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
echo "$(DOTNET_VERSION)" >version.txt && \
dotnet build /p:Version=$(DOTNET_VERSION)

build_go:
$(WORKING_DIR)/bin/$(TFGEN) go --overlays provider/overlays/go --out sdk/go/
$(WORKING_DIR)/bin/$(TFGEN) go --out sdk/go/
cd sdk && go list `grep -e "^module" go.mod | cut -d ' ' -f 2`/go/... | xargs go build

build_java: PACKAGE_VERSION := $(shell pulumictl get version --language generic)
build_java: bin/pulumi-java-gen
Expand All @@ -50,7 +51,7 @@ build_java: bin/pulumi-java-gen

build_nodejs: VERSION := $(shell pulumictl get version --language javascript)
build_nodejs:
$(WORKING_DIR)/bin/$(TFGEN) nodejs --overlays provider/overlays/nodejs --out sdk/nodejs/
$(WORKING_DIR)/bin/$(TFGEN) nodejs --out sdk/nodejs/
cd sdk/nodejs/ && \
echo "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
yarn install && \
Expand All @@ -60,7 +61,7 @@ build_nodejs:

build_python: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python:
$(WORKING_DIR)/bin/$(TFGEN) python --overlays provider/overlays/python --out sdk/python/
$(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/
cd sdk/python/ && \
echo "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
cp ../../README.md . && \
Expand Down Expand Up @@ -109,4 +110,4 @@ tfgen: install_plugins
bin/pulumi-java-gen:
$(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java)

.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen
.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_dotnet build_go build_java build_nodejs build_python clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen