Skip to content

Commit

Permalink
Merge pull request #89 from Opetushallitus/OY-4970
Browse files Browse the repository at this point in the history
Refs/heads/oy 4970
  • Loading branch information
augustk authored Dec 17, 2024
2 parents 358a066 + 9787b8e commit f274846
Show file tree
Hide file tree
Showing 84 changed files with 518 additions and 661 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
java-version: '21'
distribution: 'corretto'

- uses: szenius/[email protected]
with:
Expand All @@ -35,7 +35,7 @@ jobs:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: mvn clean spotless:check package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=opetushallitus -Dsonar.projectKey=Opetushallitus_valintaperusteet -B -Dbranch=${GITHUB_REF_NAME} -Drevision=${GITHUB_SHA} -DbuildNumber=${GITHUB_RUN_NUMBER}
run: mvn clean spotless:check package sonar:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=opetushallitus -Dsonar.projectKey=Opetushallitus_valintaperusteet -B -Dbranch=${GITHUB_REF_NAME} -Drevision=${GITHUB_SHA} -DbuildNumber=${GITHUB_RUN_NUMBER} --settings settings.xml

- uses: actions/cache@v4
id: restore-build
Expand Down Expand Up @@ -80,7 +80,7 @@ jobs:
export ARTIFACT_NAME="valintaperusteet-service"
mv valintaperusteet-service/target/valintaperusteet-service-exec.jar $DOCKER_BUILD_DIR/artifact/${ARTIFACT_NAME}.jar
cp -vr src/main/resources/oph-configuration $DOCKER_BUILD_DIR/config/
export BASE_IMAGE="baseimage-fatjar-openjdk17:master"
export BASE_IMAGE="baseimage-fatjar-openjdk21:master"
./ci-tools/common/pull-image.sh
./ci-tools/github-build/build-fatjar.sh $ARTIFACT_NAME
./ci-tools/github-build/upload-image.sh $ARTIFACT_NAME
Expand All @@ -90,7 +90,7 @@ jobs:
export ARTIFACT_NAME="ovara-valintaperusteet"
mv ovara-valintaperusteet/target/ovara-valintaperusteet.jar $DOCKER_BUILD_DIR/artifact/${ARTIFACT_NAME}.jar
cp -vr ovara-valintaperusteet/src/main/resources/oph-configuration $DOCKER_BUILD_DIR/config/
export BASE_IMAGE="baseimage-fatjar-openjdk17:master"
export BASE_IMAGE="baseimage-fatjar-openjdk21:master"
./ci-tools/common/pull-image.sh
./ci-tools/github-build/build-fatjar.sh $ARTIFACT_NAME
./ci-tools/github-build/upload-image.sh $ARTIFACT_NAME
Expand All @@ -114,10 +114,10 @@ jobs:
ovara-valintaperusteet/target
key: ${{ github.sha }}

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Deploy jar library
Expand All @@ -129,4 +129,4 @@ jobs:
run: |
git clone https://github.com/Opetushallitus/ci-tools.git
source ci-tools/common/setup-tools.sh
mvn deploy -B -pl fi.vm.sade.valintaperusteet:valintaperusteet,valintaperusteet-domain,valintaperusteet-api,valintaperusteet-laskenta -DskipTests --settings ci-tools/common/maven-settings.xml
mvn deploy -B -pl fi.vm.sade.valintaperusteet:valintaperusteet,valintaperusteet-domain,valintaperusteet-api,valintaperusteet-laskenta -DskipTests --settings settings.xml
2 changes: 1 addition & 1 deletion .java-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
17.0
21.0
10 changes: 4 additions & 6 deletions ovara-valintaperusteet/pom.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
<?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">
<modelVersion>4.0.0</modelVersion>

<groupId>fi.vm.sade.valintaperusteet</groupId>
<artifactId>ovara-valintaperusteet</artifactId>
<version>6.2-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>

<parent>
<artifactId>valintaperusteet</artifactId>
<groupId>fi.vm.sade.valintaperusteet</groupId>
<version>6.2-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<dependencies>
<dependency>
<groupId>fi.vm.sade.valintaperusteet</groupId>
<artifactId>valintaperusteet-service</artifactId>
<version>6.2-SNAPSHOT</version>
<version>7.0-SNAPSHOT</version>
</dependency>

<!-- flyway -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package fi.vm.sade.service.valintaperusteet.ovara.ajastus;

import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.persistence.Column;
import jakarta.persistence.Id;
import java.sql.Timestamp;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.util.UUID;
import javax.persistence.Column;
import javax.persistence.Id;

public class SiirtotiedostoProsessi {
@Id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import jakarta.persistence.EntityManagerFactory;
import java.util.Map;
import java.util.Properties;
import javax.persistence.EntityManagerFactory;
import javax.sql.DataSource;
import org.flywaydb.core.Flyway;
import org.springframework.beans.factory.annotation.Value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import fi.vm.sade.service.valintaperusteet.ovara.ajastus.SiirtotiedostoAjastusService;
import fi.vm.sade.service.valintaperusteet.ovara.ajastus.SiirtotiedostoProsessi;
import fi.vm.sade.service.valintaperusteet.ovara.ajastus.SiirtotiedostoProsessiRepository;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.persistence.Query;
import javax.transaction.Transactional;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
import jakarta.persistence.Query;
import jakarta.transaction.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
Expand Down
2 changes: 2 additions & 0 deletions ovara-valintaperusteet/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ springdoc:
api-docs:
enabled: true
swagger-ui:
path: /swagger-ui
operationsSorter: alpha
enabled: true

management:
Expand Down
Loading

0 comments on commit f274846

Please sign in to comment.