Add CI.
continuous-integration/drone/pr Build is failing Details
continuous-integration/drone/push Build is passing Details

This commit is contained in:
giomba 2023-04-10 17:44:44 +02:00
parent 7798356bda
commit 161172a174
6 changed files with 36 additions and 1 deletions

11
.drone.yml Normal file
View File

@ -0,0 +1,11 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: quality
image: git.golem.linux.it/golem/vpnunit-develop:1
commands:
- script/qa

5
Dockerfile.develop Normal file
View File

@ -0,0 +1,5 @@
FROM python:3
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

View File

@ -80,4 +80,6 @@ while [ true ]; do
sleep 60
done
```
# Develop
`Dockerfile.develop` contains instructions to build a container for assessing this project's quality, and `script/qa` is automatically run inside that container by the CI system.
Give a look at it.

11
docker Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
REPODIR=$(realpath $(dirname "$0"))
docker run --rm -ti \
-v "$REPODIR":/workspace \
-v /tmp:/tmp \
-w /workspace \
git.golem.linux.it/golem/vpnunit-develop:1 \
"$@"

6
script/setup Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
REPODIR=$(realpath $(dirname "$0")/..)
docker build -t git.golem.linux.it/golem/vpnunit-develop:1 -f "$REPODIR"/Dockerfile.develop "$REPODIR"