Skip to content

Commit e14c616

Browse files
committed
Switch CI/CD to github actions, use thing4 bom, update parent.
Signed-off-by: Łukasz Dywicki <luke@code-house.org>
1 parent 102d755 commit e14c616

5 files changed

Lines changed: 187 additions & 29 deletions

File tree

.github/workflows/pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build pull request
2+
3+
on:
4+
pull_request:
5+
branches: [ "master" , "3.*", "4.*" ]
6+
7+
jobs:
8+
build:
9+
permissions:
10+
checks: write
11+
contents: read
12+
uses: 'connectorio/gh-actions-shared/.github/workflows/maven.yml@master'
13+
secrets:
14+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
15+
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
16+
with:
17+
openhab: true
18+
server_id: co7io-public-snapshots
19+
deploy: true
20+
master_branch: 3
21+
additional_profiles: 'openhab'

.github/workflows/push.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Build pushed commit
2+
3+
on:
4+
push:
5+
branches: [ "master" , "3.*", "4.*" ]
6+
7+
jobs:
8+
build:
9+
permissions:
10+
checks: write
11+
contents: read
12+
uses: 'connectorio/gh-actions-shared/.github/workflows/maven.yml@master'
13+
secrets:
14+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
15+
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
16+
with:
17+
openhab: true
18+
server_id: co7io-public-snapshots
19+
deploy: true
20+
master_branch: 3
21+
additional_profiles: 'openhab'

.github/workflows/release.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release artifacts
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_version:
7+
description: 'The version to be released from actual HEAD revision'
8+
required: false
9+
default: 'X.Y.Z'
10+
development_version:
11+
description: 'Version to be set as next, after release is made (appends commit to HEAD revision)'
12+
required: false
13+
default: 'X.Y.Z-SNAPSHOT'
14+
perform_version:
15+
description: 'Tag which should be used to perform release and publish its artifacts'
16+
required: false
17+
dry_run:
18+
description: 'Should execution abstain from mutating repository/remote state?'
19+
required: true
20+
default: 'true'
21+
22+
jobs:
23+
build:
24+
permissions:
25+
contents: write
26+
uses: 'connectorio/gh-actions-shared/.github/workflows/release.yml@master'
27+
secrets:
28+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
29+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
30+
CI_RELEASE_USERNAME: ${{ secrets.CI_RELEASE_USERNAME }}
31+
CI_RELEASE_PASSWORD: ${{ secrets.CI_RELEASE_PASSWORD }}
32+
with:
33+
openhab: true
34+
server_id: co7io-public-releases
35+
additional_profiles: 'openhab'
36+
release_version: ${{ inputs.release_version }}
37+
development_version: ${{ inputs.development_version }}
38+
perform_version: ${{ inputs.perform_version }}
39+
dry_run: ${{ inputs.dry_run }}

parent/pom.xml

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838
<compiler.target>11</compiler.target>
3939

4040
<slf4j.version>1.7.12</slf4j.version>
41-
<openhab.version>3.0.4-connectorio-1</openhab.version>
41+
<openhab.version>3.0.4</openhab.version>
42+
<thing4-bom.version>${openhab.version}</thing4-bom.version>
4243
<karaf.version>4.2.8</karaf.version>
4344

4445
<nimbusds-jose-jwt.version>9.15.2</nimbusds-jose-jwt.version>
@@ -59,6 +60,14 @@
5960

6061
<dependencyManagement>
6162
<dependencies>
63+
<dependency>
64+
<groupId>org.thing4.openhab.bom.generated</groupId>
65+
<artifactId>org.openhab.core.bom.openhab-core</artifactId>
66+
<version>${thing4-bom.version}</version>
67+
<type>pom</type>
68+
<scope>import</scope>
69+
</dependency>
70+
6271
<dependency>
6372
<groupId>org.connectorio.cloud</groupId>
6473
<artifactId>org.connectorio.cloud.device.auth</artifactId>
@@ -196,32 +205,6 @@
196205
</dependency>
197206
-->
198207

199-
<dependency>
200-
<groupId>org.openhab.core.bundles</groupId>
201-
<artifactId>org.openhab.core</artifactId>
202-
<version>${openhab.version}</version>
203-
</dependency>
204-
<dependency>
205-
<groupId>org.openhab.core.bundles</groupId>
206-
<artifactId>org.openhab.core.id</artifactId>
207-
<version>${openhab.version}</version>
208-
</dependency>
209-
<dependency>
210-
<groupId>org.openhab.core.bundles</groupId>
211-
<artifactId>org.openhab.core.config.discovery</artifactId>
212-
<version>${openhab.version}</version>
213-
</dependency>
214-
<dependency>
215-
<groupId>org.openhab.core.bundles</groupId>
216-
<artifactId>org.openhab.core.io.transport.mqtt</artifactId>
217-
<version>${openhab.version}</version>
218-
</dependency>
219-
<dependency>
220-
<groupId>org.openhab.core.bundles</groupId>
221-
<artifactId>org.openhab.core.transform</artifactId>
222-
<version>${openhab.version}</version>
223-
</dependency>
224-
225208
<dependency>
226209
<groupId>commons-codec</groupId>
227210
<artifactId>commons-codec</artifactId>
@@ -392,4 +375,61 @@
392375
</plugins>
393376
</build>
394377

378+
<profiles>
379+
<profile>
380+
<id>openhab</id>
381+
382+
383+
<repositories>
384+
<repository>
385+
<id>openhab-release</id>
386+
<name>openhab-release</name>
387+
<url>https://openhab.jfrog.io/openhab/libs-release</url>
388+
<releases>
389+
<enabled>true</enabled>
390+
</releases>
391+
<snapshots>
392+
<enabled>false</enabled>
393+
</snapshots>
394+
</repository>
395+
<repository>
396+
<id>openhab-snapshot</id>
397+
<name>openhab-snapshot</name>
398+
<url>https://openhab.jfrog.io/openhab/libs-snapshot</url>
399+
<releases>
400+
<enabled>false</enabled>
401+
</releases>
402+
<snapshots>
403+
<enabled>true</enabled>
404+
</snapshots>
405+
</repository>
406+
</repositories>
407+
408+
<pluginRepositories>
409+
<pluginRepository>
410+
<id>openhab-release</id>
411+
<name>openhab-releass</name>
412+
<url>https://openhab.jfrog.io/openhab/libs-release</url>
413+
<releases>
414+
<enabled>true</enabled>
415+
</releases>
416+
<snapshots>
417+
<enabled>false</enabled>
418+
</snapshots>
419+
</pluginRepository>
420+
<pluginRepository>
421+
<id>openhab-snapshot</id>
422+
<name>openhab-snapshot</name>
423+
<url>https://openhab.jfrog.io/openhab/libs-snapshot</url>
424+
<releases>
425+
<enabled>false</enabled>
426+
</releases>
427+
<snapshots>
428+
<enabled>true</enabled>
429+
</snapshots>
430+
</pluginRepository>
431+
</pluginRepositories>
432+
</profile>
433+
</profiles>
434+
395435
</project>

pom.xml

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<parent>
2424
<groupId>org.connectorio</groupId>
2525
<artifactId>connectorio-oss</artifactId>
26-
<version>3</version>
26+
<version>5-SNAPSHOT</version>
2727
<relativePath />
2828
</parent>
2929

@@ -35,6 +35,16 @@
3535
<name>ConnectorIO Cloud</name>
3636
<description>ConnectorIO Cloud extensions on top of openHAB core.</description>
3737

38+
<properties>
39+
<snapshot.repository-id>co7io-public-snapshots</snapshot.repository-id>
40+
<snapshot.repository-name>ConnectorIO Public Snapshots</snapshot.repository-name>
41+
<snapshot.repository-url>https://repository.connectorio.cloud/repository/co7io-public-snapshots/</snapshot.repository-url>
42+
43+
<release.repository-id>co7io-public-releases</release.repository-id>
44+
<release.repository-name>ConnectorIO Public Releases</release.repository-name>
45+
<release.repository-url>https://repository.connectorio.cloud/repository/co7io-public-releases/</release.repository-url>
46+
</properties>
47+
3848
<modules>
3949
<module>parent</module>
4050
<module>bundles</module>
@@ -45,7 +55,34 @@
4555
<connection>scm:git:git@github.com:ConnectorIO/connectorio-cloud.git</connection>
4656
<developerConnection>scm:git:git@github.com:ConnectorIO/connectorio-cloud.git</developerConnection>
4757
<url>https://github.com/ConnectorIO/connectorio-cloud</url>
48-
<tag>connectorio-cloud-0.2.0</tag>
58+
<tag>HEAD</tag>
4959
</scm>
5060

61+
<profiles>
62+
<profile>
63+
<id>sonatype-oss</id>
64+
65+
<activation>
66+
<property>
67+
<name>cicd</name>
68+
<value>true</value>
69+
</property>
70+
</activation>
71+
72+
<repositories>
73+
<repository>
74+
<id>sonatype</id>
75+
<name>Sonatype OSS snapshots</name>
76+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
77+
<snapshots>
78+
<enabled>true</enabled>
79+
</snapshots>
80+
<releases>
81+
<enabled>false</enabled>
82+
</releases>
83+
</repository>
84+
</repositories>
85+
</profile>
86+
</profiles>
87+
5188
</project>

0 commit comments

Comments
 (0)