Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CoTA
cota-infra
Commits
4ab53fbe
Commit
4ab53fbe
authored
Oct 09, 2025
by
Abhishek
Browse files
Update .gitlab-ci.yml file
parent
b45d7f50
Pipeline
#11972
canceled with stages
in 5 minutes and 39 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
4ab53fbe
...
@@ -4,7 +4,8 @@ services:
...
@@ -4,7 +4,8 @@ services:
-
name
:
docker:20.10.16-dind
-
name
:
docker:20.10.16-dind
stages
:
stages
:
-
plugin_install
-
setup
-
install_plugin
-
teacher_workflow
-
teacher_workflow
-
student_workflow
-
student_workflow
...
@@ -23,9 +24,52 @@ variables:
...
@@ -23,9 +24,52 @@ variables:
DTA_CONFIG_FILE
:
"
teacher-dta-dir-test-runner-jdk21.txt"
DTA_CONFIG_FILE
:
"
teacher-dta-dir-test-runner-jdk21.txt"
DTA_STUDENT_SUBMISSION_FILE
:
"
student-dir.txt"
DTA_STUDENT_SUBMISSION_FILE
:
"
student-dir.txt"
setup_environment
:
stage
:
setup
when
:
manual
before_script
:
-
apk add --no-cache curl bash jq bind-tools
-
echo "Checking DNS resolution..."
-
nslookup docker || getent hosts docker
-
echo "Checking Docker client and daemon..."
-
docker version
-
until docker info > /dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 3; done
-
docker volume create cota-infra_dta_tests_data
-
echo "Setting permissions on dta_tests_data volume..."
-
docker run --rm -v cota-infra_dta_tests_data:/data alpine chown 137:137 /data
script
:
-
echo "Creating .env file for Docker Compose..."
-
echo "MOODLE_WWWROOT=${MOODLE_WWWROOT}" > .env
-
echo "MOODLE_ADMIN_USER=${MOODLE_ADMIN_USER}" >> .env
-
echo "MOODLE_ADMIN_PASS=${MOODLE_ADMIN_PASS}" >> .env
-
echo "EUSER=${EUSER}" >> .env
-
echo "EGID=${EGID}" >> .env
-
echo "Starting Docker environment..."
-
docker compose up -d
-
echo "Waiting for Moodle first-time installation to complete..."
-
|
timeout=300
while ! docker exec moodle-web-official [ -f /var/www/html/config.php ]; do
timeout=$((timeout - 5))
if [ $timeout -le 0 ]; then
echo "❌ ERROR: Moodle installation timed out after 5 minutes."
docker logs moodle-web-official
exit 1
fi
echo " -> Installation not yet complete, waiting 5 more seconds..."
sleep 5
done
-
echo "✅ Moodle installation complete (config.php found)."
artifacts
:
paths
:
-
.env
expire_in
:
1 hour
# 🧩 Stage 1: Install and activate plugin inside Moodle container
# 🧩 Stage 1: Install and activate plugin inside Moodle container
install_plugin
:
install_plugin
:
stage
:
plugin_
install
stage
:
install
_plugin
script
:
script
:
-
apk add --no-cache bash curl jq git
-
apk add --no-cache bash curl jq git
-
echo "Running plugin install script..."
-
echo "Running plugin install script..."
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment