|
| 1 | +--- |
| 2 | +kind: pipeline |
| 3 | +name: deploy_static_assets |
| 4 | + |
| 5 | +clone: |
| 6 | + |
| 7 | +steps: |
| 8 | + - name: prepare_package |
| 9 | + image: joomlaprojects/docker-images:packager |
| 10 | + commands: |
| 11 | + - mkdir build |
| 12 | + - cp -r -v archived.html css/ images/ img/ js/ index.html results.html robots.txt 403.html 404.html .htaccess ./build |
| 13 | + |
| 14 | + - name: deploy_documentation |
| 15 | + image: debian:stable-slim |
| 16 | + environment: |
| 17 | + ssh_password: |
| 18 | + from_secret: ssh_password |
| 19 | + ssh_user: |
| 20 | + from_secret: ssh_user |
| 21 | + ssh_host: |
| 22 | + from_secret: ssh_host |
| 23 | + commands: |
| 24 | + - apt update && apt install -y rclone openssh-client |
| 25 | + - rclone config create api sftp host $ssh_host user $ssh_user pass $ssh_password port 22 use_insecure_cipher true disable_hashcheck true |
| 26 | + - rclone sync ./build/ api:/home/api/public_html -v --exclude "cms-2.5" --exclude "cms-3" --exclude "cms-4" --exclude "framework-1" --exclude "framework-2" |
| 27 | + |
| 28 | +trigger: |
| 29 | + branch: |
| 30 | + - master |
| 31 | + event: |
| 32 | + - push |
| 33 | + |
| 34 | +--- |
| 35 | +kind: pipeline |
| 36 | +name: build_documentation |
| 37 | + |
| 38 | +clone: |
| 39 | + |
| 40 | +steps: |
| 41 | + - name: parameter_check1 |
| 42 | + image: debian:stable-slim |
| 43 | + commands: |
| 44 | + - | |
| 45 | + if [ "$JTYPE" = "framework" ]; then |
| 46 | + exit 0 |
| 47 | + fi |
| 48 | + - echo "JTYPE parameter is missing. Allowed values [framework, cms]" |
| 49 | + - exit 1 |
| 50 | + |
| 51 | + - name: parameter_check2 |
| 52 | + image: debian:stable-slim |
| 53 | + commands: |
| 54 | + - | |
| 55 | + if [ $JVERSION > 0 ]; then |
| 56 | + exit 0 |
| 57 | + fi |
| 58 | + - echo 'JVERSION parameter is missing.' |
| 59 | + - exit 1 |
| 60 | + |
| 61 | + - name: prepare |
| 62 | + image: joomlaprojects/docker-images:php7.4 |
| 63 | + commands: |
| 64 | + - composer install |
| 65 | + - git config --global advice.detachedHead false |
| 66 | + - | |
| 67 | + if [ "$JTYPE" = "framework" ]; then |
| 68 | + vendor/bin/robo repos:checkout --fw=$JVERSION |
| 69 | + fi |
| 70 | + - | |
| 71 | + if [ "$JTYPE" = "cms" ]; then |
| 72 | + git clone https://github.com/joomla/joomla-cms.git ./repos/joomla-cms |
| 73 | + cd repos/joomla-cms |
| 74 | + git checkout tags/$JVERSION |
| 75 | + fi |
| 76 | +
|
| 77 | + - name: generate_documentation |
| 78 | + image: phpdoc/phpdoc |
| 79 | + commands: |
| 80 | + - | |
| 81 | + if [ "$JTYPE" = "framework" ]; then |
| 82 | + phpdoc -d "./repos/*/src" -t "./build/framework-$JVERSION/" --template "./" --title "Joomla! Framework $JVERSION.x API" -i "./repos/string/src/phputf8" --setting=graphs.enabled=true |
| 83 | + fi |
| 84 | + - | |
| 85 | + if [ "$JTYPE" = "cms" ]; then |
| 86 | + export MINORVERSION=${JVERSION%.*} |
| 87 | + export MAJORVERSION=${MINORVERSION%.*} |
| 88 | + phpdoc -d "./repos/joomla-cms/libraries/src" -t "./build/cms-$MAJORVERSION/" --template "./" --title "Joomla! CMS $MINORVERSION.x API" --setting=graphs.enabled=true |
| 89 | + fi |
| 90 | +
|
| 91 | + - name: deploy_documentation |
| 92 | + image: debian:stable-slim |
| 93 | + environment: |
| 94 | + ssh_password: |
| 95 | + from_secret: ssh_password |
| 96 | + ssh_user: |
| 97 | + from_secret: ssh_user |
| 98 | + ssh_host: |
| 99 | + from_secret: ssh_host |
| 100 | + commands: |
| 101 | + - apt update && apt install -y rclone openssh-client |
| 102 | + - rclone config create api sftp host $ssh_host user $ssh_user pass $ssh_password port 22 use_insecure_cipher true disable_hashcheck true |
| 103 | + - | |
| 104 | + if [ "$JTYPE" = "framework" ]; then |
| 105 | + rclone sync ./build/framework-$JVERSION/ api:/home/api/public_html/framework-$JVERSION/ -v |
| 106 | + fi |
| 107 | + - | |
| 108 | + if [ "$JTYPE" = "cms" ]; then |
| 109 | + export MINORVERSION=${JVERSION%.*} |
| 110 | + export MAJORVERSION=${MINORVERSION%.*} |
| 111 | + rclone sync ./build/cms-$MAJORVERSION/ api:/home/api/public_html/cms-$MAJORVERSION/ -v |
| 112 | + fi |
| 113 | + - |
| 114 | + |
| 115 | +trigger: |
| 116 | + branch: |
| 117 | + - master |
| 118 | + event: |
| 119 | + - custom |
| 120 | + |
| 121 | +--- |
| 122 | +kind: signature |
| 123 | +hmac: 5b71082bf6335a04e8852a4231b1991fad92ddc6e5492e8b1e83b28bc4192f9f |
| 124 | + |
| 125 | +... |
0 commit comments