[automation/nodejs] - Fix missing OpTypes and PreviewOptions (#6507)

This commit is contained in:
Komal 2021-03-11 16:23:44 -08:00 committed by stack72
parent dd934cc6f9
commit fd3ec6b86f
5 changed files with 59 additions and 105 deletions

View file

@ -32,7 +32,7 @@ jobs:
steps:
- if: github.ref == 'refs/heads/feature-3.0'
run:
echo "VERSION_PREFIX=v3.0.0" >> $GITHUB_ENV
echo "VERSION_PREFIX=3.0.0" >> $GITHUB_ENV
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
@ -89,7 +89,7 @@ jobs:
steps:
- if: github.ref == 'refs/heads/feature-3.0'
run:
echo "VERSION_PREFIX=v3.0.0" >> $GITHUB_ENV
echo "VERSION_PREFIX=3.0.0" >> $GITHUB_ENV
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
@ -146,7 +146,7 @@ jobs:
steps:
- if: github.ref == 'refs/heads/feature-3.0'
run:
echo "VERSION_PREFIX=v3.0.0" >> $GITHUB_ENV
echo "VERSION_PREFIX=3.0.0" >> $GITHUB_ENV
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:
@ -227,7 +227,7 @@ jobs:
steps:
- if: github.ref == 'refs/heads/feature-3.0'
run:
echo "VERSION_PREFIX=v3.0.0" >> $GITHUB_ENV
echo "VERSION_PREFIX=3.0.0" >> $GITHUB_ENV
- name: Install DotNet ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v1
with:
@ -320,7 +320,7 @@ jobs:
steps:
- if: github.ref == 'refs/heads/feature-3.0'
run:
echo "VERSION_PREFIX=v3.0.0" >> $GITHUB_ENV
echo "VERSION_PREFIX=3.0.0" >> $GITHUB_ENV
- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v1
with:

View file

@ -1,8 +1,49 @@
### Breaking
### Breaking Changes
- [sdk/nodejs] Drop support for NodeJS < v11.x
### Improvements
- [cli] Set pagination defaults for `pulumi stack history` to 10 entries.
[#6739](https://github.com/pulumi/pulumi/pull/6739)
- [sdk/nodejs] Enable nodejs dynamic provider caching by default on program side.
[#6704](https://github.com/pulumi/pulumi/pull/6704)
### Bug Fixes
- [CLI] Standardize the `--stack` flag to *not* set the stack as current (i.e. setStack=false) across CLI commands.
[#6300](https://github.com/pulumi/pulumi/pull/6300)
- [sdk/cli] Bump version of Pulumi CLI and SDK to v3
[#6554](https://github.com/pulumi/pulumi/pull/6554)
- [sdk/go] Simplify `Apply` method options to reduce binary size
[#6607](https://github.com/pulumi/pulumi/pull/6607)
- [Automation/*] All operations use `--stack` to specify the stack instead of running `select stack` before the operation.
[#6300](https://github.com/pulumi/pulumi/pull/6300)
- [Automation/go] Moving go automation API package from sdk/v2/go/x/auto -> sdk/v2/go/auto
[#6518](https://github.com/pulumi/pulumi/pull/6518)
- [Automation/nodejs] Moving NodeJS automation API package from sdk/nodejs/x/automation -> sdk/nodejs/automation
[#6518](https://github.com/pulumi/pulumi/pull/6518)
- [Automation/python] Moving Python automation API package from pulumi.x.automation -> pulumi.automation
[#6518](https://github.com/pulumi/pulumi/pull/6518)
- [Automation/go] Moving go automation API package from sdk/v2/go/x/auto -> sdk/v2/go/auto
[#6518](https://github.com/pulumi/pulumi/pull/6518)
- [sdk/*] Refactor Mocks newResource and call to accept an argument struct for future extensibility rather than individual args
[#6672](https://github.com/pulumi/pulumi/pull/6672)
- [sdk/python] Improved dict key translation support (3.0-based providers will opt-in to the improved behavior)
[#6695](https://github.com/pulumi/pulumi/pull/6695)
- [CLI] Remove `pulumi history` command. This was previously deprecated and replaced by `pulumi stack history`
[#6724](https://github.com/pulumi/pulumi/pull/6724)
### Enhancements
- [sdk/nodejs] Add support for multiple V8 VM contexts in closure serialization.
[#6648](https://github.com/pulumi/pulumi/pull/6648)
### Bug Fixes

View file

@ -61,26 +61,7 @@ test_all:: build test_build $(SUB_PROJECTS:%=%_install)
cd pkg && $(GO_TEST) ${PROJECT_PKGS}
cd tests && $(GO_TEST) -p=1 ${TESTS_PKGS}
.PHONY: publish_tgz
publish_tgz:
$(call STEP_MESSAGE)
./scripts/publish_tgz.sh
.PHONY: publish_packages
publish_packages:
$(call STEP_MESSAGE)
./scripts/publish_packages.sh
.PHONY: test_containers
test_containers:
$(call STEP_MESSAGE)
./scripts/test-containers.sh ${VERSION}
# The travis_* targets are entrypoints for CI.
.PHONY: travis_cron travis_push travis_pull_request travis_api
travis_cron: install dist all
travis_push: install dist publish_tgz only_test publish_packages
travis_pull_request:
$(call STEP_MESSAGE)
@echo moved to GitHub Actions
travis_api: install dist all

View file

@ -9,12 +9,18 @@ if [[ "${TRAVIS_PUBLISH_PACKAGES:-}" == "true" ]]; then
echo "Publishing NPM package to NPMjs.com:"
NPM_TAG="dev"
if [[ "${TRAVIS_BRANCH:-}" == features/* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}" | sed -e 's|^features/|feature-|g')
## We need split the GITHUB_REF into the correct parts
## so that we can test for NPM Tags
IFS='/' read -ra my_array <<< "${GITHUB_REF:-}"
BRANCH_NAME="${my_array[2]}"
echo $BRANCH_NAME
if [[ "${BRANCH_NAME}" == features/* ]]; then
NPM_TAG=$(echo "${BRANCH_NAME}" | sed -e 's|^features/|feature-|g')
fi
if [[ "${TRAVIS_BRANCH:-}" == feature-* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}")
if [[ "${BRANCH_NAME}" == feature-* ]]; then
NPM_TAG=$(echo "${BRANCH_NAME}")
fi
PKG_NAME=$(jq -r .name < "${ROOT}/sdk/nodejs/bin/package.json")

View file

@ -1,74 +0,0 @@
#!/bin/bash
# publish_packages.sh uploads our packages to package repositories like npm
set -o nounset
set -o errexit
set -o pipefail
readonly ROOT=$(dirname "${0}")/..
NPM_VERSION=$(pulumictl get version --language javascript)
"${ROOT}/scripts/build-sdk.sh" $(echo ${NPM_VERSION} | sed -e 's/\+.*//g') $(git rev-parse HEAD)
if [[ "${TRAVIS_PUBLISH_PACKAGES:-}" == "true" ]]; then
echo "Publishing NPM package to NPMjs.com:"
NPM_TAG="dev"
if [[ "${TRAVIS_BRANCH:-}" == features/* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}" | sed -e 's|^features/|feature-|g')
fi
if [[ "${TRAVIS_BRANCH:-}" == feature-* ]]; then
NPM_TAG=$(echo "${TRAVIS_BRANCH}")
fi
PKG_NAME=$(jq -r .name < "${ROOT}/sdk/nodejs/bin/package.json")
PKG_VERSION=$(jq -r .version < "${ROOT}/sdk/nodejs/bin/package.json")
# If the package doesn't have an alpha tag, use the tag of latest instead of
# dev. NPM uses this tag as the default version to add, so we want it to mean
# the newest released version.
if [[ "${PKG_VERSION}" != *-alpha* ]]; then
NPM_TAG="latest"
fi
# Now, perform the publish. The logic here is a little goofy because npm provides
# no way to say "if the package already exists, don't fail" but we want these
# semantics (so, for example, we can restart builds which may have failed after
# publishing, or so two builds can run concurrently, which is the case for when we
# tag master right after pushing a new commit and the push and tag travis jobs both
# get the same version.
#
# We exploit the fact that `npm info <package-name>@<package-version>` has no output
# when the package does not exist.
pushd "${ROOT}/sdk/nodejs/bin"
if [ "$(npm info ${PKG_NAME}@${PKG_VERSION})" == "" ]; then
if ! npm publish -tag "${NPM_TAG}"; then
# if we get here, we have a TOCTOU issue, so check again
# to see if it published. If it didn't bail out.
if [ "$(npm info ${PKG_NAME}@${PKG_VERSION})" == "" ]; then
echo "NPM publishing failed, aborting"
exit 1
fi
fi
fi
npm info 2>/dev/null
popd
echo "Publishing Pip package to pulumi.com:"
twine upload \
-u pulumi -p "${PYPI_PASSWORD}" \
"${ROOT}/sdk/python/env/src/dist"/*.whl \
--skip-existing \
--verbose
echo "Publishing .nupkgs to nuget.org:"
find /opt/pulumi/nuget -name 'Pulumi*.nupkg' \
-exec dotnet nuget push -k ${NUGET_PUBLISH_KEY} -s https://api.nuget.org/v3/index.json {} ';'
echo "Publishing Docker containers to hub.docker.com:"
"${ROOT}/scripts/build-docker.sh" "${NPM_VERSION}" --publish
echo "Building package docs:"
"$(go env GOPATH)/src/github.com/pulumi/scripts/ci/build-package-docs.sh" pulumi
fi
exit 0