Skip to content

Commit

Permalink
add go and python sdks
Browse files Browse the repository at this point in the history
  • Loading branch information
aschepis committed Apr 26, 2024
1 parent c93abdc commit 26d6ca3
Show file tree
Hide file tree
Showing 659 changed files with 37,729 additions and 2,016 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNETVERSION }}
# - if: matrix.language == 'python'
# name: Setup Python
# uses: actions/setup-python@v5
# with:
# python-version: ${{ env.PYTHONVERSION }}
- if: matrix.language == 'python'
name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHONVERSION }}
- if: matrix.language == 'java'
name: Setup Java
uses: actions/setup-java@v4
Expand All @@ -133,8 +133,8 @@ jobs:
- nodejs
- dotnet
- java
# - go
# - python
- go
- python

# - name: Download provider + tfgen binaries
# uses: actions/download-artifact@v4
Expand Down
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Pulumi.*.yaml
yarn.lock
**/pulumiManifest.go

ci-scripts
provider/shim/coverage.txt
provider/**/schema-embed.json
**/version.txt
Expand All @@ -30,15 +29,13 @@ sdk/java/gradle
sdk/java/gradlew
sdk/java/gradlew.bat

!upstream-tools/yarn.lock

__pycache__
venv
sdk/python/build
sdk/python/*.egg-info
sdk/python/venv

.envrc

sdk/python/venv
go.work
go.work.sum
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

## Unreleased

- Publish Go and Python SDKs
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ development: install_plugins provider build_sdks install_sdks

build: install_plugins provider build_sdks install_sdks

# TODO: get python and go SDKs building
# build_sdks: build_nodejs build_python build_go build_dotnet build_java
build_sdks: build_nodejs build_dotnet build_java
build_sdks: build_nodejs build_python build_go build_dotnet build_java

install_go_sdk:

Expand Down Expand Up @@ -64,14 +62,15 @@ build_nodejs:
build_python: PYPI_VERSION := $(shell pulumictl get version --language python)
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
build_python: export PULUMI_CONVERT_EXAMPLES_CACHE_DIR := $(WORKING_DIR)/.pulumi/examples-cache
build_python:
rm -rf sdk/python/
PULUMI_CONVERT=$(PULUMI_CONVERT) PULUMI_DISABLE_AUTOMATIC_PLUGIN_ACQUISITION=$(PULUMI_CONVERT) $(WORKING_DIR)/bin/$(TFGEN) python --out sdk/python/
cd sdk/python/ && \
printf "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.21\n" > go.mod && \
cp ../../README.md . && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
cp ../../pyproject.toml ./bin/ && \
sed -i.bak -e 's/^ version = .*/ version = "$(PYPI_VERSION)"/g' ./bin/pyproject.toml && \
rm ./bin/pyproject.toml.bak && rm ./bin/go.mod && \
python3 -m venv venv && \
Expand Down Expand Up @@ -141,5 +140,5 @@ bin/pulumi-java-gen:
@mkdir -p .pulumi
@cd provider && go list -f "{{slice .Version 1}}" -m github.com/pulumi/pulumi/pkg/v3 | tee ../$@

# .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 test_provider
.PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_go build_nodejs clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen test_provider
.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 test_provider
# .PHONY: development build build_sdks install_go_sdk install_java_sdk install_python_sdk install_sdks only_build build_go build_nodejs clean cleanup help install_dotnet_sdk install_nodejs_sdk install_plugins lint_provider provider test tfgen test_provider
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[project]
name = "pulumi_chronosphere"
description = "A Pulumi package for creating and managing Chronosphere resources."
dependencies = ["parver>=0.2.1", "pulumi>=3.0.0,<4.0.0", "semver>=2.8.1"]
keywords = ["pulumi", "chronosphere"]
readme = "README.md"
requires-python = ">=3.8"
version = "0.0.0"
[project.license]
text = "Apache-2.0"
[project.urls]
Homepage = "https://chronosphere.io"
Repository = "https://github.com/chronosphereio/pulumi-chronosphere"

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool]
[tool.setuptools]
[tool.setuptools.package-data]
pulumi_chronosphere = ["py.typed", "pulumi-plugin.json"]

This file was deleted.

This file was deleted.

24 changes: 0 additions & 24 deletions sdk/dotnet/obj/Debug/net6.0/Pulumi.Chronosphere.AssemblyInfo.cs

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file removed sdk/dotnet/obj/Debug/net6.0/Pulumi.Chronosphere.dll
Binary file not shown.
Binary file removed sdk/dotnet/obj/Debug/net6.0/Pulumi.Chronosphere.pdb
Binary file not shown.

This file was deleted.

Loading

0 comments on commit 26d6ca3

Please sign in to comment.