Change testing for 2.24 #70
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 | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
max-parallel: 2 | |
fail-fast: false | |
matrix: | |
version: [ 2.24, 2.23, 2.22, 2.21, '2.20', 2.19, 2.18, 2.17, 2.16, 2.15 ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: docker login | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: docker build ${{ matrix.version }} | |
run: docker build ${{ matrix.version }} --tag meteofi/geoserver:${{ matrix.version }} --tag meteofi/geoserver:$(grep -Po '(?<=GEOSERVER_VERSION\=\")\d.\d+.\d+' ${{ matrix.version }}/Dockerfile) | |
- if: ${{ matrix.version == '2.24' }} | |
name: docker tag latest stable | |
run: | | |
docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:latest | |
docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:stable | |
cd ${{ matrix.version }} | |
docker compose up -d --wait --wait-timeout 300 | |
curl -f "http://localhost:8080/geoserver/wms?request=getCapabilities&service=WMS" || exit 1 | |
docker logs geoserver | |
docker compose down | |
- if: ${{ matrix.version == '2.23' }} | |
name: docker tag maintenance | |
run: docker tag meteofi/geoserver:${{ matrix.version }} meteofi/geoserver:maintenance | |
- name: docker test | |
run: | | |
docker run --name geoserver${{ matrix.version }} --rm -p 127.0.0.1:8080:8080 meteofi/geoserver:${{ matrix.version }} &> debug.log & | |
sleep 60 | |
cat debug.log | |
docker logs geoserver${{ matrix.version }} | |
curl -f "http://localhost:8080/geoserver/wms?request=getCapabilities&service=WMS" || exit 1 | |
docker stop geoserver${{ matrix.version }} | |
- name: docker push ${{ matrix.version }} | |
run: docker push --all-tags meteofi/geoserver |