hyperfk8s/.drone.yml

70 lines
2.0 KiB
YAML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

kind: pipeline # 定义一个管道
type: docker # 当前管道的类型
name: test # 当前管道的名称
# ****************** 直接丢掉 默认会直接拉代码 ******************
clone:
disable: true #禁用默认克隆
steps: # 定义管道的执行步骤
# - name: clone-test
# image: alpine/git
# commands:
# - git clone http://gong.cool:3001/gitea/hyperf.git #自定义克隆地址 http://gong.cool:3001/gitea/hyperf.git
# - git version
# - pwd
# - ls -a
# ****************** 直接丢掉 默认会直接拉代码 ******************
# - name: build # 步骤名称
# image: gong921123/debian-nginx-php114-74:latest # 当前步骤使用的镜像 image: composer:latest 这里还是使用自己的环境 否则可能一些依赖版本问题会出现这里的composer是 2.5.4 版本
# commands: # 当前步骤执行的命令
# - composer -v
# - ls -a
# - composer install -v
# - ls -a
# - name: deploy-push-images
# image: plugins/docker
# settings:
# repo: gong921123/hyperf # 推送到dockerhub仓库去
# registry: docker.io
# insecure: true # 不使用https
# username:
# from_secret: docker_username
# password:
# from_secret: docker_password
# dockerfile: docker/Dockerfile
# tags: latest
#
- name: build-start
image: appleboy/drone-ssh
settings:
host: gong.cool
username:
from_secret: ssh_username
password:
from_secret: ssh_password
# port: 22
command_timeout: 5m
script:
- ls
# - name: start_container
# image: docker
# commands:
# - docker-compose up -d
#
# - name: run_hyperf
# image: docker
# commands:
# - docker-compose exec -T gong921123/hyperf:latest php bin/hyperf.php
trigger: # 触发条件,并关系
branch: # git 分支
- develop
event: # 事件
- push
# - tag