castopod/.gitlab-ci.yml
Benjamin Bellamy 03e23a28bf feat: update analytics so to meet IABv2 requirements
- https://iabtechlab.com/wp-content/uploads/2017/12/Podcast_Measurement_v2-Dec-20-2017.pdf
  - no IP address is ever stored on the server. Only aggregate data is stored in the dababase.
  - rolling 24-hour window
  - castopod does not do pre-load
  - IP Blacklisting https://github.com/client9/ipcat
  - user-agent Filtering https://github.com/opawg/user-agents
  - ignores 2 bytes range "Range: 0-1" (performed by official Apple iOS Podcast app)
  - in case of partial content, adds up all requests to check >1mn was downloaded
  - identifying Uniques is done with a combination of IP Address and User Agent
- add AMcharts
- add some graphs
- add regions to analytics
- add ipcat blacklist
- enhance useragents performances
- add filesize and header size in order to calculate 1mn downloads
- update publisher ID3 field
- update castopod icon
- add disclaimer and warning import form translation
- update docs/setup-development.md

closes #10
2020-10-15 14:42:02 +00:00

54 lines
1.5 KiB
YAML

image: php:7.2-fpm
stages:
- bundle
cache:
paths:
- vendor/
- node_modules/
before_script:
- apt-get update -y
# Install git (the php image doesn't have it) which is required by composer
- apt-get install git -y
# install rsync for file transfers
- apt-get install rsync -y
# install wget to download archives
- apt-get install wget
# Install composer
- apt-get install zip unzip
- php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- php composer-setup.php
- php -r "unlink('composer-setup.php');"
# Install NodeJS for NPM
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
- apt-get update && apt-get install -y nodejs
# Install php and js dependencies
- php composer.phar install --no-dev --ignore-platform-reqs
- npm install
bundle_app:
stage: bundle
script:
# build all assets for views
- npm run build
# download GeoLite2-City archive and extract it to writable/uploads
- wget -c "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key=$MAXMIND_LICENCE_KEY&suffix=tar.gz" -O - | tar -xz -C ./writable/uploads/
# rename extracted archives' folders
- mv ./writable/uploads/GeoLite2-City* ./writable/uploads/GeoLite2-City
# create bundle folder: uses .rsync-filter (-F) file to copy only needed files
- rsync -avF --progress . ./bundle
artifacts:
name: "castopod-${CI_COMMIT_REF_SLUG}_${CI_COMMIT_SHORT_SHA}"
paths:
- bundle