Skip to content

Commit

Permalink
[System-X] Auto-update system-x-all
Browse files Browse the repository at this point in the history
  • Loading branch information
avano authored and mmuzikar committed May 24, 2023
1 parent c4e2f77 commit 5082760
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 39 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/create-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
env:
RELEASE_VERSION: ${{ inputs.release-version }}
DEV_VERSION: 1.0-SNAPSHOT
JBANG_FILE: jbang/tnb.java
SYSTEM_X_ALL: system-x-all
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -33,6 +35,7 @@ jobs:
- name: Update versions
run: |
mvn --no-transfer-progress versions:set -DnewVersion=${RELEASE_VERSION} -DoldVersion=* -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
sed -i "s/${SYSTEM_X_ALL}:${DEV_VERSION}/${SYSTEM_X_ALL}:${RELEASE_VERSION}/" ${JBANG_FILE}
- name: Create tag
run: |
git add -A
Expand All @@ -41,6 +44,7 @@ jobs:
- name: Revert versions
run: |
mvn --no-transfer-progress versions:set -DnewVersion=${DEV_VERSION} -DoldVersion=* -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
sed -i "s/${SYSTEM_X_ALL}:${RELEASE_VERSION}/${SYSTEM_X_ALL}:${DEV_VERSION}/" ${JBANG_FILE}
- name: Push changes
run: |
git add -A
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/sync-bom.yml → .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Sync BOM
name: Sync
on:
push:
branches:
- main

# Use a personal token so that this action will trigger other actions (when the PR is created, all other checks are triggered)

jobs:
sync-bom:
name: Sync BOM
name: Sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -19,7 +18,11 @@ jobs:
distribution: 'adopt'
- name: Build BOM
run: |
# We need to first update BOM and only then update system-x-all, as that uses the BOM
mvn --no-transfer-progress --activate-profiles update-bom clean install
- name: Build system-x-all
run: |
mvn --no-transfer-progress --activate-profiles update-system-x-all clean install
- uses: tibdex/github-app-token@v1
id: generate-token
with:
Expand Down
45 changes: 25 additions & 20 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,21 @@
<artifactId>fuse-products</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-all</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-amq</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws-cloudwatch</artifactId>
Expand All @@ -51,12 +61,12 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws-kinesis-firehose</artifactId>
<artifactId>system-x-aws-kinesis</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws-kinesis</artifactId>
<artifactId>system-x-aws-kinesis-firehose</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -91,7 +101,7 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws</artifactId>
<artifactId>system-x-azure</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -119,11 +129,6 @@
<artifactId>system-x-azure-storage-queue</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-azure</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-cassandra</artifactId>
Expand All @@ -141,12 +146,12 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-db-common</artifactId>
<artifactId>system-x-db</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-db</artifactId>
<artifactId>system-x-db-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand All @@ -169,14 +174,19 @@
<artifactId>system-x-ftp</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google-api-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google-api</artifactId>
<artifactId>system-x-google</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand All @@ -186,12 +196,12 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google-cloud-common</artifactId>
<artifactId>system-x-google-cloud</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google-cloud</artifactId>
<artifactId>system-x-google-cloud-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -219,11 +229,6 @@
<artifactId>system-x-google-storage</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-google</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-horreum</artifactId>
Expand Down Expand Up @@ -261,12 +266,12 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-jms-client</artifactId>
<artifactId>system-x-jms</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-jms</artifactId>
<artifactId>system-x-jms-client</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down
67 changes: 51 additions & 16 deletions system-x/services/all/pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
<?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">
<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">
<parent>
<artifactId>system-x-services</artifactId>
<groupId>software.tnb</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<properties>
<exec.plugin.version>3.1.0</exec.plugin.version>
<xml.format.plugin.version>3.2.1</xml.format.plugin.version>
</properties>
<modelVersion>4.0.0</modelVersion>
<name>TNB :: System-X :: Services :: All</name>
<artifactId>system-x-all</artifactId>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand All @@ -28,7 +24,6 @@
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>software.tnb</groupId>
Expand All @@ -52,11 +47,11 @@
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws-kinesis-firehose</artifactId>
<artifactId>system-x-aws-kinesis</artifactId>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-aws-kinesis</artifactId>
<artifactId>system-x-aws-kinesis-firehose</artifactId>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
Expand Down Expand Up @@ -106,10 +101,6 @@
<groupId>software.tnb</groupId>
<artifactId>system-x-cassandra</artifactId>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-common</artifactId>
</dependency>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>system-x-cryostat</artifactId>
Expand Down Expand Up @@ -271,4 +262,48 @@
<artifactId>system-x-webhook</artifactId>
</dependency>
</dependencies>
<profiles>
<profile>
<id>update-system-x-all</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>bash</executable>
<arguments>update_pom.sh</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>au.com.acegi</groupId>
<artifactId>xml-format-maven-plugin</artifactId>
<version>${xml.format.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>xml-format</id>
<goals>
<goal>xml-format</goal>
</goals>
<configuration>
<indentSize>4</indentSize>
<keepBlankLines>true</keepBlankLines>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
80 changes: 80 additions & 0 deletions system-x/services/all/pom.xml.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<?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">
<parent>
<artifactId>system-x-services</artifactId>
<groupId>software.tnb</groupId>
<version>1.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<properties>
<exec.plugin.version>3.1.0</exec.plugin.version>
<xml.format.plugin.version>3.2.1</xml.format.plugin.version>
</properties>

<modelVersion>4.0.0</modelVersion>
<name>TNB :: System-X :: Services :: All</name>
<artifactId>system-x-all</artifactId>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>software.tnb</groupId>
<artifactId>bom</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
</dependencies>

<profiles>
<profile>
<id>update-system-x-all</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>bash</executable>
<arguments>update_pom.sh</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>au.com.acegi</groupId>
<artifactId>xml-format-maven-plugin</artifactId>
<version>${xml.format.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<id>xml-format</id>
<goals>
<goal>xml-format</goal>
</goals>
<configuration>
<indentSize>4</indentSize>
<keepBlankLines>true</keepBlankLines>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Loading

0 comments on commit 5082760

Please sign in to comment.