Commit 531eb5da authored by David Foucher's avatar David Foucher

Merge branch 'vue-editor'

parents 834e5ce7 3151172b
Pipeline #2832 passed with stage
in 1 minute and 42 seconds
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4
[*.{vue,js,yml,yaml}]
indent_size = 2
# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = false
insert_final_newline = true
[Makefile]
indent_style = tab
indent_size = tab
__pycache__/
.mypy_cache/
.pytest_cache/
docs/
tmp/
*.egg-info
build/
......@@ -12,4 +11,6 @@ htmlcov/
backoffice/node_modules/
backoffice/dist/
*.log
.DS_Store
authorisations.csv
*.gz
#TODO test docker image with https://github.com/aelsabbahy/goss
variables:
TREFLE_OLD_VERSION: "api-v0.6.1"
test:
image: python:3.6
cache:
paths:
- ~/.cache/pip/
before_script:
- python setup.py develop
- pip install -r requirements-dev.txt
stage: test
script:
- py.test -v --cov
- behave -D coverage-format=long
only:
- branches
- master
- /^api-v[0-9.ab]+$/
except:
- /^WIP-.*$/
api publish:
image:
......@@ -10,32 +31,54 @@ api publish:
- /kaniko/executor --context ${CI_PROJECT_DIR}/docker --dockerfile $CI_PROJECT_DIR/docker/dockerfile_trefle --build-arg TREFLE_VERSION=$CI_COMMIT_TAG --build-arg TREFLE_GIT=${CI_PROJECT_URL} --destination ${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}
only:
- /^api-v[0-9.ab]+$/
- /^testing$/
deploy API to staging:
type: deploy
environment:
name: recette
url: http://trefle.beta.pole-emploi.fr
before_script:
- apt-get update -qq
- apt-get install -qq git
# Setup SSH deploy keys
- 'which ssh-agent || ( apt-get install -qq openssh-client )'
- eval $(ssh-agent -s)
- ssh-add <(echo "$SSH_PRIVATE_KEY")
- mkdir -p ~/.ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- ssh gitlab@${STAGING_SERVEUR_IP} "cd /home/docker && VERSION=${CI_COMMIT_TAG} /bin/bash update.sh trefle && echo \"VERSION=${CI_COMMIT_TAG}\" | tee -a update.log >> .env"
only:
- /^api-v[0-9.ab]+$/