@@ -17,6 +17,7 @@ syntax:lint:
1717 - schedules
1818 - web
1919 - merge_requests
20+ - /^\d+\.\d+\.\d+$/
2021
2122 script :
2223 - echo "Syntax checking PHP files"
@@ -32,6 +33,12 @@ syntax_diff:lint:
3233 - pushes
3334 - branches
3435
36+ except :
37+ - schedules
38+ - web
39+ - merge_requests
40+ - /^\d+\.\d+\.\d+$/
41+
3542 script :
3643 - echo "Syntax checking PHP files"
3744 - bash ./.git-scripts/syntax.sh commit
@@ -52,33 +59,46 @@ syntax_diff:lint:
5259# - vendor/bin/phplint
5360
5461
55- test:install :
56- stage : test
57- image : jerob/docker-ispconfig
58- only :
59- - schedules
60- - web
61- script :
62- - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
63- - apt-get update
64- - apt-get --yes install curl
65- - curl --insecure https://127.0.0.1:8080/login/
66- - ps xaf
67-
62+ # test:install:
63+ # stage: test
64+ # image: jerob/docker-ispconfig
65+ # only:
66+ # - schedules
67+ # - web
68+ # - /^\d+\.\d+\.\d+$/
69+ #
70+ # script:
71+ # - $CI_PROJECT_DIR/helper_scripts/test_install_docker.sh
72+ # - apt-get update
73+ # - apt-get --yes install curl
74+ # - curl --insecure https://127.0.0.1:8080/login/
75+ # - ps xaf
76+ #
77+ # needs: ["syntax:lint"]
6878
6979build:package :
7080 stage : build
7181 image : edbizarro/gitlab-ci-pipeline-php:7.2
7282 only :
7383 refs :
7484 - /^\d+\.\d+\.\d+$/
75- except :
76- - branches
77- - merge_requests
78- - schedules
79- - pushes
85+ - web
86+
8087 script :
8188 - echo "Building release."
89+ - if [[ "$VER" == "" ]] ; then VER="$CI_COMMIT_TAG" ; fi
90+ - if [[ "$VER" == "" ]] ; then VER="3.2dev"$(date +%s) ; fi
91+ - if [[ "$VER" != "" ]] ; then echo "Replacing 3.2dev by $VER" ; sed -i -r 's/3\.2dev/'${VER}'/g' install/tpl/config.inc.php.master install/sql/ispconfig3.sql ; fi
92+ - RET=0
93+ - tar -cpzf ISPConfig-${VER}.tar.gz --exclude "ISPConfig-${VER}.tar.gz" --exclude ".git*" --exclude ".phplint.yml" --transform 's,^\./,ispconfig3_install/,' . || RET=$?
94+ - if [[ $RET > 1 ]] ; then exit $RET ; fi
95+ - echo "Listing tar contents for verification"
96+ - tar -tvf ISPConfig-${VER}.tar.gz
97+ - echo "Uploading file to download server"
98+ - curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ISPConfig-${VER}.tar.gz ftp://${DEPLOY_FTP_SERVER}/web/
99+ - if [[ "$VER" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] ; then echo "Stable release ${VER}" ; curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ISPConfig-${VER}.tar.gz ftp://${DEPLOY_FTP_SERVER}/web/ISPConfig-3-stable.tar.gz ; echo -n "${VER}" > ispconfig3_version.txt ; curl -u "${DEPLOY_FTP_USER}:${DEPLOY_FTP_PASSWORD}" -T ispconfig3_version.txt ftp://${DEPLOY_FTP_SERVER}/web/ ; else echo "Dev release ${VER}" ; fi
100+ - rm ISPConfig-${VER}.tar.gz
101+ - echo "Download url is https://download.ispconfig.org/ISPConfig-${VER}.tar.gz"
82102
83- when : manual
103+ needs : ["syntax:lint"]
84104 allow_failure : false
0 commit comments