Skip to content

Commit 6921301

Browse files
authored
Inital project structure (#1)
Base structure for the Java SDK. --------- Signed-off-by: Knut-Erik Johnsen <[email protected]>
1 parent bb31f20 commit 6921301

19 files changed

+6499
-0
lines changed

.github/workflows/maven-build.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build with maven
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK 17
15+
uses: actions/setup-java@v4
16+
with:
17+
java-version: '17'
18+
distribution: 'oracle'
19+
cache: maven
20+
- name: Build with Maven
21+
run: mvn -B clean verify --file pom.xml
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release a new version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
releaseversion:
7+
type: string
8+
description: 'Version to reelase'
9+
required: true
10+
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up JDK 17
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '17'
21+
distribution: 'oracle'
22+
cache: maven
23+
server-id: central
24+
server-username: MAVEN_CENTRAL_USERNAME # env variable for username in deploy
25+
server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy
26+
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
27+
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
28+
- name: Set the revision property
29+
run: mvn versions:set-property -Dproperty=revision "-DnewVersion==${{ github.event.inputs.releaseversion }}" -DgenerateBackupPoms=false
30+
- name: Build with Maven
31+
run: mvn -B deploy --file pom.xml -Pdeploy
32+
env:
33+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
34+
MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }}
35+
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
36+
- name: Create release
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
tag: ${{ github.ref_name }}
40+
run: |
41+
gh release create "$tag" \
42+
--repo="$GITHUB_REPOSITORY" \
43+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
44+
--generate-notes

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,9 @@
2222
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2323
hs_err_pid*
2424
replay_pid*
25+
26+
**/.flattened-pom.xml
27+
*.iml
28+
.idea/
29+
target/
30+
generated/

crossplane-crd-model/pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
<!-- PROJECT -->
6+
<parent>
7+
<groupId>io.crossplane.compositefunctions</groupId>
8+
<artifactId>crossplane-parent</artifactId>
9+
<version>${revision}</version>
10+
</parent>
11+
12+
<artifactId>crossplane-crd-model</artifactId>
13+
<description>Crossplane coposite function CRDS</description>
14+
<!-- DEPENDENCIES -->
15+
<dependencies>
16+
<dependency>
17+
<groupId>io.fabric8</groupId>
18+
<artifactId>kubernetes-client</artifactId>
19+
</dependency>
20+
<dependency>
21+
<groupId>io.fabric8</groupId>
22+
<artifactId>generator-annotations</artifactId>
23+
</dependency>
24+
</dependencies>
25+
<!-- BUILD -->
26+
<build>
27+
<!-- PLUGINS -->
28+
<plugins>
29+
<plugin>
30+
<groupId>io.fabric8</groupId>
31+
<artifactId>java-generator-maven-plugin</artifactId>
32+
<version>${kubernetes-client.version}</version>
33+
<executions>
34+
<execution>
35+
<goals>
36+
<goal>generate</goal>
37+
</goals>
38+
</execution>
39+
</executions>
40+
<configuration>
41+
<source>src/main/resources/kubernetes</source>
42+
</configuration>
43+
</plugin>
44+
45+
</plugins>
46+
</build>
47+
48+
</project>

0 commit comments

Comments
 (0)