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 11, 2024
1 parent 0acd49a commit 382fa87
Show file tree
Hide file tree
Showing 1,264 changed files with 235,289 additions and 291 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,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 @@ -140,8 +140,8 @@ jobs:
- nodejs
- dotnet
- java
# - go
# - python
- go
- python

# - name: Download provider + tfgen binaries
# uses: actions/download-artifact@v4
Expand Down
39 changes: 38 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,39 @@
.pulumi/
.idea
.code
**/vendor/
.pulumi
**/bin/
**/obj/
Pulumi.*.yaml
**/node_modules/
.DS_Store
**/.vscode/

**/command-output/

.idea/
*.iml

yarn.lock
**/pulumiManifest.go

**/version.txt
**/nuget
**/dist

sdk/java/build
sdk/java/.gradle
sdk/java/gradle
sdk/java/gradlew
sdk/java/gradlew.bat

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

.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 @@ -19,9 +19,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 @@ -66,14 +64,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 @@ -152,5 +151,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
Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

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"]
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>Pulumi.Chronosphere</id>
<version>0.0.2-alpha.1712280084+18ebf358.dirty</version>
<version>0.0.1-alpha.1712866649+913ca173</version>
<authors>Chronosphere</authors>
<license type="expression">Apache-2.0</license>
<licenseUrl>https://licenses.nuget.org/Apache-2.0</licenseUrl>
<icon>logo.png</icon>
<projectUrl>https://chronosphere.io/</projectUrl>
<description>Chronosphere Pulumi Provider</description>
<repository type="git" url="https://github.com/chronosphereio/pulumi-chronosphere" commit="18ebf3587d13bbc8be19ea972815cc775e8c82f1" />
<repository type="git" url="https://github.com/chronosphereio/pulumi-chronosphere" commit="913ca17374e402d5188c4e56f2df89200fb535fb" />
<dependencies>
<group targetFramework="net6.0">
<dependency id="Pulumi" version="[3.54.1, 4.0.0)" exclude="Build,Analyzers" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
[assembly: System.Reflection.AssemblyCompanyAttribute("Chronosphere")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Chronosphere Pulumi Provider")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.2.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.2-alpha.1712280084+18ebf358.dirty.18ebf3587d13bbc8be19ea972815cc775e8c82f1")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("0.0.1.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("0.0.1-alpha.1712866649+913ca173.913ca17374e402d5188c4e56f2df89200fb535fb")]
[assembly: System.Reflection.AssemblyProductAttribute("Pulumi.Chronosphere")]
[assembly: System.Reflection.AssemblyTitleAttribute("Pulumi.Chronosphere")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.2.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("0.0.1.0")]
[assembly: System.Reflection.AssemblyMetadataAttribute("RepositoryUrl", "https://github.com/chronosphereio/pulumi-chronosphere")]

// Generated by the MSBuild WriteCodeFragment class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7dd0e850e135772e5d07df286c3a48cb6b64db0c9ec95cc508b7107bf849be43
cb4d76dbf3fcbc4b52596481f3c25609475e71d54021a86c60f544d4926b1edc
Binary file modified sdk/dotnet/obj/Debug/net6.0/Pulumi.Chronosphere.dll
Binary file not shown.
Binary file modified sdk/dotnet/obj/Debug/net6.0/Pulumi.Chronosphere.pdb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documents":{"/Users/aschepis/src/chronosphere/pulumi-chronosphere/*":"https://raw.githubusercontent.com/chronosphereio/pulumi-chronosphere/18ebf3587d13bbc8be19ea972815cc775e8c82f1/*"}}
{"documents":{"/Users/aschepis/src/chronosphere/pulumi-chronosphere/*":"https://raw.githubusercontent.com/chronosphereio/pulumi-chronosphere/913ca17374e402d5188c4e56f2df89200fb535fb/*"}}
Binary file modified sdk/dotnet/obj/Debug/net6.0/ref/Pulumi.Chronosphere.dll
Binary file not shown.
Binary file modified sdk/dotnet/obj/Debug/net6.0/refint/Pulumi.Chronosphere.dll
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"projects": {
"/Users/aschepis/src/chronosphere/pulumi-chronosphere/sdk/dotnet/Pulumi.Chronosphere.csproj": {
"version": "0.0.2-alpha.1712280084+18ebf358.dirty",
"version": "0.0.1-alpha.1712866649+913ca173",
"restore": {
"projectUniqueName": "/Users/aschepis/src/chronosphere/pulumi-chronosphere/sdk/dotnet/Pulumi.Chronosphere.csproj",
"projectName": "Pulumi.Chronosphere",
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@
"/Users/aschepis/.nuget/packages/": {}
},
"project": {
"version": "0.0.2-alpha.1712280084+18ebf358.dirty",
"version": "0.0.1-alpha.1712866649+913ca173",
"restore": {
"projectUniqueName": "/Users/aschepis/src/chronosphere/pulumi-chronosphere/sdk/dotnet/Pulumi.Chronosphere.csproj",
"projectName": "Pulumi.Chronosphere",
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/obj/project.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "VlYUBR6nt2+hfLSK5zUpJOiMm3cCIuRezgF6uSvcEvKwiszbVQ/G2WkVFbQmzhvnMuCYYaRH4d4BfGHLLhw3GA==",
"dgSpecHash": "1CPIyjAMZLzhVDDS/hFxccB1wvAnCY5FO/ziBHdQCZ1a1CSp2q21/cD5NbKvQjYQFfxmlqBOJbjS/Lv8CJWn8g==",
"success": true,
"projectFilePath": "/Users/aschepis/src/chronosphere/pulumi-chronosphere/sdk/dotnet/Pulumi.Chronosphere.csproj",
"expectedPackageFiles": [
Expand Down
2 changes: 1 addition & 1 deletion sdk/dotnet/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.2-alpha.1712280084+18ebf358.dirty
0.0.1-alpha.1712866649+913ca173
File renamed without changes.
Loading

0 comments on commit 382fa87

Please sign in to comment.