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
9716ed68
Commit
9716ed68
authored
Aug 27, 2025
by
Abhishek
Browse files
Update .gitlab-ci.yml file
parent
79a7359e
Pipeline
#11799
passed with stage
in 9 minutes and 12 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
9716ed68
...
@@ -5,21 +5,22 @@ image: docker:20.10.16
...
@@ -5,21 +5,22 @@ image: docker:20.10.16
services
:
services
:
-
name
:
docker:20.10.16-dind
-
name
:
docker:20.10.16-dind
alias
:
docker
# This alias is important for the runner to find the Docker daemon.
alias
:
docker
stages
:
stages
:
-
full_test
# A single stage for our end-to-end test.
-
full_test
variables
:
variables
:
DOCKER_HOST
:
tcp://docker:2375
DOCKER_HOST
:
tcp://docker:2375
DOCKER_TLS_CERTDIR
:
"
"
DOCKER_TLS_CERTDIR
:
"
"
EUSER
:
"
1000"
EUSER
:
"
1000"
EGID
:
"
1000"
EGID
:
"
1000"
MOODLE_URL
:
"
http://docker:8080"
MOODLE_WWWROOT
:
"
http://docker:8080"
# For the entrypoint installation
BACKEND_URL
:
"
http://docker:8081"
MOODLE_URL
:
"
http://docker:8080"
# For the test script's curl commands
# Add the admin credentials here so they are also written to the .env file
MOODLE_ADMIN_USER
:
"
user"
MOODLE_ADMIN_PASS
:
"
QAYwsx@12345"
# This is the URL Moodle's entrypoint script will use for its wwwroot.
MOODLE_WWWROOT
:
"
http://docker:8080"
run_full_automation
:
run_full_automation
:
stage
:
full_test
stage
:
full_test
when
:
manual
when
:
manual
...
@@ -29,12 +30,20 @@ run_full_automation:
...
@@ -29,12 +30,20 @@ run_full_automation:
-
until docker info > /dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 3; done
-
until docker info > /dev/null 2>&1; do echo "Waiting for Docker daemon..."; sleep 3; done
script
:
script
:
# --- THIS IS THE FIX ---
# Create a .env file on the fly. Docker Compose will automatically read this
# file and pass the variables to the containers.
-
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..."
-
echo "Starting Docker environment..."
-
docker-compose up -d
-
docker-compose up -d
# --- THIS IS THE FIX ---
# Loop until the Moodle installation is complete.
# Instead of a fixed sleep, we will loop until the Moodle installation is complete.
# We know it's complete when the config.php file exists.
-
echo "Waiting for Moodle first-time installation to complete..."
-
echo "Waiting for Moodle first-time installation to complete..."
-
|
-
|
timeout=300
timeout=300
...
...
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