Drone-UI挂起

Drone-UI挂起

一、问题描述

当我们将.drone.yml配置文件放在项目根目录,执行

git init //初始化仓库
git remote add origin 仓库地址 //链接远程仓库
git add . 
git commit -m "xxxx"
git push 仓库地址 //推送远程仓库

当我们将.drone.yml推送到仓库的时候,那么webhooks就会被触发,我们在drone ci页面就可以看见构建流程

但如果我们的.drone.yml配置失败,那么就会出现一直卡在pending上,或者构建失败

二、修改配置文件

1、.dron.yml文件配置和执行程序对应

如果没有对应配置,那么就会pending

举个荔枝:

#.dron.yml
kind: pipeline
type: docker
name: deployment

platform:
  os: linux
  arch: arm64

steps:
  - name: deployment
    image: node
    commands:
      - pwd
      - ls
      - node app.js

branches: main
//app.js
let res = function(){
    console.log("hello word")
}
res()

三、推送到远程仓库

git add . 
git commit -m "xxxx"
git push 仓库地址 //推送远程仓库

四、查看构建结果

构建成功

我们CI持续集成构建就成功了,我们可以去继续丰富我们配置文件,直到达到我们想要的结果

参考链接:

[Drone入门]: “https://0-8-0.docs.drone.io/zh/getting-started/

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.
  • Copyrights © 2022-2023 alan_mf
  • Visitors: | Views:

请我喝杯咖啡吧~

支付宝
微信