Skip to content

Commit

Permalink
chore: version bump + cleanup tests and enable tests in docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-s committed Apr 9, 2024
1 parent bd4c2b0 commit d1a59d1
Show file tree
Hide file tree
Showing 19 changed files with 48 additions and 155 deletions.
2 changes: 1 addition & 1 deletion .flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>digitalhub-core</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<packaging>pom</packaging>
</project>
14 changes: 4 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,16 @@ build/
.vscode/
.vscode/launch.json

### Env variable ###
### Nodejs ###
.env

node_modules

### Checkstyle folder###
/src/checkstyle

### Sonar ###
.scannerwork/

/wrapper/*/sdk
/wrapper/*/wrapper.py
/wrapper/nefertem/nefertem

/data/*

### Data ##
/data/
/application/data/
/application/src/main/resources/application-local.yml
/reports
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN --mount=type=cache,target=/root/.m2,source=/cache/.m2,from=ghcr.io/scc-digit
--mount=type=cache,target=/tmp/frontend/console/node_modules,source=/cache/frontend/console/node_modules,from=ghcr.io/scc-digitalhub/digitalhub-core:cache \
mvn install -pl frontend
RUN --mount=type=cache,target=/root/.m2,source=/cache/.m2,from=ghcr.io/scc-digitalhub/digitalhub-core:cache \
mvn package -DskipTests -pl '!frontend'
mvn package -pl '!frontend'

FROM maven:3-eclipse-temurin-21-alpine as builder
WORKDIR /tmp
Expand Down
4 changes: 2 additions & 2 deletions application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>core</artifactId>
<name>core</name>
<version>0.3.0</version>
<version>0.4.0-SNAPSHOT</version>
<description>Digital Hub Core</description>
<properties>
<revision>0.3.0-SNAPSHOT</revision>
<revision>0.4.0-SNAPSHOT</revision>
<java.version>21</java.version>
<spring-security.version>6.2.0</spring-security.version>
<spring-cloud.version>2023.0.0</spring-cloud.version>
Expand Down

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions frontend/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-console</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -40,7 +40,7 @@
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion modules/commons/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down
6 changes: 3 additions & 3 deletions modules/framework-k8s/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-fsm</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static org.junit.jupiter.api.Assertions.assertEquals;

import io.kubernetes.client.openapi.ApiException;
import it.smartcommunitylabdhub.framework.k8s.annotations.ConditionalOnKubernetes;
import it.smartcommunitylabdhub.framework.k8s.kubernetes.K8sSecretHelper;
import java.util.Collections;
import java.util.HashMap;
Expand All @@ -12,13 +13,14 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class K8sSecretHelperTests {
// @SpringBootTest
public class K8sSecretHelperTest {

@Autowired
@Autowired(required = false)
private K8sSecretHelper helper;

@Test
// @Test
@ConditionalOnKubernetes
void readNamespacedSecret() throws ApiException {
try {
helper.deleteSecret("test");
Expand All @@ -33,7 +35,8 @@ void readNamespacedSecret() throws ApiException {
assertEquals(data, null);
}

@Test
// @Test
@ConditionalOnKubernetes
void createSecret() {
try {
helper.deleteSecret("test");
Expand Down Expand Up @@ -86,7 +89,8 @@ void createSecret() {
assertEquals(null, readData.get("mykey2"));
}

@AfterEach
// @AfterEach
@ConditionalOnKubernetes
public void cleanUp() throws ApiException {
try {
helper.deleteSecret("test");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package it.smartcommunitylabdhub.framework.k8s;

import io.kubernetes.client.openapi.ApiClient;
import it.smartcommunitylabdhub.framework.k8s.annotations.ConditionalOnKubernetes;
import it.smartcommunitylabdhub.framework.k8s.kubernetes.kaniko.DockerBuildConfig;
import it.smartcommunitylabdhub.framework.k8s.kubernetes.kaniko.JobBuildConfig;
import it.smartcommunitylabdhub.framework.k8s.kubernetes.kaniko.KanikoImageBuilder;
Expand All @@ -14,7 +15,7 @@
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
// @SpringBootTest
public class KanikoImageBuilderTest {

//////////////////////// TO USE THI BUILDER //////////////////////////////
Expand All @@ -31,7 +32,7 @@ public class KanikoImageBuilderTest {
//
//////////////////////////////////////

@Autowired
@Autowired(required = false)
ApiClient client;

@Value("${kaniko.source.path}")
Expand All @@ -40,7 +41,8 @@ public class KanikoImageBuilderTest {
@Value("${kaniko.target.path}")
private String kanikoTargetPath;

@Test
// @Test
@ConditionalOnKubernetes
void testBuildDockerImage() throws IOException {
String basePath = Paths.get(System.getProperty("user.dir")).getParent().toString();

Expand Down
4 changes: 2 additions & 2 deletions modules/fsm/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-fsm</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class StateMachineTest {

// some method definition

@Test
// @Test
public void fsm() {
// Create the state machine

Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-container/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-container</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.springdoc</groupId>
Expand All @@ -15,13 +15,13 @@
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-dbt/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-dbt</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions modules/runtime-kfp/.flattened-pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<modelVersion>4.0.0</modelVersion>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-runtime-kfp</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-commons</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>it.smartcommunitylabdhub</groupId>
<artifactId>dh-framework-k8s</artifactId>
<version>0.3.0-SNAPSHOT</version>
<version>0.4.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down
Loading

0 comments on commit d1a59d1

Please sign in to comment.