I’ve created an app on Heroku and I’ve been able to to deploy my Spring Boot dockerized application with heroku CLI from my machine.
However, when I try to perform the same actions from gitlab ci I’ve got an error on the last command.
Everyhing before this command is working (the login to heroku, the push of the built image).
Here’s my .gitlab-ci.yml file :
image: docker:latest
stages:
- build
- deploy
maven-build-application:
stage: build
image: maven:3-jdk-11
script:
- mvn clean package -DskipTests
artifacts:
paths:
- target/*.jar
docker-build-and-deploy-application:
stage: deploy
image: rizkimufrizal/docker-node
services:
- docker:dind
script:
- npm install -g heroku
- heroku container:login
- heroku container:push web --app this-is-the-name-of-my-application
# Here is the problem
- heroku container:release web --app this-is-the-name-of-my-application
Output logs from my gitlab job :
latest: digest: sha256:62555048c6df008140c4720fc9fa0787caf2ef547a6c9d6e2608d3ba6c6e5dfa
size: 953Your image has been successfully pushed. You can now release it with the
'container:release' command.
$ heroku container:release web --app this-is-the-name-of-my-application
▸ CERT_HAS_EXPIRED: certificate has expired
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
I’ve made some research online but I can’t find somehing on it, and I don’t know what could I try ?
Maybe because the command is made inside a docker, I have to install intermediate certifcates ?
Thank you for your help
Antoine
2
Answers
Here's my updated final stage to deploy on heroku :
I think the node version which is used by
rizkimufrizal/docker-node
is very old with expired certificates. Try a different / updated image with a more recent version.