mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-29 18:25:49 +00:00
positionnement des 'bons' fichiers
This commit is contained in:
commit
de41b3f97e
2 changed files with 361 additions and 0 deletions
87
.gitlab-ci.yml
Normal file
87
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
stages:
|
||||||
|
- build
|
||||||
|
- test
|
||||||
|
- quality
|
||||||
|
- package
|
||||||
|
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .m2/repository
|
||||||
|
key: "$CI_JOB_NAME"
|
||||||
|
|
||||||
|
build_job:
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- ./mvnw compile
|
||||||
|
-Dhttps.protocols=TLSv1.2
|
||||||
|
-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository
|
||||||
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
|
||||||
|
-Dorg.slf4j.simpleLogger.showDateTime=true
|
||||||
|
-Djava.awt.headless=true
|
||||||
|
--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true
|
||||||
|
image: openjdk:8-alpine
|
||||||
|
|
||||||
|
test_job:
|
||||||
|
stage: test
|
||||||
|
script:
|
||||||
|
- ./mvnw test
|
||||||
|
-Dhttps.protocols=TLSv1.2
|
||||||
|
-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository
|
||||||
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
|
||||||
|
-Dorg.slf4j.simpleLogger.showDateTime=true
|
||||||
|
-Djava.awt.headless=true
|
||||||
|
--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true
|
||||||
|
image: openjdk:8-alpine
|
||||||
|
|
||||||
|
#TESTING : Version du MOOC
|
||||||
|
#code_quality_job:
|
||||||
|
# stage: quality
|
||||||
|
# image: docker:stable
|
||||||
|
# allow_failure: true
|
||||||
|
# services:
|
||||||
|
# - docker:stable-dind
|
||||||
|
# script:
|
||||||
|
# - mkdir codequality-results
|
||||||
|
# - docker run
|
||||||
|
# --env CODECLIMATE_CODE="$PWD"
|
||||||
|
# --volume "$PWD":/code
|
||||||
|
# --volume /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# --volume /tmp/cc:/tmp/cc
|
||||||
|
# codeclimate/codeclimate analyze -f html > ./codequality-results/index.html
|
||||||
|
# artifacts:
|
||||||
|
# paths:
|
||||||
|
# - codequality-results/
|
||||||
|
|
||||||
|
#TESTING : Version officielle
|
||||||
|
#@see https://docs.gitlab.com/ee/user/project/merge_requests/code_quality.html
|
||||||
|
include:
|
||||||
|
- template: Code-Quality.gitlab-ci.yml
|
||||||
|
code_quality:
|
||||||
|
stage: quality
|
||||||
|
variables:
|
||||||
|
CODE_QUALITY_IMAGE: "registry.gitlab.com/gitlab-org/ci-cd/codequality:latest"
|
||||||
|
|
||||||
|
code_quality_html:
|
||||||
|
extends: code_quality
|
||||||
|
variables:
|
||||||
|
REPORT_FORMAT: html
|
||||||
|
artifacts:
|
||||||
|
paths: [gl-code-quality-report.html]
|
||||||
|
|
||||||
|
package_job:
|
||||||
|
stage: package
|
||||||
|
services:
|
||||||
|
- docker:stable-dind
|
||||||
|
variables:
|
||||||
|
DOCKER_HOST: tcp://docker:2375
|
||||||
|
script:
|
||||||
|
- apk add --no-cache docker
|
||||||
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
|
- ./mvnw install -PbuildDocker -DskipTests=true -DpushImage
|
||||||
|
-Dhttps.protocols=TLSv1.2
|
||||||
|
-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository
|
||||||
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
|
||||||
|
-Dorg.slf4j.simpleLogger.showDateTime=true
|
||||||
|
-Djava.awt.headless=true
|
||||||
|
--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true
|
||||||
|
image: openjdk:8-alpine
|
274
pom.xml
Normal file
274
pom.xml
Normal file
|
@ -0,0 +1,274 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<groupId>org.springframework.samples</groupId>
|
||||||
|
<artifactId>spring-petclinic</artifactId>
|
||||||
|
<version>2.1.0.BUILD-SNAPSHOT</version>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
|
<version>2.1.4.RELEASE</version>
|
||||||
|
</parent>
|
||||||
|
<name>petclinic</name>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
|
||||||
|
<!-- Generic properties -->
|
||||||
|
<java.version>1.8</java.version>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
|
|
||||||
|
<!-- Web dependencies -->
|
||||||
|
<webjars-bootstrap.version>3.3.6</webjars-bootstrap.version>
|
||||||
|
<webjars-jquery-ui.version>1.11.4</webjars-jquery-ui.version>
|
||||||
|
<webjars-jquery.version>2.2.4</webjars-jquery.version>
|
||||||
|
<wro4j.version>1.8.0</wro4j.version>
|
||||||
|
|
||||||
|
<jacoco.version>0.8.2</jacoco.version>
|
||||||
|
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- Spring and Spring Boot dependencies -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-cache</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-test</artifactId>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- Databases - Uses HSQL by default -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.hsqldb</groupId>
|
||||||
|
<artifactId>hsqldb</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>mysql</groupId>
|
||||||
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
|
<scope>runtime</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- caching -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.cache</groupId>
|
||||||
|
<artifactId>cache-api</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.ehcache</groupId>
|
||||||
|
<artifactId>ehcache</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- webjars -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>webjars-locator-core</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>jquery</artifactId>
|
||||||
|
<version>${webjars-jquery.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>jquery-ui</artifactId>
|
||||||
|
<version>${webjars-jquery-ui.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>bootstrap</artifactId>
|
||||||
|
<version>${webjars-bootstrap.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- end of webjars -->
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-devtools</artifactId>
|
||||||
|
<optional>true</optional>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<!-- Spring Boot Actuator displays build-related information
|
||||||
|
if a META-INF/build-info.properties file is present -->
|
||||||
|
<goals>
|
||||||
|
<goal>build-info</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<additionalProperties>
|
||||||
|
<encoding.source>${project.build.sourceEncoding}</encoding.source>
|
||||||
|
<encoding.reporting>${project.reporting.outputEncoding}</encoding.reporting>
|
||||||
|
<java.source>${maven.compiler.source}</java.source>
|
||||||
|
<java.target>${maven.compiler.target}</java.target>
|
||||||
|
</additionalProperties>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.jacoco</groupId>
|
||||||
|
<artifactId>jacoco-maven-plugin</artifactId>
|
||||||
|
<version>${jacoco.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>prepare-agent</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
<execution>
|
||||||
|
<id>report</id>
|
||||||
|
<phase>prepare-package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>report</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- Spring Boot Actuator displays build-related information if a git.properties
|
||||||
|
file is present at the classpath -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>pl.project13.maven</groupId>
|
||||||
|
<artifactId>git-commit-id-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>revision</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<verbose>true</verbose>
|
||||||
|
<dateFormat>yyyy-MM-dd'T'HH:mm:ssZ</dateFormat>
|
||||||
|
<generateGitPropertiesFile>true</generateGitPropertiesFile>
|
||||||
|
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties
|
||||||
|
</generateGitPropertiesFilename>
|
||||||
|
<failOnNoGitDirectory>false</failOnNoGitDirectory>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>ro.isdc.wro4j</groupId>
|
||||||
|
<artifactId>wro4j-maven-plugin</artifactId>
|
||||||
|
<version>${wro4j.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<wroManagerFactory>ro.isdc.wro.maven.plugin.manager.factory.ConfigurableWroManagerFactory</wroManagerFactory>
|
||||||
|
<cssDestinationFolder>${project.build.directory}/classes/static/resources/css</cssDestinationFolder>
|
||||||
|
<wroFile>${basedir}/src/main/wro/wro.xml</wroFile>
|
||||||
|
<extraConfigFile>${basedir}/src/main/wro/wro.properties</extraConfigFile>
|
||||||
|
<contextFolder>${basedir}/src/main/less</contextFolder>
|
||||||
|
</configuration>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.webjars</groupId>
|
||||||
|
<artifactId>bootstrap</artifactId>
|
||||||
|
<version>${webjars-bootstrap.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.mockito</groupId>
|
||||||
|
<artifactId>mockito-core</artifactId>
|
||||||
|
<version>${mockito.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
<!-- Apache 2 license -->
|
||||||
|
<licenses>
|
||||||
|
<license>
|
||||||
|
<name>Apache License, Version 2.0</name>
|
||||||
|
<url>https://www.apache.org/licenses/LICENSE-2.0</url>
|
||||||
|
</license>
|
||||||
|
</licenses>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>gitlab-maven</id>
|
||||||
|
<url>https://gitlab.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
|
||||||
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>gitlab-maven</id>
|
||||||
|
<url>https://gitlab.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>gitlab-maven</id>
|
||||||
|
<url>https://gitlab.com/api/v4/projects/${env.CI_PROJECT_ID}/packages/maven</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<pluginRepositories>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>spring-snapshots</id>
|
||||||
|
<name>Spring Snapshots</name>
|
||||||
|
<url>https://repo.spring.io/snapshot</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
<pluginRepository>
|
||||||
|
<id>spring-milestones</id>
|
||||||
|
<name>Spring Milestones</name>
|
||||||
|
<url>https://repo.spring.io/milestone</url>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</pluginRepository>
|
||||||
|
</pluginRepositories>
|
||||||
|
|
||||||
|
</project>
|
Loading…
Reference in a new issue