Added development & release image publishing
parent
eed6ec0644
commit
6fb893ff41
|
@ -1,4 +1,4 @@
|
|||
*
|
||||
|
||||
!vieter/
|
||||
!src/
|
||||
!Makefile
|
||||
|
|
|
@ -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
|
23
Dockerfile
23
Dockerfile
|
@ -1,20 +1,21 @@
|
|||
FROM archlinux:latest AS builder
|
||||
FROM chewingbever/vlang:latest AS builder
|
||||
|
||||
WORKDIR /src
|
||||
COPY vieter ./vieter
|
||||
WORKDIR /app
|
||||
|
||||
# Copy over source code & build production binary
|
||||
COPY src ./src
|
||||
COPY Makefile ./
|
||||
|
||||
RUN pacman \
|
||||
-Syu --noconfirm --needed \
|
||||
gcc git openssl make && \
|
||||
make customv && \
|
||||
jjr-v/v -prod vieter
|
||||
RUN make prod
|
||||
|
||||
|
||||
FROM archlinux:latest
|
||||
FROM alpine:3.15
|
||||
|
||||
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" ]
|
||||
|
|
18
src/main.v
18
src/main.v
|
@ -54,7 +54,7 @@ fn reader_to_file(mut reader io.BufferedReader, length int, path string) ? {
|
|||
}
|
||||
}
|
||||
|
||||
fn main2() {
|
||||
fn main() {
|
||||
// Configure logger
|
||||
log_level_str := os.getenv_opt('LOG_LEVEL') or { 'WARN' }
|
||||
log_level := log.level_from_tag(log_level_str) or {
|
||||
|
@ -102,11 +102,11 @@ fn main2() {
|
|||
}, port)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// archive.list_filenames()
|
||||
info := archive.get_pkg_info('test/jjr-joplin-desktop-2.6.10-4-x86_64.pkg.tar.zst') or {
|
||||
eprintln(err.msg)
|
||||
return
|
||||
}
|
||||
println(info)
|
||||
}
|
||||
// fn main() {
|
||||
// // archive.list_filenames()
|
||||
// info := archive.get_pkg_info('test/jjr-joplin-desktop-2.6.10-4-x86_64.pkg.tar.zst') or {
|
||||
// eprintln(err.msg)
|
||||
// return
|
||||
// }
|
||||
// println(info)
|
||||
// }
|
||||
|
|
Loading…
Reference in New Issue