From 12217b51466f70f82d08c90b121ebde10a552549 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:20:24 +0100 Subject: [PATCH 1/7] Added builder Dockerfile --- Dockerfile.builder | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Dockerfile.builder diff --git a/Dockerfile.builder b/Dockerfile.builder new file mode 100644 index 0000000..a4882e6 --- /dev/null +++ b/Dockerfile.builder @@ -0,0 +1,33 @@ +FROM alpine:3.12 + +LABEL maintainer="spytheman " + +WORKDIR /opt/vlang + +ENV VVV /opt/vlang +ENV PATH /opt/vlang:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +ENV VFLAGS -cc gcc + +RUN mkdir -p /opt/vlang && ln -s /opt/vlang/v /usr/bin/v + +RUN apk --no-cache add \ + git make upx gcc bash \ + musl-dev \ + openssl-libs-static openssl-dev \ + sqlite-static sqlite-dev \ + libx11-dev glfw-dev freetype-dev \ + libarchive-static libarchive-dev \ + diffutils + +## RUN apk --no-cache add --virtual sdl2deps sdl2-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_image-dev +COPY . /vlang-local + +RUN git clone \ + 'https://github.com/ChewingBever/v/' \ + -b vweb-streaming \ + --single-branch \ + '/opt/vlang' && \ + rm -rf '/vlang-local' && \ + make && v -version + +CMD ["v"] From 8c80aa65f98a0a71294a2df82143ac3859569558 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:23:12 +0100 Subject: [PATCH 2/7] Added CI builder config --- .woodpecker/.builder.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .woodpecker/.builder.yml diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml new file mode 100644 index 0000000..f5a3d0a --- /dev/null +++ b/.woodpecker/.builder.yml @@ -0,0 +1,13 @@ +branches: dev + +pipeline: + publish: + image: plugins/docker + secrets: [ docker_username, docker_password ] + settings: + repo: chewingbever/vlang + tag: latest + when: + event: push + branch: dev + path: Dockerfile.builder From e73d226abc3c949ec94a624e813fde7cd243c91a Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:25:48 +0100 Subject: [PATCH 3/7] Removed unnecessary constraint --- .woodpecker/.builder.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index f5a3d0a..d42eda9 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -9,5 +9,4 @@ pipeline: tag: latest when: event: push - branch: dev path: Dockerfile.builder From 0f8fab6c2fcb662326aeb145ffaa5c5e920b279d Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:27:25 +0100 Subject: [PATCH 4/7] Added extra event constraint --- .woodpecker/.builder.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index d42eda9..3cafc5c 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -1,4 +1,5 @@ branches: dev +event: push pipeline: publish: From 9f01cb39a37d9d9db19625dd9b4a55afeb5f41f9 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:31:13 +0100 Subject: [PATCH 5/7] Set plugin to correct Dockerfile --- .woodpecker/.builder.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index 3cafc5c..ec4a36e 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -1,5 +1,4 @@ branches: dev -event: push pipeline: publish: @@ -8,6 +7,7 @@ pipeline: settings: repo: chewingbever/vlang tag: latest + dockerfile: Dockerfile.builder when: event: push path: Dockerfile.builder From 8549c4be8167cb36c68336e0babef233b85fc99c Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:42:11 +0100 Subject: [PATCH 6/7] Test --- .woodpecker/.builder.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index ec4a36e..4fb4ae8 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -4,6 +4,7 @@ pipeline: publish: image: plugins/docker secrets: [ docker_username, docker_password ] + settings: repo: chewingbever/vlang tag: latest From e0a5f9379901892521d1d9001be67f94f4332aad Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Fri, 14 Jan 2022 11:43:10 +0100 Subject: [PATCH 7/7] Proper test --- .woodpecker/.builder.yml | 1 - Dockerfile.builder | 1 - 2 files changed, 2 deletions(-) diff --git a/.woodpecker/.builder.yml b/.woodpecker/.builder.yml index 4fb4ae8..ec4a36e 100644 --- a/.woodpecker/.builder.yml +++ b/.woodpecker/.builder.yml @@ -4,7 +4,6 @@ pipeline: publish: image: plugins/docker secrets: [ docker_username, docker_password ] - settings: repo: chewingbever/vlang tag: latest diff --git a/Dockerfile.builder b/Dockerfile.builder index a4882e6..b8e45aa 100644 --- a/Dockerfile.builder +++ b/Dockerfile.builder @@ -19,7 +19,6 @@ RUN apk --no-cache add \ libarchive-static libarchive-dev \ diffutils -## RUN apk --no-cache add --virtual sdl2deps sdl2-dev sdl2_ttf-dev sdl2_mixer-dev sdl2_image-dev COPY . /vlang-local RUN git clone \