This commit is contained in:
parent
469b002fb4
commit
767861e691
3 changed files with 49 additions and 0 deletions
20
.woodpecker.yml
Normal file
20
.woodpecker.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
pipeline:
|
||||||
|
build_docker_img:
|
||||||
|
image: plugins/docker
|
||||||
|
when:
|
||||||
|
event: [pull_request]
|
||||||
|
settings:
|
||||||
|
dry_run: true
|
||||||
|
repo: forgeflux/host-meta-test
|
||||||
|
tags: latest
|
||||||
|
|
||||||
|
build_and_publish_docker_img:
|
||||||
|
image: plugins/docker
|
||||||
|
when:
|
||||||
|
event: [push, tag, deployment]
|
||||||
|
settings:
|
||||||
|
username: forgeflux
|
||||||
|
password:
|
||||||
|
from_secret: DOCKER_TOKEN
|
||||||
|
repo: forgeflux/host-meta-test
|
||||||
|
tags: latest
|
16
Dockerfile
Normal file
16
Dockerfile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
FROM python
|
||||||
|
|
||||||
|
LABEL org.opencontainers.image.source https://git.batsense.net/ForgeFlux/web-host-test
|
||||||
|
|
||||||
|
RUN useradd -ms /bin/bash -u 1001 web_host
|
||||||
|
RUN apt-get update && apt-get install -y ca-certificates git
|
||||||
|
WORKDIR /src/
|
||||||
|
COPY requirements.txt .
|
||||||
|
RUN pip install -r requirements.txt
|
||||||
|
|
||||||
|
USER web_host
|
||||||
|
WORKDIR /home/web_host
|
||||||
|
RUN mkdir app/
|
||||||
|
WORKDIR /home/web_host/app/
|
||||||
|
COPY . .
|
||||||
|
CMD [ "behave"]
|
13
Makefile
Normal file
13
Makefile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
lint:
|
||||||
|
black ./features/
|
||||||
|
|
||||||
|
docker.build:
|
||||||
|
docker buildx build -t forgeflux/ap-test --load .
|
||||||
|
|
||||||
|
docker.run:
|
||||||
|
docker run \
|
||||||
|
--network=ftest \
|
||||||
|
-e FTEST_AUTH=${FTEST_AUTH} \
|
||||||
|
-e FTEST_HOST=${FTEST_HOST} \
|
||||||
|
-e FTEST_TARGET_HOST=${FTEST_TARGET_HOST} \
|
||||||
|
-e FTEST_USER=${FTEST_USER} forgeflux/web-host-test
|
Loading…
Reference in a new issue