diff --git a/Makefile b/Makefile index a5effd1192..26ff653f79 100644 --- a/Makefile +++ b/Makefile @@ -196,9 +196,12 @@ docker/qgisserver/commons: commons .PHONY: docker-build-qgisserver docker-build-qgisserver: $(shell docker-required --path docker/qgisserver) docker/qgisserver/commons - docker build --tag=$(DOCKER_BASE)-qgisserver:gmf$(MAJOR_VERSION)-qgismaster docker/qgisserver - docker build --tag=$(DOCKER_BASE)-qgisserver:gmf$(MAJOR_VERSION)-qgis3.2 \ - --file=docker/qgisserver/Dockerfile32 docker/qgisserver + docker build --build-arg=VERSION=latest \ + --tag=$(DOCKER_BASE)-qgisserver:gmf$(MAJOR_VERSION)-qgismaster docker/qgisserver + docker build --build-arg=VERSION=3.2 \ + --tag=$(DOCKER_BASE)-qgisserver:gmf$(MAJOR_VERSION)-qgis3.2 docker/qgisserver + docker build --build-arg=VERSION=3.4 \ + --tag=$(DOCKER_BASE)-qgisserver:gmf$(MAJOR_VERSION)-qgis3.4 docker/qgisserver .PHONY: prepare-tests prepare-tests: \ diff --git a/docker/qgisserver/Dockerfile b/docker/qgisserver/Dockerfile index 84c17cb75b..e1c9cc6149 100644 --- a/docker/qgisserver/Dockerfile +++ b/docker/qgisserver/Dockerfile @@ -1,4 +1,5 @@ -FROM camptocamp/qgis-server:latest +ARG VERSION=latest +FROM camptocamp/qgis-server:${VERSION} LABEL maintainer Camptocamp "info@camptocamp.com" COPY requirements.txt /tmp/ diff --git a/docker/qgisserver/Dockerfile32 b/docker/qgisserver/Dockerfile32 deleted file mode 100644 index 63185c4673..0000000000 --- a/docker/qgisserver/Dockerfile32 +++ /dev/null @@ -1,10 +0,0 @@ -FROM camptocamp/qgis-server:3.2 -LABEL maintainer Camptocamp "info@camptocamp.com" - -COPY requirements.txt /tmp/ -RUN python3 -m pip install --requirement /tmp/requirements.txt - -COPY geomapfish_plugin/* /var/www/plugins/geomapfish_qgisserver/ -COPY commons /opt/c2cgeoportal_commons - -RUN python3 -m pip install --editable /opt/c2cgeoportal_commons diff --git a/travis/publish b/travis/publish index b679789ccb..da2d0c32b0 100755 --- a/travis/publish +++ b/travis/publish @@ -5,6 +5,7 @@ docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD} TAG=`git tag --list --points-at=HEAD` LAST_TAG=`git describe --abbrev=0 --tags` COMMIT=FALSE +VERSION_QGIS=FALSE if [[ ${TAG} =~ ^[0-9]\.[0-9]\.[0-9]$ ]] then @@ -13,6 +14,7 @@ then else if [[ ${BRANCH_NAME} =~ ^[0-9]\.[0-9]$ ]] then + VERSION_QGIS=${TAG} TAG=${LAST_TAG}.`.venv/bin/python travis/get-minor` COMMIT=TRUE fi @@ -38,6 +40,10 @@ else VERSION=${MAJOR_VERSION} fi export VERSION +if [ ${VERSION_QGIS} == FALSE ] +then + VERSION_QGIS=${VERSION} +fi # Publish the GeoMapFish images for IMAGE in geomapfish-build-dev geomapfish-build @@ -47,11 +53,11 @@ do done # Publish the GeoMapFish QGIS server images -for QGIS_VERSION in 3.2 master +for QGIS_VERSION in 3.4 3.2 master do docker tag camptocamp/geomapfish-qgisserver:gmf${MAJOR_VERSION}-qgis${QGIS_VERSION} \ - camptocamp/geomapfish-qgisserver:gmf${VERSION}-qgis${QGIS_VERSION} - docker push camptocamp/geomapfish-qgisserver:gmf${VERSION}-qgis${QGIS_VERSION} + camptocamp/geomapfish-qgisserver:gmf${VERSION_QGIS}-qgis${QGIS_VERSION} + docker push camptocamp/geomapfish-qgisserver:gmf${VERSION_QGIS}-qgis${QGIS_VERSION} done if [ ${DEPLOY_PIP} == TRUE ]