加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Anolis7-4.19-nightly-x86_64.jenkinsfile 2.18 KB
一键复制 编辑 原始数据 按行查看 历史
ylsong 提交于 2022-02-18 10:34 . update git-url of ck-build
def createVersion() {
return new Date().format('yyyyMMddHHmmss') + "_${env.BUILD_ID}"
}
pipeline {
agent {
node {
label "${worknode}"
}
}
environment {
_version = createVersion()
token = credentials('ylsongtoken')
}
triggers {
cron 'H 21 * * *'
}
stages {
stage('sync code') {
parallel {
stage('builder') {
steps {
sh '''
rm -rf create_job
mkdir create_job
cp create_job.py create_job
'''
git branch: 'an7-4.19', credentialsId: 'sshkey', url: 'git@gitee.com:src-anolis-sig/ck-build.git'
}
}
stage('kernel') {
steps {
dir('cloud-kernel') {
git branch: 'devel-4.19', credentialsId: 'sshkey', url: 'git@gitee.com:anolis/cloud-kernel.git'
}
}
}
}
}
stage('build') {
steps {
sh '''
rm -rf rpmbuild
sh build.sh
'''
}
}
stage('copy rpm') {
steps {
sh '''
rpmpath=${RPMpathpart}/${_version}
cp -r rpmbuild/RPMS/x86_64 ${rpmpath}
'''
}
}
stage('create job') {
steps {
sh '''
rpmpath=${RPMpathpart}/${_version}
nginxpath=${nginxpathpart}/${_version}
job_name_func=${template_func}-${_version}
rpms=$(ls ${rpmpath})
python create_job/create_job.py --username ${Tone_username} --token ${token} --workspace ${Tone_workspace} \
--template ${template_func} --rpms "${rpms}" --name ${job_name_func} --project ${Tone_project} \
--version '4.19' --webpath "${Tone_host}${nginxpath}/"
'''
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化