diff --git a/.circleci/config.yml b/.circleci/config.yml index 3c299054828..4428b49fe66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -98,7 +98,11 @@ jobs: - run: docker-compose down # Documentation - - run: docker build --tag=camptocamp/geomapfish-doc --build-arg=MAJOR_VERSION=${MAJOR_VERSION} doc + - run: > + docker build --tag=camptocamp/geomapfish-doc + --build-arg=MAJOR_VERSION=${MAJOR_VERSION} + --build-arg=MAIN_BRANCH=${MAIN_BRANCH} + doc - run: command: docker images diff --git a/Dockerfile b/Dockerfile index fd62971de8b..a17b0e0839b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -210,7 +210,7 @@ ARG VERSION ENV VERSION=$VERSION WORKDIR /src -COPY bin/run /usr/bin/ +COPY bin/run bin/run-git /usr/bin/ COPY --from=build-upgrade /app/c2cgeoportal/commons /opt/c2cgeoportal_commons COPY --from=build-upgrade /app/c2cgeoportal/geoportal /opt/c2cgeoportal_geoportal diff --git a/bin/run-git b/bin/run-git new file mode 100755 index 00000000000..9114e9de470 --- /dev/null +++ b/bin/run-git @@ -0,0 +1,6 @@ +#!/bin/bash -e + +git config --global user.name "$1" +git config --global user.email $2 +shift 2 +run "$@" diff --git a/ci/publish b/ci/publish index 26342ab5711..682891721d4 100755 --- a/ci/publish +++ b/ci/publish @@ -50,7 +50,7 @@ then fi # Publish the GeoMapFish images -for IMAGE in geomapfish geomapfish-build geomapfish-scaffolds geomapfish-config-build geomapfish-geoportal +for IMAGE in geomapfish geomapfish-build geomapfish-config geomapfish-config-build geomapfish-scaffolds geomapfish-geoportal do docker tag camptocamp/${IMAGE} camptocamp/${IMAGE}:${VERSION} docker push camptocamp/${IMAGE}:${VERSION} diff --git a/doc/Dockerfile b/doc/Dockerfile index 19027ad7f47..84a7f38e606 100644 --- a/doc/Dockerfile +++ b/doc/Dockerfile @@ -9,6 +9,7 @@ RUN \ rm --recursive --force /tmp/* /var/tmp/* /root/.cache/* ARG MAJOR_VERSION +ARG MAIN_BRANCH COPY . /doc WORKDIR /doc diff --git a/doc/integrator/upgrade_application.rst.tmpl b/doc/integrator/upgrade_application.rst.tmpl index be5b20a6510..26ce9ede9cf 100644 --- a/doc/integrator/upgrade_application.rst.tmpl +++ b/doc/integrator/upgrade_application.rst.tmpl @@ -14,6 +14,12 @@ Build the project file if needed (2.4): ./docker-run make project.yaml +For 2.4 you also should clean your project (include ignored files): + +.. prompt:: bash + + git clean -dx --force + Get the upgrade script: .. prompt:: bash diff --git a/geoportal/c2cgeoportal_geoportal/scaffolds/create/+dot+env.sample_tmpl b/geoportal/c2cgeoportal_geoportal/scaffolds/create/+dot+env.sample_tmpl index d69f183e0fd..8de80784340 100644 --- a/geoportal/c2cgeoportal_geoportal/scaffolds/create/+dot+env.sample_tmpl +++ b/geoportal/c2cgeoportal_geoportal/scaffolds/create/+dot+env.sample_tmpl @@ -2,7 +2,7 @@ COMPOSE_PROJECT_NAME={{package}} DOCKER_PORT=8484 DOCKER_BASE=camptocamp/{{package}} DOCKER_TAG=latest -VISIBLE_WEB_HOST=localhost +VISIBLE_WEB_HOST=localhost:8484 VISIBLE_WEB_PROTOCOL=https VISIBLE_ENTRY_POINT=/ PGHOST=db diff --git a/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py b/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py index 9c2588a38ad..06b5dd0a792 100644 --- a/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py +++ b/geoportal/c2cgeoportal_geoportal/scripts/c2cupgrade.py @@ -596,7 +596,7 @@ def step10(self, step): message = [ "The upgrade is nearly done, now you should:", - "- Build your application with ./upgrade PACKAGE [DOCKER_TAG]." + "- Build your application with ./upgrade finalise PACKAGE [DOCKER_TAG].", "- Test your application on '{}'.".format( self.project.get('application_url', '... missing ...') ) diff --git a/scripts/upgrade b/scripts/upgrade index 9d1722faea4..fc465f25ac5 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,17 @@ fi if [ $# -gt 1 ] then args="--step $2" +else + if [ "$CI" != "true" ] + then + docker pull camptocamp/geomapfish:$1 + docker pull camptocamp/geomapfish-build:$1 + docker pull camptocamp/geomapfish-config:$1 + docker pull camptocamp/geomapfish-config-build:$1 + docker pull camptocamp/geomapfish-scaffolds:$1 + fi fi docker run --rm --volume=${PWD}:/src camptocamp/geomapfish-scaffolds:$1 \ - run $(id -u) $(id -g) /src c2cupgrade $args + run-git "$(git config --get user.name)" $(git config --get user.email) $(id -u) $(id -g) \ + /src c2cupgrade $args