aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-05-15 16:35:06 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-05-15 16:35:06 -0400
commite6b4e605622f2b323fd3fe0aa01000f3986e3bba (patch)
tree9f7957272b0f016fd6b3f272edc8b26de6fac1e0
parenta710553aa5c0484b6934b8a5d4d16b1eb3ff2a88 (diff)
build: Fix ssl container dir, and certificate automation
-rw-r--r--ci/container/Dockerfile2
-rw-r--r--ci/container/Taskfile.yaml8
2 files changed, 5 insertions, 5 deletions
diff --git a/ci/container/Dockerfile b/ci/container/Dockerfile
index 8787fa3..4580e48 100644
--- a/ci/container/Dockerfile
+++ b/ci/container/Dockerfile
@@ -15,7 +15,7 @@ WORKDIR /build
COPY app/ .
#build internal libraries and copy the libraries to the /lib output directory
-RUN mkdir out/
+RUN mkdir out/ ssl/
RUN task build-libs
#APP CONTAINER
diff --git a/ci/container/Taskfile.yaml b/ci/container/Taskfile.yaml
index 9f486ef..1d52697 100644
--- a/ci/container/Taskfile.yaml
+++ b/ci/container/Taskfile.yaml
@@ -21,6 +21,8 @@ tasks:
vars:
OUT_DIR: "{{.USER_WORKING_DIR}}/out"
SSL_DIR: "{{.USER_WORKING_DIR}}/ssl"
+ HOSTNAME:
+ sh: echo $HOSTNAME
#build stage generates the following libraries
generates:
@@ -33,13 +35,11 @@ tasks:
- cd lib/argon2/ && task && cp build/libargon2.so {{.OUT_DIR}}/libargon2.so
#build rpmalloc library
- cd lib/vnlib_rpmalloc/ && task && cp build/libvn_rpmalloc.so {{.OUT_DIR}}/libvn_rpmalloc.so
- #install zlib and brotli native libraries from the source repos (they dont have active releases anymore :()
+ #build compression
- cd lib/vnlib_compress/ && task && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so
- #build native compression lib and put in lib dir
- - cd lib/vnlib_compress && cmake -B./build && cmake --build build/ --config Release && cp build/libvn_compress.so {{.OUT_DIR}}/libvn_compress.so
#create a fresh self-signed cert for the container during build
- - openssl req -new -x509 -days 365 -keyout {{.SSL_DIR}}/key.pem -out {{.SSL_DIR}}/cert.pem -newkey {{.CERT_KEY_PARAMS}} --nodes
+ - openssl req -new -x509 -days 365 -keyout {{.SSL_DIR}}/key.pem -out {{.SSL_DIR}}/cert.pem -newkey {{.CERT_KEY_PARAMS}} --nodes -subj "/CN={{.HOSTNAME}}"
- echo "WARNING Self signed certificate created during build stage, DO NOT COPY THIS IMAGE"
#called from ci pipline to build the package