added image to article
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Stephan Dörfler 2020-02-11 06:53:22 +01:00
parent 9910adebb8
commit f4db70453f
3 changed files with 10 additions and 7 deletions

View File

@ -12,9 +12,9 @@ steps:
- name: docker - name: docker
image: plugins/docker image: plugins/docker
settings: settings:
repo: registry.while-false.de/blog
username: stephan username: stephan
password: eRFJ1R7UNo5zv1FFvLzv password: eRFJ1R7UNo5zv1FFvLzv
repo: registry.while-false.de/blog
tags: tags:
- 'latest' - 'latest'
- '1.3.0' - '1.3.0'

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

View File

@ -70,6 +70,7 @@ steps:
- name: build - name: build
image: node:alpine image: node:alpine
commands: commands:
- npm install
- npx gatsby build - npx gatsby build
- name: docker - name: docker
@ -83,15 +84,17 @@ steps:
- '1.3.0' - '1.3.0'
``` ```
For now I only require two steps: For now I only require three steps:
1. build the gatsby project 1. install node.js dependencies
2. build the new docker image and push it to the registry 2. build the gatsby project
3. build the new docker image and push it to the registry
An additional benefit of the drone build is this beatiful badge, every project has nowadays, conveniently prepared as markdown: An additional benefit of the drone build is this beatiful badge, every project has nowadays, conveniently prepared as markdown:
[![Build Status](https://drone.while-false.de/api/badges/stephan/blog/status.svg)](https://drone.while-false.de/stephan/blog) [![Build Status](https://drone.while-false.de/api/badges/stephan/blog/status.svg)](https://drone.while-false.de/stephan/blog)
```markdown
[![Build Status](https://drone.while-false.de/api/badges/stephan/blog/status.svg)](https://drone.while-false.de/stephan/blog) Also, It has nice visualization of the build process with logs for debugging in case it's needed:
``` ![Drone-CI UI](./drone-ci.png)
Then, the last required step is to update the running container to the new version. The event on which to react would be the upload to the registry. There are some ways to handle this myself using webhooks, but as with the build trigger I decided to take a route a little more convenient: use [Watchtower](https://containrrr.github.io/watchtower). I tried watchtower before and don't feel comfortable blindly updating every container I run, so I [configure it to just watch the one blog container and update that automatically](https://containrrr.github.io/watchtower/container-selection/). As I am the only one pushing updates of the image for the blog I can take precautions when I know something will break. Then, the last required step is to update the running container to the new version. The event on which to react would be the upload to the registry. There are some ways to handle this myself using webhooks, but as with the build trigger I decided to take a route a little more convenient: use [Watchtower](https://containrrr.github.io/watchtower). I tried watchtower before and don't feel comfortable blindly updating every container I run, so I [configure it to just watch the one blog container and update that automatically](https://containrrr.github.io/watchtower/container-selection/). As I am the only one pushing updates of the image for the blog I can take precautions when I know something will break.