diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..cb6920c --- /dev/null +++ b/.woodpecker.yml @@ -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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7386cd7 --- /dev/null +++ b/Dockerfile @@ -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"] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..74e1009 --- /dev/null +++ b/Makefile @@ -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