Commit 398dc0b7 authored by Tino Goratsch's avatar Tino Goratsch

- add a Gitlab CI job which updates the latest version file

- cleanup the travis.yml from now obsolete jobs
parent 03b4393c
Pipeline #15534920 passed with stages
in 11 minutes and 53 seconds
......@@ -105,8 +105,17 @@ deploy:generate-artifact:
- package.json
- package-lock.json
- README.md
# only:
# - tags
only:
- tags
post-deploy:update-version-check:
stage: post_deploy
before_script:
- bash ./build/gitlab/before_script.sh > /dev/null
script:
- bash ./build/gitlab/update_version_check.sh
only:
- tags
post-deploy:apidocs:
stage: post_deploy
......
......@@ -22,7 +22,7 @@ before_script:
- ./build/travis/before_script.sh ${ACP3_CI_USER_GH_TOKEN} ${TRAVIS_PHP_VERSION}
script:
- ./build/travis/run_unit_tests.sh ${TRAVIS_PHP_VERSION}
- phpdbg -qrr ./vendor/bin/phpunit -c ./tests/phpunit.dist.xml --coverage-clover ./build/logs/clover.xml
after_success:
- travis_retry vendor/bin/coveralls -v
......@@ -38,24 +38,6 @@ deploy:
on:
tags: true
condition: "$TRAVIS_PHP_VERSION = 7.1*"
# - provider: script
# script: ./build/travis/update_module_repositories.sh ${TRAVIS_TAG}
# skip_cleanup: true
# on:
# tags: true
# condition: "$TRAVIS_PHP_VERSION = 7.1*"
- provider: script
script: ./build/travis/update_version_check.sh ${TRAVIS_TAG}
skip_cleanup: true
on:
tags: true
condition: "$TRAVIS_PHP_VERSION = 7.1*"
- provider: script
script: ./build/travis/generate_api_docs.sh
skip_cleanup: true
on:
branch: master
condition: "$TRAVIS_PHP_VERSION = 7.1*"
cache:
directories:
......
......@@ -4,6 +4,7 @@
[[ ! -e /.dockerenv ]] && [[ ! -e /.dockerinit ]] && exit 0
apt-get update -yqq
apt-get install git
which ssh-agent || (apt-get install openssh-client -y )
eval $(ssh-agent -s)
......
......@@ -5,7 +5,7 @@
# Install apt-utils, git and unzip, the php image doesn't have installed
apt-get update -yqq
apt-get install git zlib1g-dev unzip libicu-dev -yqq
apt-get install zlib1g-dev unzip libicu-dev -yqq
# Install required PHP extensions for the tests etc.
docker-php-ext-install zip
......
#!/bin/bash
TRAVIS_TAG=$1
if [[ -n ${TRAVIS_TAG} ]]
if [[ -n ${CI_COMMIT_TAG} ]]
then
if [[ ${TRAVIS_TAG} == v* ]]
if [[ ${CI_COMMIT_TAG} == v* ]]
then
TRAVIS_TAG_CROPPED=$(echo ${TRAVIS_TAG}| cut -d'v' -f 2)
CI_COMMIT_TAG_CROPPED=$(echo ${CI_COMMIT_TAG}| cut -d'v' -f 2)
else
TRAVIS_TAG_CROPPED=${TRAVIS_TAG}
CI_COMMIT_TAG_CROPPED=${CI_COMMIT_TAG}
fi
git clone https://github.com/ACP3/acp3.github.io.git ./build/acp3.github.io
git clone https://gitlab.com/ACP3/acp3.github.io.git ./build/acp3.github.io
cd ./build/acp3.github.io
git checkout master
rm update.txt
touch update.txt
echo "${TRAVIS_TAG_CROPPED}||https://github.com/ACP3/cms/releases/tag/${TRAVIS_TAG}" >> update.txt
echo "${CI_COMMIT_TAG_CROPPED}||https://github.com/ACP3/cms/releases/tag/${CI_COMMIT_TAG}" >> update.txt
git add update.txt
git commit -am "Updated the latest version to ${TRAVIS_TAG}"
git commit -am "Updated the latest version to ${CI_COMMIT_TAG}"
git push
fi
#!/bin/bash
BRANCH_NAME='sami-update'
REPO_DIR='apidocs'
curl -O http://get.sensiolabs.org/sami.phar
php sami.phar update .sami.php
git clone https://github.com/ACP3/${REPO_DIR}.git ./build/${REPO_DIR}
cd ./build/${REPO_DIR}
git checkout -q -b ${BRANCH_NAME}
git rm -q -r .
cp -a ../sami/docs/* .
git add .
git commit -am "Updated the API docs"
git checkout -q master
git merge -q ${BRANCH_NAME}
git branch -q -d ${BRANCH_NAME}
git push --all
#!/bin/bash
TRAVIS_PHP_VERSION=$1
if [[ ${TRAVIS_PHP_VERSION} != "nightly" ]]
then
travis_retry vendor/bin/coveralls -v
fi
#!/bin/bash
TRAVIS_PHP_VERSION=$1
if [[ ${TRAVIS_PHP_VERSION} != "nightly" ]]
then
phpdbg -qrr ./vendor/bin/phpunit -c ./tests/phpunit.dist.xml --coverage-clover ./build/logs/clover.xml
else
php ./vendor/bin/phpunit -c ./tests/phpunit.dist.xml
fi
#!/bin/bash
TRAVIS_TAG=$1
composer create-project acp3/subtree-pushes -s dev --prefer-dist -n ./build/subtree-pushes
./build/subtree-pushes/exec-command.sh ${TRAVIS_TAG};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment