Skip to content

Commit

Permalink
[internal] Update GitHub Actions workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
pulumi-bot committed Jun 3, 2024
1 parent d36c980 commit 3824ad2
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 37 deletions.
71 changes: 71 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Bug Report
description: Report something that's not working correctly
labels: ["kind/bug", "needs-triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
You can also ask questions on our [Community Slack](https://slack.pulumi.com/).
- type: textarea
id: what-happened
attributes:
label: Describe what happened
description: Please summarize what happened, including what Pulumi commands you ran, as well as
an inline snippet of any relevant error or console output.
validations:
required: true
- type: textarea
id: sample-program
attributes:
label: Sample program
description: |
<details><summary>Provide a reproducible sample program</summary>
If this is a bug you encountered while running a Pulumi command, please provide us with a minimal,
self-contained Pulumi program that reproduces this behavior so that we can investigate on our end.
Without a functional reproduction, we will not be able to prioritize this bug.
**Note:** If the program output is more than a few lines, please send us a Gist or a link to a file.
</details>
validations:
required: true
- type: textarea
id: log-output
attributes:
label: Log output
description: |
<details><summary>How to Submit Logs</summary>
If this is something that is dependent on your environment, please also provide us with the output of
`pulumi up --logtostderr --logflow -v=10` from the root of your project.
We may also ask you to supply us with debug output following [these steps](https://www.pulumi.com/docs/using-pulumi/pulumi-packages/debugging-provider-packages/).
**Note:** If the log output is more than a few lines, please send us a Gist or a link to a file.
</details>
validations:
required: true
- type: textarea
id: resources
attributes:
label: Affected Resource(s)
description: Please list the affected Pulumi Resource(s) or Function(s).
validations:
required: false
- type: textarea
id: versions
attributes:
label: Output of `pulumi about`
description: Provide the output of `pulumi about` from the root of your project.
validations:
required: true
- type: textarea
id: ctx
attributes:
label: Additional context
description: Anything else you would like to add?
validations:
required: false
- type: textarea
id: voting
attributes:
label: Contributing
value: |
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
4 changes: 2 additions & 2 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/pulumiUtilities.go
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
- name: Compress SDK folder
Expand Down Expand Up @@ -353,7 +353,7 @@ jobs:
- id: version
uses: pulumi/provider-version-action@v1
- name: Publish SDKs
uses: pulumi/[email protected].15
uses: pulumi/[email protected].16
with:
sdk: all
version: ${{ steps.version.outputs.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/pulumiUtilities.go
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
- name: Compress SDK folder
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
- id: version
uses: pulumi/provider-version-action@v1
- name: Publish SDKs
uses: pulumi/[email protected].15
uses: pulumi/[email protected].16
with:
sdk: all
version: ${{ steps.version.outputs.version }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ jobs:
name: pull-request
on:
pull_request_target: {}


26 changes: 14 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/pulumiUtilities.go
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
- name: Compress SDK folder
Expand Down Expand Up @@ -141,16 +141,18 @@ jobs:
needs: tag_sdk
runs-on: ubuntu-latest
steps:
- name: Install pulumictl
uses: jaxxstorm/[email protected]
with:
tag: v0.0.46
repo: pulumi/pulumictl
- env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
name: Dispatch Event
run: pulumictl create docs-build pulumi-${{ env.PROVIDER }}
"${GITHUB_REF#refs/tags/}"
- name: Dispatch Metadata build
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PULUMI_BOT_TOKEN }}
repository: pulumi/pulumi-${{ env.PROVIDER }}
event-type: resource-provider
client-payload: |-
{
"project": pulumi-${{ env.PROVIDER }},
"shortname": ${{ env.PROVIDER }},
"ref": ${{ env.GITHUB_REF_NAME }}
}
lint:
name: lint
uses: ./.github/workflows/lint.yml
Expand Down Expand Up @@ -313,7 +315,7 @@ jobs:
- id: version
uses: pulumi/provider-version-action@v1
- name: Publish SDKs
uses: pulumi/[email protected].15
uses: pulumi/[email protected].16
with:
sdk: all
version: ${{ steps.version.outputs.version }}
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/run-acceptance-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
allowed-changes: |
sdk/**/pulumi-plugin.json
sdk/dotnet/Pulumi.*.csproj
sdk/go/*/internal/pulumiUtilities.go
sdk/go/**/pulumiUtilities.go
sdk/nodejs/package.json
sdk/python/pyproject.toml
- name: Compress SDK folder
Expand Down Expand Up @@ -294,6 +294,18 @@ jobs:
- name: Workflow is not a success
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped')
run: exit 1
- uses: guibranco/github-status-action-v2@0849440ec82c5fa69b2377725b9b7852a3977e76
with:
authToken: ${{secrets.GITHUB_TOKEN}}
# Write an explicit status check called "Sentinel" which will only pass if this code really runs.
# Once rolled out, we can make this the only required check for PRs,
# then remove the old conditionals on this job and remove the previous step.
context: 'Sentinel'
description: 'All required checks passed'
state: 'success'
# Write to the PR commit SHA if it's available as we don't want the merge commit sha,
# otherwise use the current SHA for any other type of build.
sha: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Workflow is a success
run: echo "🎉🎈🎉🎈🎉"

Expand Down
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ install_sdks: install_dotnet_sdk install_python_sdk install_nodejs_sdk install_j

only_build: build

build_dotnet: DOTNET_VERSION := $(shell pulumictl convert-version --language dotnet -v "$(VERSION_GENERIC)")
build_dotnet: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_dotnet: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_dotnet: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
Expand All @@ -44,7 +43,7 @@ build_dotnet: upstream
cd sdk/dotnet/ && \
printf "module fake_dotnet_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
echo "$(VERSION_GENERIC)" >version.txt && \
dotnet build /p:Version=$(DOTNET_VERSION)
dotnet build

build_go: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_go: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
Expand All @@ -64,7 +63,6 @@ build_java: bin/pulumi-java-gen upstream
gradle --console=plain build && \
gradle --console=plain javadoc

build_nodejs: NODE_VERSION := $(shell pulumictl convert-version --language javascript -v "$(VERSION_GENERIC)")
build_nodejs: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_nodejs: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_nodejs: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
Expand All @@ -74,10 +72,8 @@ build_nodejs: upstream
printf "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
yarn install && \
yarn run tsc && \
cp ../../README.md ../../LICENSE* package.json yarn.lock ./bin/ && \
sed -i.bak -e "s/\$${VERSION}/$(NODE_VERSION)/g" ./bin/package.json
cp ../../README.md ../../LICENSE* package.json yarn.lock ./bin/

build_python: PYPI_VERSION := $(shell pulumictl convert-version --language python -v "$(VERSION_GENERIC)")
build_python: export PULUMI_HOME := $(WORKING_DIR)/.pulumi
build_python: export PATH := $(WORKING_DIR)/.pulumi/bin:$(PATH)
build_python: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
Expand All @@ -88,8 +84,7 @@ build_python: upstream
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17\n" > go.mod && \
cp ../../README.md . && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \
rm ./bin/pyproject.toml.bak && rm ./bin/go.mod && \
rm ./bin/go.mod && \
python3 -m venv venv && \
./venv/bin/python -m pip install build && \
cd ./bin && \
Expand Down
16 changes: 6 additions & 10 deletions scripts/upstream.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,13 @@ start_rebase() {
rm -rf .git/modules/upstream/rebase-merge
cd upstream && git fetch

if [ -z "$TO" ]; then
echo "\$TO not set, assuming TO is the upstream SHA currently committed."
else
git checkout "$TO"
fi

git branch -f local
if [ -n "$FROM" ]; then
git checkout -B pulumi-patch "$FROM"
echo "Rebasing from $FROM to $(git rev-parse HEAD)"
git checkout -B pulumi-patch "$FROM"
else
git checkout -B pulumi-patch
echo "Rebasing in place at $(git rev-parse HEAD)"
git checkout -B pulumi-patch
fi
git branch --set-upstream-to=local pulumi-patch

Expand Down Expand Up @@ -120,7 +116,7 @@ assert_rebase_in_progress() {
Didn't detect an upstream rebase in progress.
To start an upstream rebase, run
[FROM=vX.Y.Z] [TO=vA.B.C] make upstream.rebase
[FROM=vX.Y.Z] make upstream.rebase
If you are absolutly sure you are already in a rebase, run
Expand Down Expand Up @@ -149,7 +145,7 @@ make "$1"' failed to apply ${patch}. This is because there is a conflict between
the checked out version of upstream and the patch set. To resolve this conflict
run:
FROM=\$LAST_KNOWN_GOOD_COMMIT TO=\$NEW_COMMIT make upstream.rebase
FROM=\$LAST_KNOWN_GOOD_COMMIT make upstream.rebase
This will walk you through resolving the conflict and producing a patch set that
cleanly applies to the current upstream.
Expand Down

0 comments on commit 3824ad2

Please sign in to comment.