Skip to main content

Kotlin + Spring + Vue: CI/CD

In this section,
we will overview how to automate the delivery process, configure a CI/CD pipeline, feel yourself a DevOps engineer and actually make development more enjoyable. 

GitHub Repository

Create a git repository from project root folder. I recommend to create the following .gitignore file there first:

*.class

# Help #
backend/*.md

# Package Files #
*.jar
*.war
*.ear

# Eclipse #
.settings
.project
.classpath
.studio
target

# NetBeans #
backend/nbproject/private/
backend/nbbuild/
backend/dist/
backend/nbdist/
backend/.nb-gradle/
backend/build/

# Apple #
.DS_Store

# Intellij #
.idea
*.iml
*.log

# logback
logback.out.xml

backend/src/main/resources/public/
backend/target
backend/.mvn
backend/mvnw
frontend/dist/
frontend/node/
frontend/node_modules/
frontend/npm-debug.log
frontend/target

!.mvn/wrapper/maven-wrapper.jar


Make initial commit to your GitHub repository and make Push.

Heroku

IMPORTANT: Before you start Heroku configuration, add Procfile (with no any extension) to the root folder of your repository with the following string:

web: java -Dserver.port=$PORT -jar backend/target/backend-0.0.1-SNAPSHOT.jar

and commit!

OPTIONAL: Add also .travis.yaml file to reduce build and deploy time:

language: java
jdk:
- oraclejdk8
script: mvn clean install jacoco:report coveralls:report
cache:
     directories:
     - node_modules


#1 Register at Heroku

#2 Create an app:



#3 Add to pipeline - Create new pipeline:


#4  Deployment method - GitHub (click Connect to GitHub and follow the instructions in a modal window)

#5 Enable Automatic Deploys



#6 Manual Deploy - click Deploy Branch for the first deploy. You will see the output of command line in your browser



#7 Click View after successful building



If everything is fine, you'll see Vue.js default page:


Ways to Improve

Links

Comments

Post a Comment

Popular posts from this blog

Make Authentication More Secure With Cookies Email Registration Confirmation That's all for this year. See you in 2020!

Kotlin + Spring Boot + Vue.js: + Gradle

Hello, dear visitors! I added two new articles to the Fullstack section: Kotlin + Spring + Vue: Migration from Maven to Gradle Kotlin + Spring + Vue: Deploy to Heroku with Gradle I'll be glad if you will find then useful for yourself.

Kotlin + Spring Boot + Vue.js

Hello there! I've published my first set of articles about developing web applications using Kotlin , Spring Boot and Vue.js : Koltin + Spring Boot + Vue.js Here are the contents of this set: Introduction Start CI/CD REST API Database Connection Authentication Spam Protection (reCAPTCHA) Email