Comments (9)
@sdaduanbilei 把变量 GIT_COMMIT_LOG 改为 ANDORID_OUTPUT_GIT_COMMIT_LOG
from docs.
这个配置FLOW_ENV_OUTPUT_PREFIX: ANDORID_OUTPUT_
意思是只共享前缀是 ANDROID_OUTPUT_的环境变量
from docs.
@yunheli 成功了
但是为什么得这样写?
还有第一步是不是可以实现,检测到commit
和上一次不相同了 我在 进行全部流程的编译 上传, 如果相同 我就直接结束, Webhook
由于是台物理机只能局域网使用,我现在是 定时检测
from docs.
@sdaduanbilei
第一个问题:环境变量太多,所以只能存一些指定的环境变量,因为这些环境变量要入库
第二个问题:你把上次最新的commit写到一个文件,下次编译的时候读一下文件的上次保存的commit 不同的话就继续
from docs.
至于环境变量的前缀是什么可以自己定义
from docs.
@yunheli 如何结束 停止不进行往下走呢? exit
好像不管用!
from docs.
flow:
- envs:
FLOW_AGENT_WORKSPACE: ${HOME}/agent-workspace
FLOW_ENV_OUTPUT_PREFIX: ANDORID_OUTPUT_
ANDROID_GRADLE_BUILD_TASK: assembleRelease
ANDROID_PROJECT_NAME: youprojectname
steps:
- name: Git Clone #rm -r -f 每次都会删除项目,重新clone
script: |
rm -r -f ${ANDROID_PROJECT_NAME}
export GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git clone --branch ${FLOW_GIT_BRANCH} --single-branch ${FLOW_GIT_URL} ${ANDROID_PROJECT_NAME}
cd ${ANDROID_PROJECT_NAME}
export GIT_COMMIT_ID=`git rev-parse HEAD` # 获取最后一个 commit id
export ANDORID_OUTPUT_GIT_COMMIT_LOG=`git log -1`
COMMIT_PAHT=${HOME}/${ANDROID_PROJECT_NAME}.txt
echo current git log:${ANDORID_OUTPUT_GIT_COMMIT_LOG}
if [ -f "${COMMIT_PAHT}" ] # 判断文件是否存在
then
cat ${COMMIT_PAHT} | while read LINE # 读取本地的commit id
do
if [[ ${LINE} == ${GIT_COMMIT_ID} ]]
then
rm -r -f ${ANDROID_PROJECT_NAME}
echo Everything up-to-date
[["]]
exit
else
echo ${GIT_COMMIT_ID} > ${COMMIT_PAHT} # 以项目名,保存commit id到本地
fi
done
else
echo ${GIT_COMMIT_ID} > ${COMMIT_PAHT} # 以项目名,保存commit id到本地
fi
- name: QQBOT ## qq 机器人发送通知消息
script: |
echo ${ANDORID_OUTPUT_GIT_COMMIT_LOG}
已经实现commit 版本对比,成功输入 Everything up-to-date
但是执行 exit
后 还是会继续下面的 step
要如何停止呢
在线急等
from docs.
Everything up-to-date
/bin/bash:行19: [[]]: 未找到命令
我目前在 这里写上一个 错误的命令,然后让整个过程出错!
issues 我先开着
from docs.
@sdaduanbilei 可以看文档 有 condition 条件比较
from docs.
Related Issues (20)
- agent 需要什么特别配置吗? HOT 3
- 按照sample跑却无法登陆
- 基于docker启动后默认的用户名密码直接在文档上写明可否?
- mac安装的文档什么时候才有呢?
- 安装后无法登陆 HOT 2
- 你们能完善下文档吗 HOT 1
- gitlab 使用 web hook 触发显示非法请求 怎么处理?
- 数据库修改 ,在哪里修改呢
- English version HOT 1
- 不支持web前端项目构建? HOT 1
- k8s文档内容为空 HOT 1
- 项目构筑一直是准备中为什么啊 HOT 1
- 你好,我在云平台启动项目的时候报了一个错导致core模块无法启动,具体报错如下 HOT 3
- 无限重连8080端口 HOT 9
- [Help wanted] Configuration as code HOT 1
- 银河麒麟V10系统卡在loading界面
- 是否不适用于mac m1系统? HOT 3
- 使用k8s-agent, 可以连接成功,也可以创建pod. 但是容器日志报错,导致流水线一直卡着不动,报错日志如下 HOT 1
- 基于docker构建项目会出现 python3: command not found错误 HOT 1
- Helm Charts and Server in K8s HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.