sparse-intern-71089
02/07/2024, 9:34 AMmany-telephone-49025
02/07/2024, 9:34 AMsteep-flower-90579
02/07/2024, 10:01 AMmany-telephone-49025
02/07/2024, 10:24 AMthankful-match-46035
02/07/2024, 11:36 AMthankful-match-46035
02/07/2024, 11:37 AMlimited-rainbow-51650
02/07/2024, 12:50 PMthankful-match-46035
02/07/2024, 12:51 PMlimited-rainbow-51650
02/07/2024, 12:52 PMmany-telephone-49025
02/07/2024, 12:52 PMlimited-rainbow-51650
02/07/2024, 12:53 PMthankful-match-46035
02/07/2024, 12:55 PMlimited-rainbow-51650
02/07/2024, 1:08 PMlimited-rainbow-51650
02/07/2024, 1:21 PM- name: Publish SDKs
uses: pulumi/pulumi-package-publisher@v0.0.13
with:
sdk: all
If you want to see how this composite action works, here is the backing repository for it:
https://github.com/pulumi/pulumi-package-publisher
Feel free to include me as reviewer when you create the PR in your repository to activate this.many-telephone-49025
02/07/2024, 3:29 PMresources.go
to modify the gradle file to reflect the repo locationenough-garden-22763
02/07/2024, 5:39 PMenough-garden-22763
02/07/2024, 5:42 PMgroupId = "com.pulumi"
- @many-telephone-49025 which 'repo location' specifically you would like to override?enough-garden-22763
02/07/2024, 5:43 PMbig-architect-71258
02/07/2024, 5:50 PMbuild_sdks
because Pulumiverse does not support publishing Java Packages in Maven.
Makefile:
https://github.com/tmeckel/pulumi-tf-provider-cookiecutter/blob/master/%7B%7Bcookiecutter.provider%7D%7D/Makefile
JAVA_GEN := pulumi-java-gen
JAVA_GEN_VERSION := {{ cookiecutter.__pulumi_java_version }}
....
build_java:: PACKAGE_VERSION := $(shell pulumictl get version --language generic)
build_java:: $(WORKING_DIR)/bin/$(JAVA_GEN)
$(WORKING_DIR)/bin/$(JAVA_GEN) generate --schema provider/cmd/$(PROVIDER)/schema.json --out sdk/java --build gradle-nexus
cd sdk/java/ && \
echo "module fake_java_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
gradle --console=plain build
$(WORKING_DIR)/bin/$(JAVA_GEN)::
$(shell pulumictl download-binary -n pulumi-language-java -v $(JAVA_GEN_VERSION) -r pulumi/pulumi-java)
Release Workflow
https://github.com/tmeckel/pulumi-tf-provider-cookiecutter/blob/master/%7B%7Bcookiecutter.provider%7D%7D/.github/workflows/release.yml
- if: ${{ matrix.language == 'java'}}
name: Setup Java
uses: actions/setup-java@v3
with:
cache: gradle
distribution: temurin
java-version: ${{matrix.javaversion}}
Pull Request validation workflow
https://github.com/tmeckel/pulumi-tf-provider-cookiecutter/blob/master/%7B%7Bcookiecutter.provider%7D%7D/.github/workflows/pull-request.yml
- if: ${{ matrix.language == 'java'}}
name: Setup Java
uses: actions/setup-java@v3
with:
cache: gradle
distribution: temurin
java-version: ${{matrix.javaversion}}
- name: Build SDK
run: make build_${{ matrix.language }}
enough-garden-22763
02/07/2024, 5:53 PMPulumiverse does not support publishing Java Packages in Maven.
enough-garden-22763
02/07/2024, 5:54 PMbig-architect-71258
02/07/2024, 5:55 PMenough-garden-22763
02/07/2024, 5:56 PMlimited-rainbow-51650
02/07/2024, 5:57 PMbig-architect-71258
02/07/2024, 5:57 PMbig-architect-71258
02/07/2024, 5:57 PMmany-telephone-49025
02/07/2024, 8:02 PMsteep-flower-90579
02/07/2024, 9:29 PMsteep-flower-90579
02/13/2024, 1:45 PMmake build_java
error: open /Users/sphilipp/dev/ovh/pulumi-ovh/bin/pulumi-language-java-v0.8.0-darwin-arm64.tar.gz: no such file or directory
/Users/sphilipp/dev/ovh/pulumi-ovh/bin/pulumi-java-gen generate --schema provider/cmd/pulumi-resource-ovh/schema.json --out sdk/java --build gradle-nexus
make: /Users/sphilipp/dev/ovh/pulumi-ovh/bin/pulumi-java-gen: No such file or directory
make: *** [build_java] Error 1
I don’t know how to install the pulumi-java-gen generate CLI.
The make file is on our public repository: https://github.com/ovh/pulumi-ovh/blob/5a2760705b1223a76e859c0596cf9e8a4e10d86f/Makefile#L99-L107
Do you have any idea what’s wrong?enough-garden-22763
02/13/2024, 2:33 PMbin/pulumi-java-gen: .pulumi-java-gen.version
pulumictl download-binary -n pulumi-language-java -v v$(shell cat .pulumi-java-gen.version) -r pulumi/pulumi-java
steep-flower-90579
02/13/2024, 4:38 PMmake build_java
instead `make build`` which installs the tooling 😅.
First step ✅, source code is generated.
I’ll check the next steps to push the JAR :)steep-flower-90579
02/13/2024, 4:57 PMsteep-flower-90579
02/15/2024, 10:47 AMUpdating (dev)
View in Browser (Ctrl+O): <https://app.pulumi.com/wildagsx/pulumi-java/dev/updates/4>
Type Name Status
pulumi:pulumi:Stack pulumi-java-dev
Outputs:
+ version: "1.26"
Resources:
1 unchanged
Duration: 4s
many-telephone-49025
02/15/2024, 11:51 AMthankful-match-46035
02/15/2024, 12:15 PMsteep-flower-90579
02/20/2024, 4:29 PMmake build_java
to generate the Java SDK file, the code source and the gradle configuration are generated.
However my gradle.build
file have its fields artifactId
and groupId
empty:
publishing {
publications {
mainPublication(MavenPublication) {
groupId = ""
artifactId = ""
version = resolvedVersion
from components.java
artifact sourcesJar
artifact javadocJar
pom {
inceptionYear = ""
name = ""
packaging = "jar"
description = ""
How can I configure these fields?big-architect-71258
02/20/2024, 5:00 PM.ArtifactID
and .GroupID
(screenshot). While generating the gradle.build
from the template, the values are copied over from the package info (https://github.com/pulumi/pulumi-java/blob/f7468e19e755561d2a8770ebcc0374245c424b29/pkg/codegen/java/templates_gradle.go#L87).
There has been an (already closed) issue about this: https://github.com/pulumi/pulumi-java/issues/1118. So ensure that you are on the latest pulumi-java
version v0.9.9.steep-flower-90579
02/20/2024, 5:14 PMsteep-flower-90579
02/21/2024, 8:59 AMOVH_CLOUD_PROJECT_SERVICE
environment variable is used.`. I think this comment is directly imported from our TF provider but the code is not right.
2- the generated version.txt file package is hard coded with com/pulumi
but the gradle build generates it in com/ovh/ovh
according to the configuration, I think it’s related to the opened issue https://github.com/pulumi/pulumi-java/issues/1110
Thanks!thankful-match-46035
02/22/2024, 4:14 PMlimited-rainbow-51650
02/22/2024, 4:46 PMversion.txt
file? Is that pulumi-java
?echoing-dinner-19531
02/22/2024, 6:29 PMsteep-flower-90579
03/09/2024, 10:46 AMenough-garden-22763
03/22/2024, 3:51 PMsteep-flower-90579
04/12/2024, 12:54 PMsteep-flower-90579
05/15/2024, 11:30 AMmany-telephone-49025
05/15/2024, 4:30 PMenough-garden-22763
05/15/2024, 7:07 PMsteep-flower-90579
05/16/2024, 6:53 AMfreezing-appointment-56309
05/20/2024, 1:25 PMsteep-flower-90579
05/20/2024, 4:03 PMfreezing-appointment-56309
05/20/2024, 4:07 PMbig-architect-71258
05/21/2024, 6:58 PMfreezing-appointment-56309
05/21/2024, 7:16 PMsteep-flower-90579
05/22/2024, 5:07 AMbig-architect-71258
05/24/2024, 7:51 PMsteep-flower-90579
05/25/2024, 7:19 AMsteep-flower-90579
05/26/2024, 11:49 AM