aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Andrew D. France 2025-07-23 03:33:49 -0500
committerGravatar Andrew D. France 2025-07-23 03:33:49 -0500
commit3f4e2c5ada1050555775661f850e3a20d2933046 (patch)
treef8a83e7cf2760eeea834c7384c0f83d9c32b0150
parentAttempt to patch CI pipeline: Dockerfile will now be selfcontained, and thus,... (diff)
make was improperly being called inside the container on a project that is missing its dependencies in the lib/ directory, leading to a 'No rule to make target' error: updated Dockerfile to remove the submodule command at: ln:29: and: Jenkinsfile will use the git submodule sync command. This will ensure the agent's repository is correctly configured before fetching the submodule code: at: ln:9-17
-rw-r--r--Dockerfile6
-rw-r--r--Jenkinsfile8
2 files changed, 9 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index 2577c04..e6dc2a7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,3 +1,5 @@
+# In Dockerfile
+
# Use a base image with build tools
FROM ubuntu:22.04
@@ -24,11 +26,7 @@ WORKDIR /app
COPY . .
-# Initialize git submodules inside the container
-RUN git submodule update --init --recursive
-
# Creates the .lush config directory in the root user home directory as install.sh expects.
RUN mkdir -p /root/.lush && cp -r ./.lush/* /root/.lush/
CMD ["premake5", "gmake2"]
-
diff --git a/Jenkinsfile b/Jenkinsfile
index 6512f35..dccf6b9 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -7,7 +7,12 @@ pipeline {
stage('Build Application Image') {
steps {
script {
- // NOTE: Dockerfile handles submodule initialization
+ echo 'Initializing Git submodules...'
+ // First, sync the submodule URLs from .gitmodules to .git/config
+ sh 'git submodule sync --recursive'
+ // Then, initialize and update the submodules
+ sh 'git submodule update --init --recursive'
+
echo 'Building the Lush application Docker image...'
sh 'docker build -t lush-app:latest .'
}
@@ -62,6 +67,7 @@ EOF
echo 'Creating and starting the build container...'
sh "docker run -d --name ${containerName} lush-app:latest sleep infinity"
+ // Since the Docker image now has the full source, we only need to copy the test script.
echo 'Copying test script into the container...'
sh "docker cp test_52.lua ${containerName}:/app/test_52.lua"