1 parent
99d1687f86
commit
d4cb077594
7 files changed
+64
-64
No files matched your search
+10
-1
@@ -7,4 +7,13 @@ steps:
|
||||
image: maven:3-jdk-11
|
||||
commands:
|
||||
- mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
|
||||
- mvn test -B
|
||||
- mvn test -B
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: registry.mariuszpacek.pl/home-pump
|
||||
tags: latest
|
||||
insecure: true
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
+7
-1
@@ -4,9 +4,10 @@
|
||||
.settings/
|
||||
|
||||
# Intellij
|
||||
.idea/
|
||||
.idea
|
||||
*.iml
|
||||
*.iws
|
||||
.vscode
|
||||
|
||||
# Mac
|
||||
.DS_Store
|
||||
@@ -14,3 +15,8 @@
|
||||
# Maven
|
||||
log/
|
||||
target/
|
||||
/.idea/
|
||||
/.vscode/
|
||||
/.java-version
|
||||
/dependency-reduced-pom.xml
|
||||
/workspace.code-workspace
|
||||
@@ -1,62 +0,0 @@
|
||||
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
||||
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
||||
# This specific template is located at:
|
||||
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Maven.gitlab-ci.yml
|
||||
|
||||
# Build JAVA applications using Apache Maven (http://maven.apache.org)
|
||||
# For docker image tags see https://hub.docker.com/_/maven/
|
||||
#
|
||||
# For general lifecycle information see https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
|
||||
|
||||
# This template will build and test your projects
|
||||
# * Caches downloaded dependencies and plugins between invocation.
|
||||
# * Verify but don't deploy merge requests.
|
||||
# * Deploy built artifacts from master branch only.
|
||||
|
||||
variables:
|
||||
# This will suppress any download for dependencies and plugins or upload messages which would clutter the console log.
|
||||
# `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work.
|
||||
MAVEN_OPTS: "-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"
|
||||
# As of Maven 3.3.0 instead of this you may define these options in `.mvn/maven.config` so the same config is used
|
||||
# when running from the command line.
|
||||
# `installAtEnd` and `deployAtEnd` are only effective with recent version of the corresponding plugins.
|
||||
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true"
|
||||
|
||||
# This template uses jdk8 for verifying and deploying images
|
||||
image: maven:3.8.4-jdk-11
|
||||
|
||||
# Cache downloaded dependencies and plugins between builds.
|
||||
# To keep cache across branches add 'key: "$CI_JOB_NAME"'
|
||||
cache:
|
||||
paths:
|
||||
- .m2/repository
|
||||
|
||||
# For merge requests do not `deploy` but only run `verify`.
|
||||
# See https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
|
||||
.verify: &verify
|
||||
stage: test
|
||||
script:
|
||||
- 'mvn $MAVEN_CLI_OPTS verify'
|
||||
artifacts:
|
||||
reports:
|
||||
junit: target/**/TEST-*.xml
|
||||
|
||||
# Verify merge requests using JDK8
|
||||
verify:jdk11:
|
||||
<<: *verify
|
||||
|
||||
# To deploy packages from CI, create a ci_settings.xml file
|
||||
# For deploying packages to GitLab's Maven Repository: See https://docs.gitlab.com/ee/user/packages/maven_repository/index.html#create-maven-packages-with-gitlab-cicd for more details.
|
||||
# Please note: The GitLab Maven Repository is currently only available in GitLab Premium / Ultimate.
|
||||
# For `master` branch run `mvn deploy` automatically.
|
||||
deploy:jdk11:
|
||||
stage: deploy
|
||||
script:
|
||||
- 'mvn $MAVEN_CLI_OPTS package'
|
||||
artifacts:
|
||||
paths:
|
||||
- target/*.jar
|
||||
expire_in: 1 week
|
||||
only:
|
||||
variables:
|
||||
- $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
||||
Generated
+14
@@ -9,6 +9,20 @@
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="test.com" />
|
||||
</profile>
|
||||
<profile name="Annotation profile for test.com" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<processorPath useClasspath="false">
|
||||
<entry name="$MAVEN_REPOSITORY$/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar" />
|
||||
</processorPath>
|
||||
<module name="home-pump" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="home-pump" options="-J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -J--add-opens=jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
Generated
+3
@@ -11,4 +11,7 @@
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" project-jdk-name="openjdk-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="jpab" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,4 @@
|
||||
FROM amazoncorretto:11.0.17
|
||||
COPY target/test*.jar app/home-pump.jar
|
||||
|
||||
CMD ["java", "-jar", "app/home-pump.jar"]
|
||||
@@ -85,6 +85,32 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M7</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.3.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>home.automation.Main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>3.4.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
|
||||
Reference in new issue
Block a user