2018-04-28 22:05:30 +02:00
|
|
|
PROJECT_NAME := Pulumi SDK
|
2019-10-26 01:59:50 +02:00
|
|
|
SUB_PROJECTS := sdk/dotnet sdk/nodejs sdk/python sdk/go
|
2017-11-12 01:20:56 +01:00
|
|
|
include build/common.mk
|
2017-06-21 23:23:48 +02:00
|
|
|
|
2021-03-11 21:41:45 +01:00
|
|
|
|
2021-03-17 14:20:05 +01:00
|
|
|
PROJECT := github.com/pulumi/pulumi/pkg/v3/cmd/pulumi
|
2020-03-26 21:42:43 +01:00
|
|
|
PROJECT_PKGS := $(shell cd ./pkg && go list ./... | grep -v /vendor/)
|
2020-03-27 00:32:20 +01:00
|
|
|
TESTS_PKGS := $(shell cd ./tests && go list ./... | grep -v tests/templates | grep -v /vendor/)
|
2021-03-10 20:03:29 +01:00
|
|
|
VERSION := $(shell pulumictl get version)
|
2016-11-15 20:30:34 +01:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
TESTPARALLELISM := 10
|
2018-01-24 00:56:58 +01:00
|
|
|
|
2020-03-19 00:41:23 +01:00
|
|
|
ensure::
|
|
|
|
$(call STEP_MESSAGE)
|
2021-03-11 21:41:45 +01:00
|
|
|
@echo "cd sdk && go mod download"; cd sdk && go mod download
|
|
|
|
@echo "cd pkg && go mod download"; cd pkg && go mod download
|
|
|
|
@echo "cd tests && go mod download"; cd tests && go mod download
|
2020-03-19 00:41:23 +01:00
|
|
|
|
2018-07-12 22:29:35 +02:00
|
|
|
build-proto::
|
|
|
|
cd sdk/proto && ./generate.sh
|
|
|
|
|
2020-03-09 18:35:20 +01:00
|
|
|
.PHONY: generate
|
|
|
|
generate::
|
|
|
|
$(call STEP_MESSAGE)
|
|
|
|
echo "Generate static assets bundle for docs generator"
|
2020-04-16 18:05:26 +02:00
|
|
|
cd pkg && go generate ./codegen/docs/gen.go
|
2020-03-09 18:35:20 +01:00
|
|
|
|
2020-05-04 23:26:52 +02:00
|
|
|
build:: generate
|
2021-03-17 14:20:05 +01:00
|
|
|
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=${VERSION}" ${PROJECT}
|
2017-01-28 00:42:55 +01:00
|
|
|
|
2020-12-24 00:10:05 +01:00
|
|
|
build_debug:: generate
|
2021-03-17 14:20:05 +01:00
|
|
|
cd pkg && go install -gcflags="all=-N -l" -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=${VERSION}" ${PROJECT}
|
2020-12-24 00:10:05 +01:00
|
|
|
|
2020-05-04 23:26:52 +02:00
|
|
|
install:: generate
|
2021-03-17 14:20:05 +01:00
|
|
|
cd pkg && GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=${VERSION}" ${PROJECT}
|
2017-10-05 23:08:35 +02:00
|
|
|
|
2020-09-09 22:37:03 +02:00
|
|
|
install_all:: install
|
|
|
|
|
2020-05-04 23:26:52 +02:00
|
|
|
dist:: build
|
2021-03-17 14:20:05 +01:00
|
|
|
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=${VERSION}" ${PROJECT}
|
2018-08-08 22:00:42 +02:00
|
|
|
|
2020-05-14 05:27:15 +02:00
|
|
|
# NOTE: the brew target intentionally avoids the dependency on `build`, as it does not require the language SDKs.
|
2021-03-18 03:07:02 +01:00
|
|
|
brew:: BREW_VERSION := $(shell scripts/get-version HEAD)
|
2020-05-14 05:27:15 +02:00
|
|
|
brew::
|
2021-03-17 14:20:05 +01:00
|
|
|
cd pkg && go install -ldflags "-X github.com/pulumi/pulumi/pkg/v3/version.Version=${BREW_VERSION}" ${PROJECT}
|
2020-05-14 05:27:15 +02:00
|
|
|
|
2017-11-12 01:20:56 +01:00
|
|
|
lint::
|
2020-03-27 04:19:18 +01:00
|
|
|
for DIR in "pkg" "sdk" "tests" ; do \
|
2020-04-07 04:43:16 +02:00
|
|
|
pushd $$DIR ; golangci-lint run -c ../.golangci.yml --timeout 5m ; popd ; \
|
2020-03-18 21:51:25 +01:00
|
|
|
done
|
2017-01-28 00:42:55 +01:00
|
|
|
|
2020-05-04 23:26:52 +02:00
|
|
|
test_fast:: build
|
2020-03-25 23:57:46 +01:00
|
|
|
cd pkg && $(GO_TEST_FAST) ${PROJECT_PKGS}
|
2017-08-06 17:52:32 +02:00
|
|
|
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
test_build:: $(SUB_PROJECTS:%=%_install)
|
2021-06-21 18:51:41 +02:00
|
|
|
cd tests/testprovider && go build -o pulumi-resource-testprovider
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
cd tests/integration/construct_component/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
2021-04-16 20:49:21 +02:00
|
|
|
cd tests/integration/construct_component/testcomponent-go && go build -o pulumi-resource-testcomponent
|
2021-04-05 20:11:27 +02:00
|
|
|
cd tests/integration/construct_component_slow/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
2021-04-09 23:36:22 +02:00
|
|
|
cd tests/integration/construct_component_plain/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
2021-04-18 18:18:25 +02:00
|
|
|
cd tests/integration/construct_component_plain/testcomponent-go && go build -o pulumi-resource-testcomponent
|
2021-06-21 18:51:41 +02:00
|
|
|
cd tests/integration/construct_component_unknown/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
|
|
|
cd tests/integration/construct_component_unknown/testcomponent-go && go build -o pulumi-resource-testcomponent
|
2021-05-19 16:11:18 +02:00
|
|
|
cd tests/integration/component_provider_schema/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
|
|
|
cd tests/integration/component_provider_schema/testcomponent-go && go build -o pulumi-resource-testcomponent
|
2021-06-26 03:41:54 +02:00
|
|
|
cd tests/integration/construct_component_error_apply/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
2021-06-30 16:48:56 +02:00
|
|
|
cd tests/integration/construct_component_methods/testcomponent && yarn install && yarn link @pulumi/pulumi && yarn run tsc
|
2021-07-02 00:46:16 +02:00
|
|
|
cd tests/integration/construct_component_methods/testcomponent-go && go build -o pulumi-resource-testcomponent
|
Initial support for remote component construction. (#5280)
These changes add initial support for the construction of remote
components. For now, this support is limited to the NodeJS SDK;
follow-up changes will implement support for the other SDKs.
Remote components are component resources that are constructed and
managed by plugins rather than by Pulumi programs. In this sense, they
are a bit like cloud resources, and are supported by the same
distribution and plugin loading mechanisms and described by the same
schema system.
The construction of a remote component is initiated by a
`RegisterResourceRequest` with the new `remote` field set to `true`.
When the resource monitor receives such a request, it loads the plugin
that implements the component resource and calls the `Construct`
method added to the resource provider interface as part of these
changes. This method accepts the information necessary to construct the
component and its children: the component's name, type, resource
options, inputs, and input dependencies. It is responsible for
dispatching to the appropriate component factory to create the
component, then returning its URN, resolved output properties, and
output property dependencies. The dependency information is necessary to
support features such as delete-before-replace, which rely on precise
dependency information for custom resources.
These changes also add initial support for more conveniently
implementing resource providers in NodeJS. The interface used to
implement such a provider is similar to the dynamic provider interface
(and may be unified with that interface in the future).
An example of a NodeJS program constructing a remote component resource
also implemented in NodeJS can be found in
`tests/construct_component/nodejs`.
This is the core of #2430.
2020-09-08 04:33:55 +02:00
|
|
|
|
|
|
|
test_all:: build test_build $(SUB_PROJECTS:%=%_install)
|
2020-03-25 23:57:46 +01:00
|
|
|
cd pkg && $(GO_TEST) ${PROJECT_PKGS}
|
2020-11-12 23:45:06 +01:00
|
|
|
cd tests && $(GO_TEST) -p=1 ${TESTS_PKGS}
|
Makeify more; add a "full build" target (#193)
* Makeify more; add a "full build" target
This change uses make for more of our tree. Namely, the AWS provider
and LumiJS compilers each now use make to build and/or install them.
Not only does this bring about some consistency to how we build and
test things, but also made it easy to add a full build target:
$ make all
This target will build, test, and install the core Go tools, the LumiJS
compiler, and the AWS provider, in that order.
Each can be made in isolation, however, which ensures that the inner
loop for those is fast and so that, when it comes to finishing
pulumi/lumi#147, we can easily split them out and make from the top.
2017-06-02 23:26:34 +02:00
|
|
|
|
2021-01-04 19:28:13 +01:00
|
|
|
.PHONY: test_containers
|
|
|
|
test_containers:
|
2020-04-30 21:52:05 +02:00
|
|
|
$(call STEP_MESSAGE)
|
2021-01-04 19:28:13 +01:00
|
|
|
./scripts/test-containers.sh ${VERSION}
|