Added development & release image publishing
ci/woodpecker/push/build Pipeline was successful Details
ci/woodpecker/push/lint Pipeline was successful Details
ci/woodpecker/push/publish Pipeline was successful Details

pull/14/head
Jef Roosens 2022-01-13 13:51:02 +01:00
parent eed6ec0644
commit 6fb893ff41
Signed by: Jef Roosens
GPG Key ID: 955C0660072F691F
4 changed files with 44 additions and 21 deletions

View File

@ -1,4 +1,4 @@
* *
!vieter/ !src/
!Makefile !Makefile

View File

@ -0,0 +1,22 @@
pipeline:
dev:
image: plugins/docker
secrets: [ docker_username, docker_password ]
settings:
repo: chewingbever/vieter
tag: dev
when:
event: push
branch: dev
release:
image: plugins/docker
secrets: [ docker_username, docker_password ]
settings:
repo: chewingbever/vieter
tag:
- latest
- $CI_COMMIT_TAG
when:
event: tag
branch: main

View File

@ -1,20 +1,21 @@
FROM archlinux:latest AS builder FROM chewingbever/vlang:latest AS builder
WORKDIR /src WORKDIR /app
COPY vieter ./vieter
# Copy over source code & build production binary
COPY src ./src
COPY Makefile ./ COPY Makefile ./
RUN make prod
RUN pacman \
-Syu --noconfirm --needed \
gcc git openssl make && \
make customv && \
jjr-v/v -prod vieter
FROM archlinux:latest FROM alpine:3.15
ENV REPO_DIR=/data ENV REPO_DIR=/data
COPY --from=builder /src/vieter/vieter /usr/local/bin/ RUN apk update && \
apk add --no-cache \
libarchive
COPY --from=builder /app/pvieter /usr/local/bin/vieter
ENTRYPOINT [ "/usr/local/bin/vieter" ] ENTRYPOINT [ "/usr/local/bin/vieter" ]

View File

@ -54,7 +54,7 @@ fn reader_to_file(mut reader io.BufferedReader, length int, path string) ? {
} }
} }
fn main2() { fn main() {
// Configure logger // Configure logger
log_level_str := os.getenv_opt('LOG_LEVEL') or { 'WARN' } log_level_str := os.getenv_opt('LOG_LEVEL') or { 'WARN' }
log_level := log.level_from_tag(log_level_str) or { log_level := log.level_from_tag(log_level_str) or {
@ -102,11 +102,11 @@ fn main2() {
}, port) }, port)
} }
fn main() { // fn main() {
// archive.list_filenames() // // archive.list_filenames()
info := archive.get_pkg_info('test/jjr-joplin-desktop-2.6.10-4-x86_64.pkg.tar.zst') or { // info := archive.get_pkg_info('test/jjr-joplin-desktop-2.6.10-4-x86_64.pkg.tar.zst') or {
eprintln(err.msg) // eprintln(err.msg)
return // return
} // }
println(info) // println(info)
} // }