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

Use c2cciutils - publish to GitHub Container Registry #835

Merged
merged 2 commits into from
Dec 16, 2020
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
44 changes: 11 additions & 33 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '30 2 * * *'

jobs:
main:
audit:
runs-on: ubuntu-20.04
name: Audit
timeout-minutes: 10
Expand All @@ -19,43 +19,21 @@ jobs:
- '1.13'
- '1.14'
- '1.15'
- master

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}

- uses: actions/setup-python@v2
with:
python-version: 3.8

- run: sudo python3 -m pip install safety
- run: |
for file in $(find -name requirements.txt)
do
echo Audit ${file}
(
cd $(dirname ${file}) &&
safety check --full-report --file=requirements.txt\
--ignore=$(cat pip-cve-ignore 2> /dev/null | sed -e 's/,/ --ignore=/g' || true) \

)
done

- uses: asdf-vm/actions/install@v1
with:
tool_versions: python 3.8.0
if: always()
- run: sudo python3 -m pip install pipenv
if: always()
- run: |
asdf install python 3.5.8
for file in $(find -name Pipfile)
do
echo Audit ${file}
(
cd $(dirname ${file}) &&
pipenv check --ignore=$(cat pipenv-cve-ignore 2> /dev/null || echo 0)
)
done
if: always()

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Audit
run: c2cciutils-audit --branch=${{ matrix.branch }}
env:
GITHUB_TOKEN: ${{ github.token }}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ jobs:
name: Clean docker hub tags
timeout-minutes: 5

env:
SUMMON_PROVIDER: /usr/local/bin/gopass
steps:
- uses: actions/checkout@v1
- uses: camptocamp/initialise-gopass-summon-action@v1
- uses: actions/checkout@v2

- uses: camptocamp/initialise-gopass-summon-action@v2
with:
ci-gpg-private-key: ${{secrets.CI_GPG_PRIVATE_KEY}}
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
patterns: docker

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Clean docker hub tags
run: ci/clean-dockerhub-tag
run: c2cciutils-clean
12 changes: 7 additions & 5 deletions .github/workflows/ci.yaml → .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:

env:
REDIS_URL: redis://localhost:6379
PATH: /bin:/usr/bin:/usr/local/bin:/home/runner/.local/bin

steps:
- uses: actions/checkout@v2
Expand All @@ -25,6 +24,12 @@ jobs:
patterns: pypi docker
if: github.repository == 'camptocamp/tilecloud-chain'

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Checks
run: c2cciutils-checks

- run: touch tilecloud_chain/OpenLayers.js

- name: Build
Expand Down Expand Up @@ -54,12 +59,9 @@ jobs:

- name: Check Python package
run: |
sudo rm /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt install --yes python3-setuptools python3-wheel
python3 -m pip install --requirement=requirements-publish.txt
python3 ./setup.py bdist_wheel
twine check dist/*

- name: Publish
run: ci/publish
run: c2cciutils-publish
3 changes: 2 additions & 1 deletion .github/workflows/rebuild-112-113.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,6 @@ jobs:
TOKEN: !var gs/ci/dockerhub/token
' bash -c 'envsubst < ci/docker-config.json.tmpl > ~/.docker/config.json'
if: github.repository == 'camptocamp/tilecloud-chain'

- name: Publish
run: ci/publish ${{ matrix.branch }}
run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }}
2 changes: 1 addition & 1 deletion .github/workflows/rebuild-114.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ jobs:
if: github.repository == 'camptocamp/tilecloud-chain'

- name: Publish
run: ci/publish ${{ matrix.branch }}
run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }}
7 changes: 1 addition & 6 deletions .github/workflows/rebuild-115.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ jobs:
- run: docker-compose logs
if: failure()

- run: |
sudo rm /etc/apt/sources.list.d/*.list
sudo apt update
sudo apt install --yes python3-wheel python3-setuptools

- run: python3 -m pip install --requirement=requirements-publish.txt

- run: |
Expand All @@ -82,4 +77,4 @@ jobs:
if: github.repository == 'camptocamp/tilecloud-chain'

- name: Publish
run: ci/publish ${{ matrix.branch }}
run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }}
11 changes: 8 additions & 3 deletions .github/workflows/rebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ jobs:

env:
REDIS_URL: redis://localhost:6379
PATH: /bin:/usr/bin:/usr/local/bin:/home/runner/.local/bin

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
ref: ${{ matrix.branch }}

Expand All @@ -32,6 +31,12 @@ jobs:
github-gopass-ci-token: ${{secrets.GOPASS_CI_GITHUB_TOKEN}}
patterns: pypi docker

- run: echo "${HOME}/.local/bin" >> ${GITHUB_PATH}
- run: python3 -m pip install --user --requirement=ci/requirements.txt

- name: Checks
run: c2cciutils-checks

- run: touch tilecloud_chain/OpenLayers.js

- name: Build
Expand Down Expand Up @@ -68,4 +73,4 @@ jobs:
- run: python3 -m pip install --requirement=requirements-publish.txt

- name: Publish
run: ci/publish ${{ matrix.branch }}
run: c2cciutils-publish --type=rebuild --branch=${{ matrix.branch }}
8 changes: 4 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ Release 0.7
> - sql: <column> AS geom FROM <table>
> ```
>
> More informations in the **Configure geom/sql** chapter.
> More information in the **Configure geom/sql** chapter.

2. Update from `optparse` to `argparse`, and some argument refactoring, use `--help` to see the new version.
3. Add support of Blackbery DB (`bsddb`).
4. The tile `server` is completely rewrite, now it support all cache, `REST` and `KVP` interface,
`GetFeatureInfo` request, and it can be used as a pyramid view or as a `WSGI` server. More informations in
`GetFeatureInfo` request, and it can be used as a pyramid view or as a `WSGI` server. More information in
the **istribute the tiles** chapter.
5. Add three strategy to bypass the proxy/cache: Use the headers `Cache-Control: no-cache, no-store`,
`Pragma: no-cache` (default). Use localhost in the URL and the header `Host: <host_name>` (recommended).
Add a `SALT` random argument (if the above don't work). More informations in the **Proxy/cache issue**
Add a `SALT` random argument (if the above don't work). More information in the **Proxy/cache issue**
chapter.
6. Improve the dimensions usage by adding it ti the WMS requests, And add a `--dimensions` argument of
`generate_tiles` to change the dimensions values.
7. Extract generate\_cost and generate\_amazon from generate\_controler.
8. Now we can creates legends, see the **Legends** chapter.
9. Now the tiles generation display generation statistics at the ends.
10. The EC2 configuration is moved in a separate structure, see README for more informations.
10. The EC2 configuration is moved in a separate structure, see README for more information.

Release 0.6
-----------
Expand Down
Binary file modified Chaines.dia
Binary file not shown.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN \
node-carto \
optipng \
postgresql-client-12 net-tools iputils-ping \
python3-pip python3-setuptools python3-wheel && \
python3-pip && \
apt clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /root/.cache/*

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Source: WMS, Mapnik.

Optionally using an SQS queue, AWS host, SNS topic.

Destination in WMTS layout, on S3, on Berkley DB (`bsddb`), on MBTiles, or on local filesystem.
Destination in WMTS layout, on S3, on Berkeley DB (`bsddb`), on MBTiles, or on local filesystem.

Features:

Expand Down Expand Up @@ -144,10 +144,10 @@ needed to generate the capabilities. We can specify:

In all case `http_url` or `http_urls` can include all attributes of this cache as `%(attribute)s`.

#### MBTiles vs Berkley DB (`bsddb`)
#### MBTiles vs Berkeley DB (`bsddb`)

- Read performance: similar, eventually the MBTiles is 10% faster.
- Write performance: The Berkley DB is largely faster, about 10 times.
- Write performance: The Berkeley DB is largely faster, about 10 times.
- List the tiles: the MBTiles is largely faster, but we usually don't need it.

### Configure layers
Expand Down Expand Up @@ -622,7 +622,7 @@ There two ways to serve the tiles, with Apache configuration, or with an interna

The advantage of the internal server are:

- Can distribute MBTiles or Berkley DB.
- Can distribute MBTiles or Berkeley DB.
- Return `204 No Content` HTTP code in place of `404 Not Found` (or `403 Forbidden` for s3).
- Can be used in KVP mode.
- Can have zone per layer where are the tiles, otherwise it redirect on mapcache.
Expand Down Expand Up @@ -790,7 +790,7 @@ The following commands can be used to know the time and cost to do generation:

`--verbose` or `-v`: used to display info messages.

`--debug` or `-d`: used to display debug message, pleas use this option to report issue. With the debug mode
`--debug` or `-d`: used to display debug message, please use this option to report issue. With the debug mode
we don't catch exceptions, and we don't log time messages.

`--test <n>` or `-t <n>`: used to generate only `<n>` tiles, useful for test.
Expand Down
57 changes: 0 additions & 57 deletions ci/clean-dockerhub-tag

This file was deleted.

50 changes: 0 additions & 50 deletions ci/publish

This file was deleted.

1 change: 1 addition & 0 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c2cciutils==1.0.dev20201216094446
2 changes: 1 addition & 1 deletion docker/mapcache-docker/mapcache.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
<default_format>image/jpeg</default_format>
<errors>report</errors>
<lock_dir>/tmp</lock_dir>
</mapcache>
</mapcache>
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
version="1.16.0",
description=(
"Tools to generate tiles from WMS or Mapnik, to S3, "
"Berkley DB, MBTiles, or local filesystem in WMTS layout using "
"Berkeley DB, MBTiles, or local filesystem in WMTS layout using "
"Amazon cloud services."
),
long_description=README,
Expand Down
Loading