Started on adding support for 1.17 spec. Start on provider-models to ease java development

Signed-off-by: Knut-Erik Johnsen <abstract@knut-erik.org>
This commit is contained in:
Knut-Erik Johnsen 2024-10-11 12:18:59 +02:00
parent 57d4f1c270
commit 81d0fa1d5a
23 changed files with 462 additions and 68 deletions

View File

@ -0,0 +1,59 @@
name: Release a new version
on:
workflow_dispatch:
inputs:
releaseversion:
type: string
description: 'Version to release'
required: true
provider:
type: string
description: 'Version to release'
required: true
options:
- provider-upjet-azure
- provider-upjet-azuread
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'oracle'
cache: maven
server-id: central
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- name: Fetch crds
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
run : ./fecth.sh
- name: List crds
working-directory: "./provider-models/crossplane-${{ github.event.inputs.provider }}/src/main/resources/kubernetes"
run : ls
#- name: Set the revision property
# run: mvn versions:set-property -Dproperty=revision "-DnewVersion=${{ github.event.inputs.releaseversion }}" -DgenerateBackupPoms=false
#- name: Build with Maven
# run: mvn -B deploy --file pom.xml -Pdeploy
# env:
# MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
# MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
# MAVEN_OPTS: "-Xmx2048m"
#- name: Create release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# tag: "${{ github.event.inputs.releaseversion }}"
# run: |
# gh release create "$tag" \
# --repo="$GITHUB_REPOSITORY" \
# --title="v${tag#v}" \
# --generate-notes \
# --target "$GITHUB_SHA"

View File

@ -5,7 +5,7 @@ on:
inputs:
releaseversion:
type: string
description: 'Version to reelase'
description: 'Version to release'
required: true

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ replay_pid*
.idea/
target/
generated/
provider-models/**/src/main/resources/kubernetes/*.yaml

View File

@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@ -79,6 +80,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
kind:
description: |-
kind is the serialized kind of the resource. It is normally CamelCase and singular.
@ -103,6 +105,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
singular:
description: singular is the singular name of the resource. It
must be all lowercase. Defaults to lowercased `kind`.
@ -111,6 +114,9 @@ spec:
- kind
- plural
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
connectionSecretKeys:
description: |-
ConnectionSecretKeys is the list of keys that will be exposed to the end
@ -222,6 +228,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
required:
- conversionReviewVersions
type: object
@ -268,12 +275,18 @@ spec:
required:
- name
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
group:
description: |-
Group specifies the API group of the defined composite resource.
Composite resources are served under `/apis/<group>/...`. Must match the
name of the XRD (in the form `<names.plural>.<group>`).
type: string
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
metadata:
description: Metadata specifies the desired metadata for the defined
composite resource and claim CRD's.
@ -312,6 +325,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
kind:
description: |-
kind is the serialized kind of the resource. It is normally CamelCase and singular.
@ -336,6 +350,7 @@ spec:
items:
type: string
type: array
x-kubernetes-list-type: atomic
singular:
description: singular is the singular name of the resource. It
must be all lowercase. Defaults to lowercased `kind`.
@ -344,6 +359,9 @@ spec:
- kind
- plural
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
versions:
description: |-
Versions is the list of all API versions of the defined composite

View File

@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@ -78,6 +79,9 @@ spec:
- apiVersion
- kind
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
environment:
description: |-
Environment configures the environment in which resources are rendered.
@ -584,17 +588,20 @@ spec:
Mode controls what type or "mode" of Composition will be used.
"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"Pipeline" indicates that a Composition specifies a pipeline of
Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update.
"Pipeline" indicates that a Composition specifies a pipeline
of Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode of Composition
uses an array of resources, each a template for a composed resource.
All Compositions should use Pipeline mode. Resources mode is deprecated.
Resources mode won't be removed in Crossplane 1.x, and will remain the
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
enum:
- Resources
- Pipeline
@ -608,6 +615,9 @@ spec:
PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
A PatchSet is a set of patches that can be reused from all resources within
@ -984,10 +994,6 @@ spec:
The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
items:
description: A PipelineStep in a Composition Function pipeline.
properties:
@ -1058,6 +1064,9 @@ spec:
- step
type: object
type: array
x-kubernetes-list-map-keys:
- step
x-kubernetes-list-type: map
publishConnectionDetailsWithStoreConfigRef:
default:
name: default
@ -1085,6 +1094,9 @@ spec:
Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
ComposedTemplate is used to provide information about how the composed resource
@ -1575,7 +1587,14 @@ spec:
type: object
type: array
revision:
description: Revision number. Newer revisions have larger numbers.
description: |-
Revision number. Newer revisions have larger numbers.
This number can change. When a Composition transitions from state A
-> B -> A there will be only two CompositionRevisions. Crossplane will
edit the original CompositionRevision to change its revision number from
0 to 2.
format: int64
type: integer
writeConnectionSecretsToNamespace:
@ -1711,6 +1730,9 @@ spec:
- apiVersion
- kind
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
environment:
description: |-
Environment configures the environment in which resources are rendered.
@ -2217,17 +2239,20 @@ spec:
Mode controls what type or "mode" of Composition will be used.
"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"Pipeline" indicates that a Composition specifies a pipeline of
Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update.
"Pipeline" indicates that a Composition specifies a pipeline
of Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode of Composition
uses an array of resources, each a template for a composed resource.
All Compositions should use Pipeline mode. Resources mode is deprecated.
Resources mode won't be removed in Crossplane 1.x, and will remain the
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
enum:
- Resources
- Pipeline
@ -2241,6 +2266,9 @@ spec:
PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
A PatchSet is a set of patches that can be reused from all resources within
@ -2617,10 +2645,6 @@ spec:
The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
items:
description: A PipelineStep in a Composition Function pipeline.
properties:
@ -2691,6 +2715,9 @@ spec:
- step
type: object
type: array
x-kubernetes-list-map-keys:
- step
x-kubernetes-list-type: map
publishConnectionDetailsWithStoreConfigRef:
default:
name: default
@ -2718,6 +2745,9 @@ spec:
Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
ComposedTemplate is used to provide information about how the composed resource
@ -3208,7 +3238,14 @@ spec:
type: object
type: array
revision:
description: Revision number. Newer revisions have larger numbers.
description: |-
Revision number. Newer revisions have larger numbers.
This number can change. When a Composition transitions from state A
-> B -> A there will be only two CompositionRevisions. Crossplane will
edit the original CompositionRevision to change its revision number from
0 to 2.
format: int64
type: integer
writeConnectionSecretsToNamespace:

View File

@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
@ -73,6 +74,9 @@ spec:
- apiVersion
- kind
type: object
x-kubernetes-validations:
- message: Value is immutable
rule: self == oldSelf
environment:
description: |-
Environment configures the environment in which resources are rendered.
@ -579,17 +583,20 @@ spec:
Mode controls what type or "mode" of Composition will be used.
"Resources" (the default) indicates that a Composition uses what is
commonly referred to as "Patch & Transform" or P&T composition. This mode
of Composition uses an array of resources, each a template for a composed
resource.
"Pipeline" indicates that a Composition specifies a pipeline of
Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update.
"Pipeline" indicates that a Composition specifies a pipeline
of Composition Functions, each of which is responsible for producing
composed resources that Crossplane should create or update. THE PIPELINE
MODE IS A BETA FEATURE. It is not honored if the relevant Crossplane
feature flag is disabled.
"Resources" indicates that a Composition uses what is commonly referred
to as "Patch & Transform" or P&T composition. This mode of Composition
uses an array of resources, each a template for a composed resource.
All Compositions should use Pipeline mode. Resources mode is deprecated.
Resources mode won't be removed in Crossplane 1.x, and will remain the
default to avoid breaking legacy Compositions. However, it's no longer
accepting new features, and only accepting security related bug fixes.
enum:
- Resources
- Pipeline
@ -603,6 +610,9 @@ spec:
PatchSets are only used by the "Resources" mode of Composition. They
are ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
A PatchSet is a set of patches that can be reused from all resources within
@ -979,10 +989,6 @@ spec:
The Pipeline is only used by the "Pipeline" mode of Composition. It is
ignored by other modes.
THIS IS A BETA FIELD. It is not honored if the relevant Crossplane
feature flag is disabled.
items:
description: A PipelineStep in a Composition Function pipeline.
properties:
@ -1083,6 +1089,9 @@ spec:
Resources are only used by the "Resources" mode of Composition. They are
ignored by other modes.
Deprecated: Use Composition Functions instead.
items:
description: |-
ComposedTemplate is used to provide information about how the composed resource

View File

@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:

View File

@ -1,3 +1,4 @@
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:

View File

@ -1,6 +1,6 @@
#!/bin/bash
release="release-1.16"
release="v1.17.1"
apiextensions=$(gh api --jq '.[].name' "/repos/crossplane/crossplane/contents/cluster/crds?ref=${release}" | grep apiextensions)

View File

@ -1,11 +1,11 @@
package io.crossplane.compositefunctions.base;
import io.crossplane.compositefunctions.protobuf.FunctionRunnerServiceGrpc;
import io.crossplane.compositefunctions.protobuf.Requirements;
import io.crossplane.compositefunctions.protobuf.RunFunctionRequest;
import io.crossplane.compositefunctions.protobuf.RunFunctionResponse;
import io.crossplane.compositefunctions.protobuf.State;
import io.crossplane.compositefunctions.protobuf.v1.FunctionRunnerServiceGrpc;
import io.crossplane.compositefunctions.protobuf.v1.Requirements;
import io.crossplane.compositefunctions.protobuf.v1.RunFunctionRequest;
import io.crossplane.compositefunctions.protobuf.v1.RunFunctionResponse;
import io.crossplane.compositefunctions.protobuf.v1.State;
import io.grpc.stub.StreamObserver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -1,8 +1,8 @@
package io.crossplane.compositefunctions.base;
import io.crossplane.compositefunctions.protobuf.Credentials;
import io.crossplane.compositefunctions.protobuf.Resources;
import io.crossplane.compositefunctions.protobuf.State;
import io.crossplane.compositefunctions.protobuf.v1.Credentials;
import io.crossplane.compositefunctions.protobuf.v1.Resources;
import io.crossplane.compositefunctions.protobuf.v1.State;
import java.util.Map;

View File

@ -1,7 +1,7 @@
package io.crossplane.compositefunctions.base;
import io.crossplane.compositefunctions.protobuf.ResourceSelector;
import io.crossplane.compositefunctions.protobuf.Result;
import io.crossplane.compositefunctions.protobuf.v1.ResourceSelector;
import io.crossplane.compositefunctions.protobuf.v1.Result;
import java.util.ArrayList;
import java.util.HashMap;

View File

@ -3,7 +3,7 @@ package io.crossplane.compositefunctions.base;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.protobuf.Struct;
import com.google.protobuf.util.JsonFormat;
import io.crossplane.compositefunctions.protobuf.Resource;
import io.crossplane.compositefunctions.protobuf.v1.Resource;
/**
* Helper class for converting Java Objects into protobuf Structs within the Resource object

View File

@ -3,10 +3,8 @@ package io.crossplane.compositefunctions.starter.config;
import io.crossplane.compositefunctions.starter.conversion.CrossplaneExtraResourcesService;
import io.crossplane.compositefunctions.starter.conversion.CrossplaneObservableService;
import io.crossplane.compositefunctions.starter.conversion.CrossplaneResourceService;
import org.checkerframework.checker.units.qual.C;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
/**
* Autoconfiguration for the crossplane services.

View File

@ -2,8 +2,8 @@ package io.crossplane.compositefunctions.starter.conversion;
import com.google.protobuf.util.JsonFormat;
import io.crossplane.compositefunctions.protobuf.ResourceSelector;
import io.crossplane.compositefunctions.protobuf.Resources;
import io.crossplane.compositefunctions.protobuf.v1.ResourceSelector;
import io.crossplane.compositefunctions.protobuf.v1.Resources;
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.client.utils.Serialization;

View File

@ -2,8 +2,8 @@ package io.crossplane.compositefunctions.starter.conversion;
import com.google.protobuf.util.JsonFormat;
import io.crossplane.compositefunctions.protobuf.Resource;
import io.crossplane.compositefunctions.protobuf.State;
import io.crossplane.compositefunctions.protobuf.v1.Resource;
import io.crossplane.compositefunctions.protobuf.v1.State;
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
import io.fabric8.kubernetes.client.utils.Serialization;
import org.slf4j.Logger;

View File

@ -1,7 +1,7 @@
package io.crossplane.compositefunctions.starter.conversion;
import com.google.protobuf.util.JsonFormat;
import io.crossplane.compositefunctions.protobuf.State;
import io.crossplane.compositefunctions.protobuf.v1.State;
import io.crossplane.compositefunctions.starter.exception.CrossplaneUnmarshallException;
import io.fabric8.kubernetes.client.utils.Serialization;

View File

@ -1,7 +1,7 @@
#!/bin/bash
release="release-1.16"
release="v1.17.1"
file="run_function.proto"
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane/crossplane/contents/apis/apiextensions/fn/proto/v1beta1/${file}?ref=${release}" > $file
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane/crossplane/contents/apis/apiextensions/fn/proto/v1/${file}?ref=${release}" > $file
sed -i '/option go_package/a\option java_package = "io.crossplane.compositefunctions.protobuf";\noption java_multiple_files = true;' $file
sed -i '/option go_package/a\option java_package = "io.crossplane.compositefunctions.protobuf.v1";\noption java_multiple_files = true;' $file

View File

@ -19,10 +19,10 @@ syntax = "proto3";
import "google/protobuf/struct.proto";
import "google/protobuf/duration.proto";
package apiextensions.fn.proto.v1beta1;
package apiextensions.fn.proto.v1;
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1beta1";
option java_package = "io.crossplane.compositefunctions.protobuf";
option go_package = "github.com/crossplane/crossplane/apis/apiextensions/fn/proto/v1";
option java_package = "io.crossplane.compositefunctions.protobuf.v1";
option java_multiple_files = true;
// A FunctionRunnerService is a Composition Function.
@ -123,6 +123,10 @@ message RunFunctionResponse {
// Requirements that must be satisfied for this Function to run successfully.
Requirements requirements = 5;
// Status conditions to be applied to the composite resource. Conditions may also
// optionally be applied to the composite resource's associated claim.
repeated Condition conditions = 6;
}
// RequestMeta contains metadata pertaining to a RunFunctionRequest.
@ -245,6 +249,13 @@ message Result {
// Human-readable details about the result.
string message = 2;
// Optional PascalCase, machine-readable reason for this result. If omitted,
// the value will be ComposeResources.
optional string reason = 3;
// The resources this result targets.
optional Target target = 4;
}
// Severity of Function results.
@ -264,4 +275,54 @@ enum Severity {
// Normal results are emitted as normal events and debug logs associated
// with the composite resource.
SEVERITY_NORMAL = 3;
}
}
// Target of Function results and conditions.
enum Target {
// If the target is unspecified, the result targets the composite resource.
TARGET_UNSPECIFIED = 0;
// Target the composite resource. Results that target the composite resource
// should include detailed, advanced information.
TARGET_COMPOSITE = 1;
// Target the composite and the claim. Results that target the composite and
// the claim should include only end-user friendly information.
TARGET_COMPOSITE_AND_CLAIM = 2;
}
// Status condition to be applied to the composite resource. Condition may also
// optionally be applied to the composite resource's associated claim. For
// detailed information on proper usage of status conditions, please see
// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties.
message Condition {
// Type of condition in PascalCase.
string type = 1;
// Status of the condition.
Status status = 2;
// Reason contains a programmatic identifier indicating the reason for the
// condition's last transition. Producers of specific condition types may
// define expected values and meanings for this field, and whether the values
// are considered a guaranteed API. The value should be a PascalCase string.
// This field may not be empty.
string reason = 3;
// Message is a human readable message indicating details about the
// transition. This may be an empty string.
optional string message = 4;
// The resources this condition targets.
optional Target target = 5;
}
enum Status {
STATUS_CONDITION_UNSPECIFIED = 0;
STATUS_CONDITION_UNKNOWN = 1;
STATUS_CONDITION_TRUE = 2;
STATUS_CONDITION_FALSE = 3;
}

View File

@ -0,0 +1,181 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>io.crossplane.providers</groupId>
<artifactId>crossplane-providers-parent</artifactId>
<version>${revision}</version>
<packaging>pom</packaging>
<url>https://crossplane.io/</url>
<description>Crossplane parent pom for provider models</description>
<properties>
<revision>1.0.0-SNAPSHOT</revision>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.javadoc.skip>true</maven.javadoc.skip>
<!-- Dependency versions -->
<spring-boot.version>3.3.3</spring-boot.version>
<kubernetes-client.version>6.13.3</kubernetes-client.version>
<jackson-databind.version>2.17.1</jackson-databind.version>
<!-- Plugin versions -->
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<central-publishing-maven-plugin.version>0.4.0</central-publishing-maven-plugin.version>
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
<maven-javadoc-plugin.version>3.7.0</maven-javadoc-plugin.version>
<maven-gpg-plugin.version>3.2.4</maven-gpg-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-client-bom</artifactId>
<version>${kubernetes-client.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-databind.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<!-- To make the artifacts with ${revision} usable by maven, they have to be flattened -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<version>${flatten-maven-plugin.version}</version>
<configuration>
<updatePomFile>true</updatePomFile>
<flattenMode>resolveCiFriendliesOnly</flattenMode>
</configuration>
<executions>
<execution>
<id>flatten</id>
<phase>process-resources</phase>
<goals>
<goal>flatten</goal>
</goals>
</execution>
<execution>
<id>flatten.clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>${central-publishing-maven-plugin.version}</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<tokenAuth>true</tokenAuth>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin.version}</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<doclint>all,missing</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<licenses>
<license>
<name>The Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
</license>
</licenses>
<developers>
<developer>
<name>Knut-Erik Johnsen</name>
<organization>Crossplane</organization>
<organizationUrl>https://crossplane.io</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/crossplane/function-sdk-java.git</connection>
<developerConnection>scm:git:ssh://github.com:crossplane/function-sdk-java.git</developerConnection>
<url>https://github.com/crossplane/function-sdk-java/tree/main</url>
</scm>
<profiles>
<profile>
<id>deploy</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${maven-gpg-plugin.version}</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -50,6 +50,7 @@
<module>crossplane-protobuf-model</module>
<module>crossplane-function-base</module>
<module>crossplane-function-springboot-starter</module>
<module>crossplane-providers-parent</module>
<module>crossplane-function-example</module>
</modules>

View File

@ -0,0 +1,13 @@
#!/bin/bash
release="v1.7.0"
crds=$(gh api --jq '.[].name' "/repos/crossplane-contrib/provider-upjet-azure/contents/package/crds/?ref=${release}")
for crd in $crds;
do
# output=$(echo $file | cut -d'_' -f2)
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane-contrib/provider-upjet-azure/contents/package/crds/${crd}?ref=${release}" > $crd
done

View File

@ -0,0 +1,13 @@
#!/bin/bash
release="v1.5.0"
crds=$(gh api --jq '.[].name' "/repos/crossplane-contrib/provider-upjet-azuread/contents/package/crds/?ref=${release}")
for crd in $crds;
do
# output=$(echo $file | cut -d'_' -f2)
gh api -H "Accept: application/vnd.github.raw+json" "/repos/crossplane-contrib/provider-upjet-azuread/contents/package/crds/${crd}?ref=${release}" > $crd
done