Skip to content

Updates for passing etsp10 tests #4

Updates for passing etsp10 tests

Updates for passing etsp10 tests #4

name: Docker Image CI (Ubuntu Jammy)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-osgeolive-cache
key: ${{ runner.os }}-buildx-osgeolive-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-osgeolive-
- name: docker login
env:
DOCKER_USER: ${{secrets.DOCKER_USER}}
DOCKER_PASSWORD: ${{secrets.DOCKER_PASSWORD}}
run: |
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
file: Dockerfile-OSGeoLive
tags: ${{secrets.DOCKER_USER}}/zookernel:osgeolive-${{ github.sha }}
cache-from: type=local,src=/tmp/.buildx-osgeolive-cache
cache-to: type=local,dest=/tmp/.buildx-osgeolive-cache-new,mode=max
- name: Move cache
run: |
rm -rf /tmp/.buildx-osgeolive-cache
mv /tmp/.buildx-osgeolive-cache-new /tmp/.buildx-osgeolive-cache
- name: Build and push osgeolive-latest
uses: docker/build-push-action@v4
with:
context: .
push: true
file: Dockerfile-OSGeoLive
tags: ${{secrets.DOCKER_USER}}/zookernel:osgeolive-latest
cache-from: type=local,src=/tmp/.buildx-osgeolive-cache
cache-to: type=local,dest=/tmp/.buildx-osgeolive-cache-new,mode=max
- name: Build and push osgeolive-latest
uses: docker/build-push-action@v4
with:
context: .
push: true
file: Dockerfile-OSGeoLive
tags: zooproject/zoo-project:osgeolive-latest
cache-from: type=local,src=/tmp/.buildx-osgeolive-cache
cache-to: type=local,dest=/tmp/.buildx-osgeolive-cache-new,mode=max
- name: Start the test env
run: mkdir docker/tmp; chmod 777 -R docker ; sed "s=djayzen/zookernel:latest=djayzen/zookernel:osgeolive-latest=g" -i docker-compose.yml ; docker-compose up -d
- name: Install required package
run: docker exec zoo-project_zookernel_1 /bin/bash -c "apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get -y install lynx;"
- name: Run GetCapabilities tests version 1.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"GetCapabilities\" 0 0 > outputGC.html 2> log; lynx -dump outputGC.html"
- name: Run DescribeProcess tests version 1.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"DescribeProcess\" 0 0 > outputDP.html 2> log; lynx -dump outputDP.html"
- name: Run ExecuteSync tests version 1.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; GEOSERVER=\"http://zoo-project.org:8080/geoserver/ows\" CPTESTING=\"http://localhost/cptesting/requests/\" ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"ExecuteSync\" 0 0 > outputES.html 2> log; lynx -dump outputES.html"
- name: Run ExecuteAsync tests version 1.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; GEOSERVER=\"http://zoo-project.org:8080/geoserver/ows\" CPTESTING=\"http://localhost/cptesting/requests/\" ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 1.0.0 Buffer \"ExecuteAsync\" 0 0 > outputEA.html 2> log; lynx -dump outputEA.html"
- name: Run GetCapabilities tests version 2.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "sed \"s:version = 1.0.0:version = 2.0.0:g\" /usr/lib/cgi-bin/main.cfg > /usr/lib/cgi-bin/main.cfg1 ; cp /usr/lib/cgi-bin/main.cfg1 /usr/lib/cgi-bin/main.cfg; cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 2.0 Buffer \"GetCapabilities\" 0 0 > outputGC1.html 2> log; lynx -dump outputGC1.html"
- name: Run DescribeProcess tests version 2.0.0
run: docker exec zoo-project_zookernel_1 /bin/bash -c "cd /var/www/html/cptesting/scripts/; mkdir ../tmp; ./run.sh http://localhost/cgi-bin/zoo_loader.cgi 2.0 Buffer \"DescribeProcess\" 0 0 > outputDP2.html 2> log; lynx -dump outputDP2.html"