Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't requires the .git folder #3120

Merged
merged 2 commits into from
Sep 26, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
!vars.yaml
!lingua.cfg
!.tx
!.git
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service:
env:
global:
- secure: aZWcHZWV8lN2SNU2fcUsG8+fVQLOxwDUFYDvuftZALebRG2AHINTkbS31sKbeSwS19ZYpjcuVOKC9HxNAlnMxsdO1NvvFEbSJJD/yqq0V4EfTRqptZYsFCUou0eXIUWEnoFHD1nY3NhuPQjDoad995xU92z0BzwduxUAj28liu4=
- DOCKER_USERNAME=sbrunner
- secure: SosPNhER7I5YnVZy7AoUjrs+P08S60fPje1sFgMdfRNRElI42oLgO6wk1nEFEGGjUevSLzpsDruy7z1m5ilzyMenO1hG1lASf2BeeJC8rRz75MgRKnlf7Py6BA9GbNprzMdgxNPlUtrEkp9ExLvC7MZs7H0RvwxBgQmepQG5Mdg=

before_install:
## FOR NON DOCKER TESTS
Expand Down Expand Up @@ -41,12 +43,12 @@ before_install:
- mkdir /tmp/travis
- >
travis/docker-get
--tag camptocamp/geomapfish_build_dev:latest
--tag camptocamp/geomapfish-build-dev:latest
--folder docker/build
--paths docker/build
- >
travis/docker-get
--tag camptocamp/geomapfish_build:latest
--tag camptocamp/geomapfish-build:latest
--folder .
--rules transifex-get buildlocales c2cgeoportal/scaffolds/update/CONST_create_template/ c2cgeoportal/scaffolds/nondockerupdate/CONST_create_template/
--paths docker/build setup.py README.rst c2cgeoportal/ docker/build/fixversions.txt
Expand Down Expand Up @@ -207,6 +209,20 @@ deploy:
repo: camptocamp/c2cgeoportal
branch: master
condition: '"${TRAVIS_PULL_REQUEST}" = false'
- provider: script
script: travis/publish-docker
skip_cleanup: true
on:
repo: camptocamp/c2cgeoportal
tags: true
condition: '"${TRAVIS_PULL_REQUEST}" = false'
- provider: script
script: travis/publish-docker
skip_cleanup: true
on:
repo: camptocamp/c2cgeoportal
all_branches: true
condition: '"${TRAVIS_PULL_REQUEST}" = false'

notifications:
email:
Expand Down
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM camptocamp/geomapfish_build_dev:latest
FROM camptocamp/geomapfish-build-dev:latest
LABEL maintainer Camptocamp "info@camptocamp.com"

RUN \
Expand Down Expand Up @@ -79,13 +79,7 @@ RUN \

COPY . /opt/c2cgeoportal

RUN cd /opt/c2cgeoportal && \
if [ ! -e c2cgeoportal/scaffolds/update/CONST_create_template ]; \
then make transifex-get buildlocales; \
fi && \
chmod go+r -R . && \
rm -rf /build

RUN pip install --disable-pip-version-check --no-cache-dir --no-deps --editable /opt/c2cgeoportal
RUN chmod go+r -R /opt/c2cgeoportal && \
pip install --disable-pip-version-check --no-cache-dir --no-deps --editable /opt/c2cgeoportal

WORKDIR /src
2 changes: 1 addition & 1 deletion c2cgeoportal/scaffolds/create/Dockerfile.mako
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM camptocamp/geomapfish_build:${geomapfish_version}
FROM camptocamp/geomapfish-build:${geomapfish_version}
LABEL maintainer Camptocamp "info@camptocamp.com"

COPY . /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
% endif

build:
image: camptocamp/geomapfish_build:${geomapfish_version}
image: camptocamp/geomapfish-build:${geomapfish_version}
volumes:
- build:/build
- .:/src
Expand Down
2 changes: 1 addition & 1 deletion c2cgeoportal/scaffolds/create/docker-run_tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def main():
docker_cmd.extend(["--entrypoint", args[0]])
args = args[1:]

docker_cmd.append("camptocamp/geomapfish_build:{{geomapfish_version}}")
docker_cmd.append("camptocamp/geomapfish-build:{{geomapfish_version}}")
docker_cmd.extend(args)
try:
subprocess.check_call(docker_cmd)
Expand Down
2 changes: 1 addition & 1 deletion doc/developer/build_release.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Get the localisation from Transifex:

.. prompt:: bash

docker build --tag=camptocamp/geomapfish_build_dev docker/build
docker build --tag=camptocamp/geomapfish-build-dev docker/build
./docker-run make transifex-get

For each version we create a new branch (at the latest at the final release):
Expand Down
2 changes: 1 addition & 1 deletion doc/integrator/create_application.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ To get ``c2cgeoportal`` you first need to get the related docker image:

.. prompt:: bash

docker pull camptocamp/geomapfish_build <release|version>
docker pull camptocamp/geomapfish-build <release|version>
wget https://raw.githubusercontent.com/camptocamp/c2cgeoportal/master/docker-run

List existing skeletons
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
image: camptocamp/c2cgeoportal-test-mapserver

build:
image: camptocamp/geomapfish_build_dev:latest
image: camptocamp/geomapfish-build-dev:latest
volumes:
- c2cgpbuild:/build
- .:/src
Expand Down
2 changes: 1 addition & 1 deletion docker-run
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def main():
docker_cmd.extend(["--entrypoint", args[0]])
args = args[1:]

docker_cmd.append("camptocamp/geomapfish_build_dev")
docker_cmd.append("camptocamp/geomapfish-build-dev")
docker_cmd.extend(args)
try:
subprocess.check_call(docker_cmd)
Expand Down
2 changes: 1 addition & 1 deletion docker/build/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ PyYAML==3.12 # setup.py
repoze.lru==0.6
requests[security]==2.18.3
restkit==4.2.2
Shapely==1.5.17
Shapely==1.6.1
simplejson==3.11.1
six==1.10.0
Sphinx==1.6.3
Expand Down
18 changes: 18 additions & 0 deletions travis/publish-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

docker login --username ${DOCKER_USERNAME} --password ${DOCKER_PASSWORD}

for IMAGE in geomapfish-build-dev geomapfish-build
do
if [ "${TRAVIS_TAG}" != "" ]
then
docker tag camptocamp/${IMAGE}:latest camptocamp/${IMAGE}:${TRAVIS_TAG}
docker push camptocamp/${IMAGE}:${TRAVIS_TAG}
elif [ "${TRAVIS_BRANCH}" != "master" ]
then
docker tag camptocamp/${IMAGE}:latest camptocamp/${IMAGE}:${TRAVIS_BRANCH}
docker push camptocamp/${IMAGE}:${TRAVIS_BRANCH}
else
docker push camptocamp/${IMAGE}:latest
fi
done