查看“Jenkins实现PHP持续集成部署”的源代码
←
Jenkins实现PHP持续集成部署
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
= jenkins ins = [[ 基于Docker的Jenkins持续集成 ]] = jenkins alpine php env= <pre> login into alpine docker apk add php php-pear composer php7-fpm php7-json php7-iconv php7-curl php7-pdo php7-gd php7-fileinfo php7-bcmath php7-dom php7-tokenizer php7-ctype php7-simplexml php7-x mlwriter php7-xmlreader php7-zip php7-session </pre> =phing= <pre> 这个成功的 但是这个 是官方说 deprecated 的 哈哈 Phing 随 PERA 扩展包发布,需要使用 PEAR 包管理程序来安装 pear channel-discover pear.phing.info pear install [--alldeps] phing/phing wget -c https://www.phing.info/get/phing-latest.phar php phing-latest.phar 这个不成功 Class 'Phar' not found in /root/phing-latest.phar:5t </pre> https://www.phing.info/#install [http://www.cnmiss.cn/?p=279 使用 PHP 的 Phing 项目部署工具] [https://www.cnblogs.com/RedCandle/archive/2012/06/20/2556585.html 使用 PHP 的 Phing 项目部署工具(转) ] =jenkins php plugin= <pre> Phing plugin </pre> =过程 = 最后进入 项目目录 composer install 会安装很多东西的 最后再去点jenkins jobs =trouble= <pre> 问题一 执行jenkins php artisan migrate --force' PHP Warning: require(/var/package/sns-information/release/804/vendor/autoload.php): failed to open stream: No such file or directory in /var/package/sns-information/release/804/artisan on line 18 PHP Fatal error: require(): Failed opening required '/var/package/sns-information/release/804/vendor/autoload.php' (include_path='.:/usr/local/lib/php') in /var/package/sns-information/release/804/artisan on line 18 SSH: EXEC: completed after 80,843 ms 解决 /var/jenkins_home/workspace/stage-sns-information # composer install 可见要安装的 其实是要激活的 搞错方向了 应该是向上看例如 Problem 1 - Installation request for doctrine/dbal v2.8.0 -> satisfiable by doctrine/dbal[v2.8.0]. - doctrine/dbal v2.8.0 requires ext-pdo * -> the requested PHP extension pdo is missing from your system. resolv apk add php7-pdo 问题二 git 没有版本 新开的 git 他们没上版本 丢 Building on master in workspace /var/jenkins_home/workspace/stage-sns-information using credential d8b760bf-b0ee-458f-af5a-fade9aaa0d5b > git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > git config remote.origin.url http://192.168.10.208:7080/php/sns-information.git # timeout=10 Fetching upstream changes from http://192.168.10.208:7080/php/sns-information.git > git --version # timeout=10 using GIT_ASKPASS to set credentials evan2021 > git fetch --tags --force --progress -- http://192.168.10.208:7080/php/sns-information.git +refs/heads/*:refs/remotes/origin/* # timeout=10 > git rev-parse refs/remotes/origin/release^{commit} # timeout=10 > git rev-parse refs/remotes/origin/origin/release^{commit} # timeout=10 > git rev-parse origin/release^{commit} # timeout=10 ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job. Archiving artifacts SSH: Current build result is [FAILURE], not going to run. Finished: FAILURE 问题三 ssh 可以了 可能要rsa的才行 jenkins jenkins.plugins.publish_over.BapPublisherException: Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [newjenkins2021]. Message [Auth fail]] </pre> ==解决 Laravel/Lumen 出现 "Please provide a valid cache path" 问题 == <pre> 进入项目目录 创建目录: at jenkins mkdir -p storage/framework/views mkdir -p storage/framework/cache mkdir -p storage/framework/sessions </pre> [https://www.cnblogs.com/myall/p/6872824.html 解决 Laravel/Lumen 出现 "Please provide a valid cache path" 问题] =see also= [https://www.jianshu.com/p/e33b226b25c5 PHP+Jenkins 持续集成 ] [https://blog.csdn.net/u014477164/article/details/76686286 jenkins 实现PHP持续集成部署] [https://www.cnblogs.com/phpworld/p/8745544.html jenkins 简单实现php集成上线部署 ] [https://blog.csdn.net/u014477164/article/details/76686286 jenkins 实现PHP持续集成部署] [https://www.php.cn/topic/php7/429276.html PHP7中php.ini、php-fpm和www.conf 配置] [https://www.jianshu.com/p/d979ae1e7e57 使用 Jenkins 自动化发布 PHP 项目] [[category:ops]]
返回至
Jenkins实现PHP持续集成部署
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
我的导航
关于我
shell
python
ops
linuxchina.net
blog.linuxchina
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息