Commit d90d0a8a authored by Abhishek's avatar Abhishek
Browse files

Update .gitlab-ci.yml file

parent fae424d1
Pipeline #11954 passed with stage
in 1 minute and 4 seconds
...@@ -26,19 +26,19 @@ run_full_automation: ...@@ -26,19 +26,19 @@ run_full_automation:
when: manual when: manual
before_script: before_script:
- apk add --no-cache curl docker-compose bash jq - apk add --no-cache curl bash jq
- echo "Checking Docker client and daemon..."
- docker version
- 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
# --- THIS IS THE FIX --- # Explicitly create the named volume
# 1. Explicitly create the named volume so we know it exists.
- docker volume create cota-infra_dta_tests_data - docker volume create cota-infra_dta_tests_data
# 2. Run a temporary container that mounts this volume and changes the ownership
# of the directory to user 137, which is the 'appuser' inside the backend container. # Fix permissions on the volume for appuser (UID 137)
- echo "Setting permissions on dta_tests_data volume..." - echo "Setting permissions on dta_tests_data volume..."
- docker run --rm -v cota-infra_dta_tests_data:/data alpine chown 137:137 /data - docker run --rm -v cota-infra_dta_tests_data:/data alpine chown 137:137 /data
script: script:
# --- THIS IS THE FIX ---
# Create a .env file on the fly. Docker Compose will automatically read this # Create a .env file on the fly. Docker Compose will automatically read this
# file and pass the variables to the containers. # file and pass the variables to the containers.
- echo "Creating .env file for Docker Compose..." - echo "Creating .env file for Docker Compose..."
...@@ -49,7 +49,7 @@ run_full_automation: ...@@ -49,7 +49,7 @@ run_full_automation:
- echo "EGID=${EGID}" >> .env - echo "EGID=${EGID}" >> .env
- echo "Starting Docker environment..." - echo "Starting Docker environment..."
- docker-compose up -d - docker compose up -d
# Loop until the Moodle installation is complete. # Loop until the Moodle installation is complete.
- echo "Waiting for Moodle first-time installation to complete..." - echo "Waiting for Moodle first-time installation to complete..."
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment