From 597a7ded455c97c25b25357605452ae05801d21d Mon Sep 17 00:00:00 2001
From: Arkerthan <arkerthan@mailbox.org>
Date: Sat, 18 Mar 2023 17:44:43 +0100
Subject: [PATCH] Fix CI

---
 .gitlab-ci.yml                | 8 ++++----
 docker/stage-build/Dockerfile | 8 ++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)
 create mode 100644 docker/stage-build/Dockerfile

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 18ba78c37a8..bbdf60bfb7f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,7 +24,7 @@ variables:
 
 build:
   stage: build
-  image: node:latest
+  image: gitgud.io:5050/pregmodfan/fc-pregmod/build
   cache:
     paths:
       - node_modules/
@@ -34,10 +34,10 @@ build:
     # latest
     - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
   before_script:
-    - npm update --no-audit --no-fund
+    - npm update --no-audit --no-fund --omit=dev
   script:
-    # - ./compile.sh --ci --minify
-    - npx gulp --minify --ci --verbosity 6
+    - mkdir bin/ # The minifier cannot create the location for the minified file itself
+    - npx gulp --minify --release --ci --verbosity 6
   artifacts:
     paths:
       - bin/FC_pregmod.html
diff --git a/docker/stage-build/Dockerfile b/docker/stage-build/Dockerfile
new file mode 100644
index 00000000000..ebb763216a3
--- /dev/null
+++ b/docker/stage-build/Dockerfile
@@ -0,0 +1,8 @@
+# fc-pregmod:build
+# Compiling needs node and Go installed
+
+# Start with the base golang image, cause installing go is way to complicated
+FROM golang
+
+RUN curl -sL https://deb.nodesource.com/setup_19.x | bash
+RUN apt-get install -y nodejs
-- 
GitLab