From 8b79c7f43ac8d7da28a7c430673a04ac71de3a53 Mon Sep 17 00:00:00 2001 From: JosephK Date: Thu, 14 Dec 2017 15:30:21 +0100 Subject: [PATCH] =?UTF-8?q?Cr=C3=A9ation=20en=20CI=20de=20l=E2=80=99archiv?= =?UTF-8?q?e=20zip=20de=20la=20derni=C3=A8re=20release=20(tag)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..9c9bb7d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +image: php +stages: + - deploy + - funky +pages: + stage: deploy + before_script: + - apt-get update -yqq + - apt-get install zip unzip git -yqq + - curl --silent --show-error https://getcomposer.org/installer | php + script: + - latesttag=$(git describe --tags) + - git checkout ${latesttag} + - php composer.phar install + - mkdir tpl_c + - zip -r latest.zip . + - mkdir .public + - cp latest.zip .public + - mv .public public + artifacts: + paths: + - public + only: + - master + +funky: + stage: funky + before_script: + - apt-get update -y -qq + - DEBIAN_FRONTEND=noninteractive apt-get install -y -qq zip unzip git + - curl --silent --show-error https://getcomposer.org/installer | php + script: + - git checkout funky + - php composer.phar install + - mkdir tpl_c + - mkdir .public + - cp -r * .public + - mv .public public + - mkdir "${HOME}/.ssh" + - chmod 700 "${HOME}/.ssh" + - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi + - eval `ssh-agent -s` + - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi + - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then rsync -a --delete --exclude admin/.stdout.log --exclude admin/.htpasswd --exclude app/inc/config.php --exclude stats/ --exclude errors/ public/ ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/; fi + only: + - funky