Zeng's Page


  • 首页

  • 标签

  • 归档

  • 相册

  • 搜索

Git命令备忘

Posted on 2019-01-01 | In Git

创建远程仓库

init, remote

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 以github为例,先在github上新建远程仓库git_repo

# 创建本地仓库
mkdir git_repo
cd git_repo
git init

# github上创建的新仓库是默认的远程版本库名称是origin,默认分支master
# 添加远程版本库设置
# git remote add origin https://github.com/<github_user>/git_repo.git
git remote add origin git@github.com:<github_user>/git_repo.git

# 查看远程版本库设置
git remote -v

# 删除远程版本库设置(origin用户)
git remote remove origin

# 也可尝试直接编辑.git里的相应文件来修改设置
Read more »

Jenkins API 使用示例——shell篇(2/2)

Posted on 2018-12-30 | In CICD

环境:Jenkins V2.150.1

获取所有job名称

命令:

1
2
3
4
5
# 获取crumb
crumb=$(curl -u "$jenkins_user:$jenkins_password" $jenkins_url/crumbIssuer/api/xml?xpath=concat\(//crumbRequestField,%22:%22,//crumb\))

# 获取job列表
curl -sX GET "$jenkins_url/api/json?pretty=true" -H "$crumb" -u "$jenkins_user:$jenkins_password" |grep '"url"' |grep '/job/' |sed -e 's@^.*job/\(.*\)/.*$@\1@'
Read more »

Jenkins API 使用示例——shell篇(1/2)

Posted on 2018-12-30 | In CICD

环境:Jenkins V2.150.1

检测Job是否存在

命令:

1
curl -X POST [-H "Content-Type:application/xml"] "$jenkins_url/checkJobName?value=$job_name" --user "$jenkins_user:$jenkins_password"

其中,jenkins_password一般是使用jenkins_user的Jenkins API token,直接用密码也可以。

Read more »

搭建Apache HTTP服务

Posted on 2018-12-29 | In 其它

系统:CentOS 7.2

更新EPEL源

🔗 What is Extra Packages for Enterprise Linux (or EPEL)?

Extra Packages for Enterprise Linux (or EPEL) is a Fedora Special Interest Group that creates, maintains, and manages a high quality set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL).

EPEL(Extra Packages for Enterprise Linux)是由 Fedora 社区打造,为 RHEL 及衍生发行版如 CentOS等提供高质量软件包的项目。

Read more »
1…2021
Lz. Zeng

Lz. Zeng

Continuous Self-Improvement

104 发布
18 分类
28 标签
© 2022 Lz. Zeng
NexT.Pisces
 |         Words: 97.2k
0%