Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Paul SEICHAIS
cooptippon
Commits
5827d8d3
Commit
5827d8d3
authored
Jan 24, 2019
by
vagrant
Browse files
Deploy to Heroku
parent
ae40949a
Changes
6
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
5827d8d3
cache
:
key
:
"
$CI_COMMIT_REF_NAME"
paths
:
-
.maven/
stages
:
-
build
-
test
-
analyze
-
package
-
release
-
deploy
before_script
:
-
export MAVEN_USER_HOME=`pwd`/.maven
-
./mvnw com.github.eirslett:frontend-maven-plugin:install-node-and-npm -DnodeVersion=v10.13.0 -DnpmVersion=6.4.1 -Dmaven.repo.local=$MAVEN_USER_HOME
-
./mvnw com.github.eirslett:frontend-maven-plugin:npm -Dmaven.repo.local=$MAVEN_USER_HOME
maven-compile
:
stage
:
build
script
:
-
./mvnw compile -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts
:
paths
:
-
target/classes/
-
target/generated-sources/
expire_in
:
1 day
maven-test
:
stage
:
test
script
:
-
./mvnw test -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts
:
reports
:
junit
:
target/surefire-reports/TEST-*.xml
paths
:
-
target/test-results
expire_in
:
1 day
frontend-test
:
stage
:
test
script
:
-
./mvnw com.github.eirslett:frontend-maven-plugin:npm -Dfrontend.npm.arguments='test -- -u' -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts
:
reports
:
junit
:
target/test-results/jest/TESTS-*.xml
paths
:
-
target/test-results
expire_in
:
1 day
maven-package
:
stage
:
package
script
:
-
./mvnw verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME
artifacts
:
paths
:
-
target/*.war
expire_in
:
1 day
# Uncomment the following line to use gitlabs container registry. You need to adapt the REGISTRY_URL in case you are not using gitlab.com
#docker-push:
# image: docker:latest
# services:
# - docker:dind
# variables:
# REGISTRY_URL: registry.gitlab.com
# DOCKER_HOST: tcp://docker:2375
# DOCKER_DRIVER: overlay2
# IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
# stage: release
# dependencies:
# - maven-package
# before_script:
# - docker info
# - cp target/*.war src/main/docker
# script:
# - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $REGISTRY_URL
# - docker build -f src/main/docker/Dockerfile -t $IMAGE_TAG src/main/docker
# - docker push $IMAGE_TAG
.yo-rc.json
View file @
5827d8d3
...
...
@@ -33,6 +33,8 @@
"nativeLanguage"
:
"en"
,
"languages"
:
[
"en"
]
],
"herokuAppName"
:
"cooptippon"
,
"herokuDeployType"
:
"git"
}
}
\ No newline at end of file
Procfile
0 → 100644
View file @
5827d8d3
web: java $JAVA_OPTS -Xmx256m -jar target/*.war --spring.profiles.active=prod,heroku,no-liquibase --server.port=$PORT
release: cp -R src/main/resources/config config && ./mvnw liquibase:update -Pheroku
pom.xml
View file @
5827d8d3
...
...
@@ -352,6 +352,14 @@
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-data
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-localconfig-connector
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-heroku-connector
</artifactId>
</dependency>
<!-- jhipster-needle-maven-add-dependency -->
</dependencies>
...
...
@@ -1100,6 +1108,59 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>
heroku
</id>
<build>
<plugins>
<plugin>
<groupId>
org.liquibase
</groupId>
<artifactId>
liquibase-maven-plugin
</artifactId>
<configuration
combine.self=
"override"
>
<changeLogFile>
src/main/resources/config/liquibase/master.xml
</changeLogFile>
<diffChangeLogFile>
src/main/resources/config/liquibase/changelog/${maven.build.timestamp}_changelog.xml
</diffChangeLogFile>
<driver></driver>
<url>
${env.JDBC_DATABASE_URL}
</url>
<defaultSchemaName></defaultSchemaName>
<username>
${env.JDBC_DATABASE_USERNAME}
</username>
<password>
${env.JDBC_DATABASE_PASSWORD}
</password>
<referenceUrl>
hibernate:spring:com.mycompany.myapp.domain?dialect=org.hibernate.dialect.MySQL5InnoDBDialect
&
hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
&
hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy
</referenceUrl>
<verbose>
true
</verbose>
<logging>
debug
</logging>
<promptOnNonLocalDatabase>
false
</promptOnNonLocalDatabase>
</configuration>
</plugin>
<plugin>
<artifactId>
maven-clean-plugin
</artifactId>
<version>
${maven-clean-plugin.version}
</version>
<executions>
<execution>
<id>
clean-artifacts
</id>
<phase>
install
</phase>
<goals>
<goal>
clean
</goal>
</goals>
<configuration>
<excludeDefaultDirectories>
true
</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>
target
</directory>
<excludes>
<exclude>
*.war
</exclude>
</excludes>
<followSymlinks>
false
</followSymlinks>
</fileset>
<fileset>
<directory>
node_modules
</directory>
<followSymlinks>
false
</followSymlinks>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- jhipster-needle-maven-add-profile -->
</profiles>
</project>
src/main/resources/config/application-heroku.yml
0 → 100644
View file @
5827d8d3
# ===================================================================
# Spring Boot configuration for the "heroku" profile.
#
# This configuration overrides the application.yml file.
# ===================================================================
# ===================================================================
# Standard Spring Boot properties.
# Full reference is available at:
# http://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
# ===================================================================
eureka
:
instance
:
hostname
:
cooptippon.herokuapp.com
non-secure-port
:
80
prefer-ip-address
:
false
spring
:
datasource
:
type
:
com.zaxxer.hikari.HikariDataSource
url
:
${JDBC_DATABASE_URL}
username
:
${JDBC_DATABASE_USERNAME}
password
:
${JDBC_DATABASE_PASSWORD}
hikari
:
maximumPoolSize
:
8
src/main/resources/config/bootstrap-heroku.yml
0 → 100644
View file @
5827d8d3
# ===================================================================
# Spring Cloud Config bootstrap configuration for the "heroku" profile
# ===================================================================
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment