test
Some checks failed
CI/CD Pipeline with Direct Podman Access / test-backend (push) Failing after 25s
Some checks failed
CI/CD Pipeline with Direct Podman Access / test-backend (push) Failing after 25s
This commit is contained in:
parent
c6053793f5
commit
c0000b9e93
1 changed files with 17 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
name: CI/CD Pipeline Simplified
|
||||
name: CI/CD Pipeline with Direct Podman Access
|
||||
|
||||
on:
|
||||
push:
|
||||
|
@ -20,27 +20,20 @@ jobs:
|
|||
image: git.gcdo.org/devteam/sharenet/ci-node-podman@sha256:eb0d942bd9a8cc69c63eb9ccf3877703898d676d0268cf379defdcda7e55f37f
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Debug container environment
|
||||
|
||||
- name: Debug environment
|
||||
run: |
|
||||
echo "Current user: $(id)"
|
||||
echo "Environment variables:"
|
||||
env | sort
|
||||
echo "Directory contents:"
|
||||
ls -la /
|
||||
echo "DOCKER_HOST: $DOCKER_HOST"
|
||||
ls -la /run/ || echo "No /run directory"
|
||||
ls -la /run/user/ || echo "No /run/user directory"
|
||||
echo "Testing Podman access:"
|
||||
podman --version || echo "Podman not available"
|
||||
which podman || echo "Podman not in PATH"
|
||||
|
||||
- name: Verify Podman access
|
||||
which docker || echo "Docker not found"
|
||||
docker --version || echo "Docker command failed"
|
||||
|
||||
- name: Test Docker/Podman access
|
||||
run: |
|
||||
echo "Checking Podman socket..."
|
||||
ls -la /run/user/999/podman/
|
||||
test -S /run/user/999/podman/podman.sock && echo "Socket exists" || echo "Socket missing"
|
||||
podman --url unix:///run/user/999/podman/podman.sock info
|
||||
podman --url unix:///run/user/999/podman/podman.sock ps
|
||||
# Test using the Docker CLI with the socket
|
||||
docker info || echo "Docker info failed"
|
||||
docker ps || echo "Docker ps failed"
|
||||
|
||||
- name: Verify pinned digests
|
||||
run: |
|
||||
|
@ -50,11 +43,11 @@ jobs:
|
|||
done
|
||||
|
||||
- name: Create internal network
|
||||
run: podman --url unix:///run/user/999/podman/podman.sock network create --internal integ-${{ env.RUN_ID }}
|
||||
run: docker network create --internal integ-${{ env.RUN_ID }}
|
||||
|
||||
- name: Start PostgreSQL
|
||||
run: |
|
||||
podman --url unix:///run/user/999/podman/podman.sock run -d \
|
||||
docker run -d \
|
||||
--name test-postgres-${{ env.RUN_ID }} \
|
||||
--network integ-${{ env.RUN_ID }} \
|
||||
-e POSTGRES_PASSWORD=password \
|
||||
|
@ -65,14 +58,14 @@ jobs:
|
|||
- name: Wait for PostgreSQL
|
||||
run: |
|
||||
timeout 60 bash -c '
|
||||
until podman --url unix:///run/user/999/podman/podman.sock exec test-postgres-${{ env.RUN_ID }} pg_isready -h 127.0.0.1 -p 5432 -U postgres; do
|
||||
until docker exec test-postgres-${{ env.RUN_ID }} pg_isready -h 127.0.0.1 -p 5432 -U postgres; do
|
||||
sleep 1
|
||||
done
|
||||
'
|
||||
|
||||
- name: Run backend tests
|
||||
run: |
|
||||
podman --url unix:///run/user/999/podman/podman.sock run --rm \
|
||||
docker run --rm \
|
||||
-v "$PWD":/workspace \
|
||||
-w /workspace \
|
||||
--network integ-${{ env.RUN_ID }} \
|
||||
|
@ -83,5 +76,5 @@ jobs:
|
|||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
podman --url unix:///run/user/999/podman/podman.sock rm -f test-postgres-${{ env.RUN_ID }} 2>/dev/null || true
|
||||
podman --url unix:///run/user/999/podman/podman.sock network rm integ-${{ env.RUN_ID }} 2>/dev/null || true
|
||||
docker rm -f test-postgres-${{ env.RUN_ID }} 2>/dev/null || true
|
||||
docker network rm integ-${{ env.RUN_ID }} 2>/dev/null || true
|
Loading…
Add table
Reference in a new issue