2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-14 00:54:07 +00:00
frappe_docker/.travis.yml

187 lines
8.0 KiB
YAML
Raw Normal View History

2020-02-10 08:00:54 +00:00
sudo: required
refactor(frappe-docker): code cleanup and fixes (#63) * testing replacement for dbench * fixed perm issue and added docker control * fixes and tests fixed travis test, and perm issue * auto add permissions * bench setup anything-else should work now * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * hopefully should fix the args issue * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * Removed extra line * Removed MAINTAINER in favor of LABEL * all installs are in one apt command * Switch bench to dbench, added -s feature of dbench to bench. updated Docker file with sudo and vim, and setup travis to run with said changes * dockerfile: clean up (#52) * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * fixed travis, and cleaned up dbench a little * Oops... * oops, but only for travis, this runs fine * Travis! * added help to dbench, and updated readme * changes some of the wording of the help message * dbench: fix init issues (#55) ./dbench init would lead to 'missing argument: PATH' issue (#54), and could not find Procfile_docker and site-config. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com> * bench setup anything-else should work now * Clean cache to get a smaller image (#57) Please include this commit to decrease the size of the docker image, the "rm -rf /var/lib/apt/lists/*" it is not usefull if it is not used in the same stage of the apt-get install RUN, similar with pip cache. References: - https://linux.die.net/man/8/apt-get - https://stackoverflow.com/questions/9510474/removing-pips-cache - https://semaphoreci.com/blog/2016/12/13/lightweight-docker-images-in-5-steps.html By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; (b) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com> * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * Changed the readme significantly Please enter the commit message for your changes. Lines starting * changed test.py to avoid naming errors * moving some things around for less lines * some more slight name changes * added a .gitignore * added the frappe folder again * added a .dockerignore and fixed the dockerfile up a bit * Updating travis' docker and compose This is the commit message #3: * bringing chown in dbench back * some refractoring * implementing codacy sugestions * moving some things around * Updating dbench in some areas * some random changes and fixes * dockerfile refactoring * Refractoring, reducing layers * removing the py script that took too many lines to do one simple thing * Fixed up the readme * some refractoring * moving to debian slim and refractoring * adding some logging * Updated travis to ubuntu xenial, should fix the curl issue * manually building curl, cause we cant use the latest version... * maybe we dont need it * changing the url to curl * trying this instead * lets just let it pollute the stream * please pollute!
2019-04-05 19:50:30 +00:00
2020-03-05 01:04:26 +00:00
dist: bionic
language: python
python:
- '3.6'
services:
- docker
refactor(frappe-docker): code cleanup and fixes (#63) * testing replacement for dbench * fixed perm issue and added docker control * fixes and tests fixed travis test, and perm issue * auto add permissions * bench setup anything-else should work now * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * hopefully should fix the args issue * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * Removed extra line * Removed MAINTAINER in favor of LABEL * all installs are in one apt command * Switch bench to dbench, added -s feature of dbench to bench. updated Docker file with sudo and vim, and setup travis to run with said changes * dockerfile: clean up (#52) * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * fixed travis, and cleaned up dbench a little * Oops... * oops, but only for travis, this runs fine * Travis! * added help to dbench, and updated readme * changes some of the wording of the help message * dbench: fix init issues (#55) ./dbench init would lead to 'missing argument: PATH' issue (#54), and could not find Procfile_docker and site-config. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com> * bench setup anything-else should work now * Clean cache to get a smaller image (#57) Please include this commit to decrease the size of the docker image, the "rm -rf /var/lib/apt/lists/*" it is not usefull if it is not used in the same stage of the apt-get install RUN, similar with pip cache. References: - https://linux.die.net/man/8/apt-get - https://stackoverflow.com/questions/9510474/removing-pips-cache - https://semaphoreci.com/blog/2016/12/13/lightweight-docker-images-in-5-steps.html By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; (b) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com> * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * Changed the readme significantly Please enter the commit message for your changes. Lines starting * changed test.py to avoid naming errors * moving some things around for less lines * some more slight name changes * added a .gitignore * added the frappe folder again * added a .dockerignore and fixed the dockerfile up a bit * Updating travis' docker and compose This is the commit message #3: * bringing chown in dbench back * some refractoring * implementing codacy sugestions * moving some things around * Updating dbench in some areas * some random changes and fixes * dockerfile refactoring * Refractoring, reducing layers * removing the py script that took too many lines to do one simple thing * Fixed up the readme * some refractoring * moving to debian slim and refractoring * adding some logging * Updated travis to ubuntu xenial, should fix the curl issue * manually building curl, cause we cant use the latest version... * maybe we dont need it * changing the url to curl * trying this instead * lets just let it pollute the stream * please pollute!
2019-04-05 19:50:30 +00:00
before_install:
- if [[ "$BUILD" != "development" ]]; then
2020-02-21 12:18:20 +00:00
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin;
sudo apt-get update && sudo apt-get -y install git;
fi
2020-02-21 12:14:40 +00:00
- if [[ $BUILD == "development" ]];then
sudo apt-get update && sudo apt-get -y install docker-compose;
2020-02-10 08:00:54 +00:00
fi
- chmod u+x ./travis.py
refactor(frappe-docker): code cleanup and fixes (#63) * testing replacement for dbench * fixed perm issue and added docker control * fixes and tests fixed travis test, and perm issue * auto add permissions * bench setup anything-else should work now * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * hopefully should fix the args issue * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * Removed extra line * Removed MAINTAINER in favor of LABEL * all installs are in one apt command * Switch bench to dbench, added -s feature of dbench to bench. updated Docker file with sudo and vim, and setup travis to run with said changes * dockerfile: clean up (#52) * Condensed Dockerfile Updated to latest node, and uses python-pip, also condensed a lot the Dockerfile. * fixed travis, and cleaned up dbench a little * Oops... * oops, but only for travis, this runs fine * Travis! * added help to dbench, and updated readme * changes some of the wording of the help message * dbench: fix init issues (#55) ./dbench init would lead to 'missing argument: PATH' issue (#54), and could not find Procfile_docker and site-config. Signed-off-by: Chinmay Pai <chinmaydpai@gmail.com> * bench setup anything-else should work now * Clean cache to get a smaller image (#57) Please include this commit to decrease the size of the docker image, the "rm -rf /var/lib/apt/lists/*" it is not usefull if it is not used in the same stage of the apt-get install RUN, similar with pip cache. References: - https://linux.die.net/man/8/apt-get - https://stackoverflow.com/questions/9510474/removing-pips-cache - https://semaphoreci.com/blog/2016/12/13/lightweight-docker-images-in-5-steps.html By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; (b) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Signed-off-by: William Moreno Reyes <williamjmorenor@gmail.com> * removed adding site names to host (its pointless) * moved redis configuration folder into conf/ * added a docker down feature to dbench and changed some of the docs * Changed the readme significantly Please enter the commit message for your changes. Lines starting * changed test.py to avoid naming errors * moving some things around for less lines * some more slight name changes * added a .gitignore * added the frappe folder again * added a .dockerignore and fixed the dockerfile up a bit * Updating travis' docker and compose This is the commit message #3: * bringing chown in dbench back * some refractoring * implementing codacy sugestions * moving some things around * Updating dbench in some areas * some random changes and fixes * dockerfile refactoring * Refractoring, reducing layers * removing the py script that took too many lines to do one simple thing * Fixed up the readme * some refractoring * moving to debian slim and refractoring * adding some logging * Updated travis to ubuntu xenial, should fix the curl issue * manually building curl, cause we cant use the latest version... * maybe we dont need it * changing the url to curl * trying this instead * lets just let it pollute the stream * please pollute!
2019-04-05 19:50:30 +00:00
2020-02-10 08:00:54 +00:00
after_success:
- docker --version
jobs:
2020-02-10 08:00:54 +00:00
include:
- stage: "Build Frappe bench development environment (latest)"
2020-02-21 11:25:13 +00:00
if: branch = develop AND type != pull_request
2020-02-10 08:00:54 +00:00
script:
2020-03-05 16:09:03 +00:00
- docker build -t frappe/bench:latest -f build/bench/Dockerfile .
- docker push frappe/bench:latest
- stage: "Frappe (edge)"
2020-03-05 16:55:11 +00:00
if: branch = develop AND type != pull_request
script:
2020-06-19 16:27:56 +00:00
- ./travis.py frappe --worker --tag latest
- ./travis.py frappe --worker --tag edge --tag-only
2020-03-07 07:57:19 +00:00
- ./travis.py frappe --worker --tag develop --tag-only
- stage: "Frappe (edge)"
2020-02-21 11:25:13 +00:00
if: branch = develop AND type != pull_request
script:
2020-06-19 16:27:56 +00:00
- ./travis.py frappe --nginx --tag latest
- ./travis.py frappe --nginx --tag edge --tag-only
2020-03-07 07:57:19 +00:00
- ./travis.py frappe --nginx --tag develop --tag-only
- stage: "Frappe (edge)"
if: branch = develop AND type != pull_request
script:
2020-06-19 16:27:56 +00:00
- ./travis.py frappe --socketio --tag latest
- ./travis.py frappe --socketio --tag edge --tag-only
- ./travis.py frappe --socketio --tag develop --tag-only
- stage: "ERPNext (edge)"
2020-02-21 11:25:13 +00:00
if: branch = develop AND type != pull_request
script:
2020-06-19 16:27:56 +00:00
- ./travis.py erpnext --worker --tag latest
- ./travis.py erpnext --worker --tag edge --tag-only
- ./travis.py erpnext --worker --tag develop --tag-only
- stage: "ERPNext (edge)"
2020-02-21 11:25:13 +00:00
if: branch = develop AND type != pull_request
2020-02-10 08:00:54 +00:00
script:
2020-06-19 16:27:56 +00:00
- ./travis.py erpnext --nginx --tag latest
- ./travis.py erpnext --nginx --tag edge --tag-only
- ./travis.py erpnext --nginx --tag develop --tag-only
2020-05-01 18:51:56 +00:00
- stage: "Frappe (v13-beta)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --worker --git-version 13-beta
- ./travis.py frappe --worker --tag v13-beta --tag-only
- ./travis.py frappe --worker --tag version-13-beta --tag-only
- stage: "Frappe (v13-beta)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --nginx --git-version 13-beta
- ./travis.py frappe --nginx --tag v13-beta --tag-only
- ./travis.py frappe --nginx --tag version-13-beta --tag-only
- stage: "Frappe (v13-beta)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 13-beta
- ./travis.py frappe --socketio --tag v13-beta --tag-only
- ./travis.py frappe --socketio --tag version-13-beta --tag-only
- stage: "ERPNext (v13-beta)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --worker --git-version 13-beta
- ./travis.py erpnext --worker --tag v13-beta --tag-only
- ./travis.py erpnext --worker --tag version-13-beta --tag-only
- stage: "ERPNext (v13-beta)"
if: branch = master AND type != pull_request
script:
- ./travis.py erpnext --nginx --git-version 13-beta
- ./travis.py erpnext --nginx --tag v13-beta --tag-only
- ./travis.py erpnext --nginx --tag version-13-beta --tag-only
- stage: "Frappe (v12)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py frappe --worker --git-version 12
- ./travis.py frappe --worker --tag v12 --tag-only
- ./travis.py frappe --worker --tag version-12 --tag-only
- stage: "Frappe (v12)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py frappe --nginx --git-version 12
- ./travis.py frappe --nginx --tag v12 --tag-only
- ./travis.py frappe --nginx --tag version-12 --tag-only
- stage: "Frappe (v12)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 12
- ./travis.py frappe --socketio --tag v12 --tag-only
- ./travis.py frappe --socketio --tag version-12 --tag-only
- stage: "ERPNext (v12)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py erpnext --worker --git-version 12
- ./travis.py erpnext --worker --tag v12 --tag-only
- ./travis.py erpnext --worker --tag version-12 --tag-only
- stage: "ERPNext (v12)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py erpnext --nginx --git-version 12
- ./travis.py erpnext --nginx --tag v12 --tag-only
- ./travis.py erpnext --nginx --tag version-12 --tag-only
- stage: "Frappe (v11)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py frappe --worker --git-version 11
- ./travis.py frappe --worker --tag v11 --tag-only
- ./travis.py frappe --worker --tag version-11 --tag-only
- stage: "Frappe (v11)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py frappe --nginx --git-version 11
- ./travis.py frappe --nginx --tag v11 --tag-only
- ./travis.py frappe --nginx --tag version-11 --tag-only
- stage: "Frappe (v11)"
if: branch = master AND type != pull_request
script:
- ./travis.py frappe --socketio --git-version 11
- ./travis.py frappe --socketio --tag v11 --tag-only
- ./travis.py frappe --socketio --tag version-11 --tag-only
- stage: "ERPNext (v11)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py erpnext --worker --git-version 11
- ./travis.py erpnext --worker --tag v11 --tag-only
- ./travis.py erpnext --worker --tag version-11 --tag-only
- stage: "ERPNext (v11)"
2020-02-21 11:25:13 +00:00
if: branch = master AND type != pull_request
2020-02-20 17:37:18 +00:00
script:
- ./travis.py erpnext --nginx --git-version 11
- ./travis.py erpnext --nginx --tag v11 --tag-only
- ./travis.py erpnext --nginx --tag version-11 --tag-only
- stage: "Build and test edge images"
if: type = pull_request
2020-05-01 11:24:52 +00:00
before_install:
2020-06-26 04:49:27 +00:00
- sudo curl -L "https://github.com/docker/compose/releases/download/1.26.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- sudo apt-get update && sudo apt-get -y install w3m
2020-05-01 11:24:52 +00:00
script:
- docker build -t frappe/frappe-socketio:edge -f build/frappe-socketio/Dockerfile .
- docker build -t frappe/frappe-worker:develop -f build/frappe-worker/Dockerfile .
- docker build -t frappe/erpnext-worker:edge -f build/erpnext-worker/Dockerfile .
- docker build -t frappe/frappe-nginx:develop -f build/frappe-nginx/Dockerfile .
- docker build -t frappe/erpnext-nginx:edge -f build/erpnext-nginx/Dockerfile .
- ./tests/docker-test.sh
- stage: "Pull and test edge images"
if: branch = develop AND type != pull_request
before_install:
2020-06-26 04:49:27 +00:00
- sudo apt-get update && sudo apt-get -y install docker-compose w3m
script:
- ./tests/docker-test.sh
2020-06-17 09:41:24 +00:00
- stage: "Helm Chart Release"
if: branch = master AND type != pull_request
env:
2020-06-19 16:09:28 +00:00
- GIT_SSH_COMMAND="ssh -i ${TRAVIS_BUILD_DIR}/deploy_key"
2020-06-17 09:41:24 +00:00
before_install:
- openssl aes-256-cbc -K $encrypted_189e52c2c347_key -iv $encrypted_189e52c2c347_iv -in deploy_key.enc -out deploy_key -d;
chmod 400 deploy_key;
2020-06-19 16:09:28 +00:00
- ssh-keyscan github.com >> $HOME/.ssh/known_hosts 2>/dev/null;
install:
- pip install --upgrade pip
2020-06-17 09:41:24 +00:00
script:
2020-06-19 16:09:28 +00:00
- git clone git@github.com:frappe/helm.git && cd helm
- pip install -r release_wizard/requirements.txt
2020-06-17 09:41:24 +00:00
- ./release_wizard/wizard 12 patch --remote origin --ci