In the last part , we able to set up our git repository on GitLab set up our Node app with Express and write one unit test. In this part, we’ll cover the following: Setup of the app on Heroku GitLab CI/CD configuration using the .gitlab-ci.yml file GitLab repository:- https://gitlab.com/Mjeck/node-heroku-gitlab That done next is to create our app on Heroku. If you don’t have an account yet navigate to https://heroku.com and create a free account. With that done log on to your Heroku dashboard and create a new app. Create a new app on Heroku. Next, we go to our project directory in our code editor and create a new file and .gitlab-ci.yml paste the following code. # Node docker image on which this would be run image: node:8.10.0 cache: paths: - node_modules/ stages: - test - deploy_production # Job 1: Test: stage: test script: - npm install - npm run test # Job 2: # Deploy to staging Production: image: ruby:latest only: - ma...
Comments
Post a Comment