Skip to content

Commit 3cf30e6

Browse files
Merge pull request #18 from shwetaverma14/fix-ci-workflows
Fix ci workflows
2 parents 2dd5b7a + 630aedb commit 3cf30e6

File tree

4 files changed

+44
-40
lines changed

4 files changed

+44
-40
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,42 @@ jobs:
1414
build:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- name: Checkout Code
18-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
19-
20-
- name: Set up JDK 17 and Maven Cache
21-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
17+
- name: Checkout code
18+
uses: actions/checkout@v3
19+
with:
20+
token: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Set up JDK 17
23+
uses: actions/setup-java@v3
2224
with:
2325
java-version: "17"
2426
distribution: "temurin"
2527
cache: "maven"
26-
28+
2729
- name: Install Groovy
2830
run: sudo apt-get update && sudo apt-get install -y groovy
29-
30-
- name: 1. Clone and Install apis-bom
31+
32+
- name: Clone and build apis-bom
3133
run: |
3234
git clone https://github.com/hyphae/apis-bom.git ../apis-bom
33-
mvn -B -f ../apis-bom/pom.xml clean install -DskipTests=true -Dmaven.test.failure.ignore=true
34-
35-
- name: 2. Clone and Install apis-common
35+
cd ../apis-bom
36+
mvn -B clean install
37+
38+
- name: Clone and build apis-common
3639
run: |
3740
git clone https://github.com/hyphae/apis-common.git ../apis-common
38-
mvn -B -f ../apis-common/pom.xml clean install -DskipTests=true -Dmaven.test.failure.ignore=true
39-
40-
- name: 3. Build and Test apis-main
41+
cd ../apis-common
42+
# Change version to 3.4.1 if needed (check what version apis-bom uses)
43+
BOM_VERSION=$(grep -oP '<version>\K[^<]+' ../apis-bom/pom.xml | head -1)
44+
sed -i "s/<version>3.0.0<\\/version>/<version>$BOM_VERSION<\\/version>/" pom.xml
45+
mvn -B clean install
46+
47+
- name: Build and test apis-log
4148
run: mvn -B clean verify
49+
50+
- name: Test shell scripts
51+
run: |
52+
echo "Testing start.sh permissions..."
53+
cd exe
54+
chmod +x start.sh
55+
./start.sh

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525

2626
steps:
2727
- name: Checkout repository
28-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
28+
uses: actions/checkout@v3
2929

30-
- name: Set up JDK 17 and Maven Cache
31-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165
30+
- name: Set up JDK 17
31+
uses: actions/setup-java@v3
3232
with:
3333
java-version: "17"
3434
distribution: "temurin"
@@ -38,23 +38,12 @@ jobs:
3838
run: sudo apt-get update && sudo apt-get install -y groovy
3939

4040
- name: Initialize CodeQL
41-
uses: github/codeql-action/init@17783bfb99b07f70fae080b654aed0c514057477
41+
uses: github/codeql-action/init@v2
4242
with:
4343
languages: ${{ matrix.language }}
4444

45-
- name: 1. Clone and Install apis-bom
46-
run: |
47-
git clone https://github.com/hyphae/apis-bom.git ../apis-bom
48-
mvn -B -f ../apis-bom/pom.xml clean install -DskipTests=true -Dmaven.test.failure.ignore=true
49-
50-
- name: 2. Clone and Install apis-common
51-
run: |
52-
git clone https://github.com/hyphae/apis-common.git ../apis-common
53-
mvn -B -f ../apis-common/pom.xml clean install -DskipTests=true -Dmaven.test.failure.ignore=true
54-
55-
- name: Build apis-main
56-
run: mvn -B clean package -DskipTests
45+
- name: Autobuild
46+
uses: github/codeql-action/autobuild@v2
5747

5848
- name: Perform CodeQL Analysis
59-
uses: github/codeql-action/analyze@17783bfb99b07f70fae080b654aed0c514057477
60-
continue-on-error: true
49+
uses: github/codeql-action/analyze@v2

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<groupId>jp.co.sony.csl.dcoes.apis</groupId>
99
<artifactId>apis-log</artifactId>
10-
<version>3.0.0</version>
10+
<version>3.4.1</version>
1111

1212
<name>APIS LOG</name>
1313

@@ -71,7 +71,7 @@
7171
<plugin>
7272
<groupId>org.apache.maven.plugins</groupId>
7373
<artifactId>maven-shade-plugin</artifactId>
74-
<version>3.0.0</version>
74+
<version>3.4.1</version>
7575
<executions>
7676
<execution>
7777
<phase>package</phase>

src/main/java/jp/co/sony/csl/dcoes/apis/tools/log/LogReceiver.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import io.vertx.core.AbstractVerticle;
44
import io.vertx.core.AsyncResult;
55
import io.vertx.core.Future;
6+
import io.vertx.core.Promise;
67
import io.vertx.core.Handler;
78
import io.vertx.core.datagram.DatagramSocket;
89
import io.vertx.core.datagram.DatagramSocketOptions;
@@ -40,27 +41,27 @@ public class LogReceiver extends AbstractVerticle {
4041
* Called during startup.
4142
* Calls initialization of MongoDB.
4243
* Calls initialization of network surroundings.
43-
* @param startFuture {@inheritDoc}
44+
* @param startPromise {@inheritDoc}
4445
* @throws Exception {@inheritDoc}
4546
* 起動時に呼び出される.
4647
* MongoDB の初期化を呼び出す.
4748
* ネットワークまわりの初期化を呼び出す.
48-
* @param startFuture {@inheritDoc}
49+
* @param startPromise {@inheritDoc}
4950
* @throws Exception {@inheritDoc}
5051
*/
51-
@Override public void start(Future<Void> startFuture) throws Exception {
52+
@Override public void start(Promise<Void> startPromise) throws Exception {
5253
MongoDbWriter.initialize(vertx, resInitializeMongoDbWriter -> {
5354
if (resInitializeMongoDbWriter.succeeded()) {
5455
startSocketService_(resSocket -> {
5556
if (resSocket.succeeded()) {
5657
if (log.isTraceEnabled()) log.trace("started : " + deploymentID());
57-
startFuture.complete();
58+
startPromise.complete();
5859
} else {
59-
startFuture.fail(resSocket.cause());
60+
startPromise.fail(resSocket.cause());
6061
}
6162
});
6263
} else {
63-
startFuture.fail(resInitializeMongoDbWriter.cause());
64+
startPromise.fail(resInitializeMongoDbWriter.cause());
6465
}
6566
});
6667
}

0 commit comments

Comments
 (0)