Merge branch 'ZOO-Project:main' into main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI (libmozjs) | |
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-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-buildx- | |
- 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-MOZJS | |
tags: ${{secrets.DOCKER_USER}}/zookernel:${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Build and push (official image) | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
file: Dockerfile-MOZJS | |
tags: zooproject/zoo-project:${{ github.sha }} | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Build and push latest | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
push: true | |
tags: ${{secrets.DOCKER_USER}}/zookernel:latest | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- name: Build TeamEngine and the ETS for OGC API - Processes and add it to the docker-compose | |
run: docker/ets-ogcapi-processes/build.sh && head -n $(expr $(grep "^networks:" -rn docker-compose.yml | cut -d':' -f1) - 1) docker-compose.yml > docker-compose1.yml && cat docker/ets-ogcapi-processes/docker-compose-ets-part.yml >> docker-compose1.yml && cat docker-compose.yml| grep "^networks" -A10 >> docker-compose1.yml && mv docker-compose1.yml docker-compose.yml | |
- name: Start the test env | |
run: mkdir docker/tmp; chmod 777 -R docker ; 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 the ETS for OGC API - Processes (see test-run-props.xml for settings) | |
run: docker-compose exec -T teamengine /root/test.sh | |
- 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" | |