Added test cicd job
continuous-integration/drone the build failed Details

pull/43/head
Jef Roosens 2021-04-24 09:33:42 +02:00
parent 62738354a0
commit 0abfaca967
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
5 changed files with 15 additions and 13 deletions

View File

@ -1,6 +0,0 @@
pipeline:
first-test:
image: alpine
commands:
- echo "woodpecker is very cool"

5
.woodpecker.yml 100644
View File

@ -0,0 +1,5 @@
pipeline:
test:
image: chewingbever/fej-builder:latest
commands:
- cargo test

View File

@ -1,6 +1,6 @@
# vim: filetype=dockerfile
# Our entire toolchain runs in alpine
FROM alpine:latest AS builder
FROM alpine:3.13.5 AS builder
ENV PATH "$PATH:/app/.cargo/bin"
# Needed for proper compiling of openssl-dev
@ -29,8 +29,3 @@ WORKDIR /app
RUN { curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly; } && \
rustup target add x86_64-unknown-linux-musl --toolchain nightly && \
mkdir -p .cargo/registry target
# Copy source code over to builder
COPY --chown=builder:builder Cargo.toml Cargo.lock ./
COPY --chown=builder:builder src/ ./src/
COPY --chown=builder:builder migrations/ ./migrations/

View File

@ -3,6 +3,10 @@ FROM chewingbever/fej-builder:latest
ENV RUST_BACKTRACE 1
# Copy source code over to builder
COPY --chown=builder:builder Cargo.toml Cargo.lock ./
COPY --chown=builder:builder src/ ./src/
COPY --chown=builder:builder migrations/ ./migrations/
COPY --chown=builder:builder ./docker/entrypoint_dev.sh /entrypoint.sh
COPY --chown=builder:builder ./Rocket.toml /app/Rocket.toml

View File

@ -1,6 +1,10 @@
# vim: filetype=dockerfile
FROM chewingbever/fej-builder:latest AS builder
COPY --chown=builder:builder Cargo.toml Cargo.lock ./
COPY --chown=builder:builder src/ ./src/
COPY --chown=builder:builder migrations/ ./migrations/
# And then finally, build the project
# Thank the lords that this article exists
# https://users.rust-lang.org/t/sigsegv-with-program-linked-against-openssl-in-an-alpine-container/52172
@ -19,7 +23,7 @@ RUN cargo install \
# Now, we create the actual image
FROM alpine:latest
FROM alpine:3.12.5
COPY ./docker/crontab /var/spool/cron/crontabs/fej
# Install some dynamic libraries needed for everything to work