repo系列学习之repo的使用
简介谷歌对android的源代码管理使用的是git。但是在git的基础上,谷歌开发出来了一套新的工具,python写的一套脚本,名字是repo。
Android源代码工程(AOSP)是非常多的git仓库组成的。目前估计有上百个独立的git仓库。怎么管理这些仓库呢?使用一个清单文件(maniest.xml)来管理每个仓库。这个xml也需要个仓库存放来管理,就是manifest.git 仓库。那怎么来下载一套aosp的代码呢?就是使用repo工具,通过manifest.xml 来下载所有的仓库,所有的代码。
到目前为止,我们提到了三种类型的Git仓库,分别是Repo仓库、Manifest仓库和AOSP子项目仓库。Repo仓库通过Manifest仓库可以获得所有AOSP子项目仓库的元信息。有了这些元信息之后,我们就可以通过Repo仓库里面的Python脚本来操作AOSP的子项目。repo是个工具仓库,这个工具仓库中有个一个文件,名字是repo。这个是一个引导脚本。我们一般会使用这个引导脚本来把整个repo仓库下载下来,整个仓库有了才会有整个功能。一个单一的repo文件里面代码有限的,功能有限 ...
Jenkins学习之DataBoundConstructor和DataBoundSetter
Jenkins DataBoundConstructor DataBoundSetter@DataBoundConstructor 这个注解的作用是用于参数注入(反射),jenkins将界面上获取的值,传递给这个构造函数。这样插件就能获取到在界面上配置的值了。
探讨 DataBoundConstructor DataBoundSetter 对流水线中的使用方法的影响第一种情况构造方法 有参数的,加上 注解的,每个 set 方法上也加上 注解的, config.jelly 文件没有配置 域的。
123456@DataBoundConstructorpublic ReadIniStep(String file, String section, String option)@DataBoundSetter 加到setter 方法上
然后流水线 可以这么来用, 可以看到 加上括号,和 不加 括号 都可以的。
12def value = readIni file:"./env.cfg", section:"build", option:& ...
Docker学习之安装docker-swarm集群
docker swarm 集群搭建实验环境采用 1个 master ,3个 work节点,4台机器组成的一个集群环境。
安装4台服务器的系统学习的时候最好采用vm虚拟机,安装好一个初始化的可用的带docker的系统,然后打一个快照。后续的学习系统都可以从这里克隆出来,非常快的。
安装docker环境可以参考官方文档。
或者参考我这个文档 https://magesfc.github.io/mage/64aa5aff5028b66fde1c4d99fabd89113f42a31a/
初始化 docker swarm master 节点1234567891011121314151617181920212223242526# docker swarm init --help Usage: docker swarm init [OPTIONS]Initialize a swarmOptions: --advertise-addr string Advertised address (format: "<ip|interface&g ...
Jenkins学习之master服务器安装使用docker安装
jenkins学习之master服务器安装先安装dockerDownloading and running Jenkins in Docker使用这个:https://hub.docker.com/r/jenkins/jenkins/ 镜像
这里 https://www.jenkins.io/download/ 官方的下载地址,上面可以选择不同的系统的,不同的安装方式的。
12345678910docker run -it --name jenkins -p 8080:8080 -p 50000:50000 -v /home/jenkins:/var/jenkins_home jenkins/jenkins:latestdocker run -d --hostname jenkins-master --name jenkins \-p 8080:8080 -p 50000:50000 \-e TZ=Asia/Shanghai \-v /home/jenkins:/var/jenkins_home \-v /usr/share/zoneinfo/Asia/Shanghai:/et ...
Linux学习之常用的多线程压缩技术
pigz命令 – 多线程的解压缩文件pigz命令来自于英文词组”parallel implementation of gzip“的缩写,其功能是用于多线程的解压缩文件。与其他解压缩命令不同的是pigz命令支持多线程的并行处理方式,同比gzip能快60%以上,当然CPU的消耗也会更高。如果想快速的压缩、解压文件,那么就一定要选它~!
使用 pigz 来提速压缩1234 tar -cf - "${in}" | pigz -p "$(nproc)" > "${out}" ...
Linux学习之bash学习之在bash中Quoting的解释
bash中的quoting的解释命令行上字符分 literal 和 meta应该很清楚当你在 shell prompt(命令行提示符) 后面敲打键盘、直到按下 Enter 的时候,你输入的文字就是 command line 了,然后 shell 才会以进程的方式执行你所交给它的命令。但是,你又可知道:你在 command line 输入的每一个文字,对 shell 来说,是有类别之分的呢?
简单而言(我不敢说这是精确的定议,注一), command line 的每一个 charactor ,分为如下两种:
literal :也就是普通纯文字,对 shell 来说没特殊功能。
meta :对 shell 來说,具有特定功能的特殊保留字元,也叫元字符。(其他地方我们听到过元数据,metadata类似概念,就是描述数据的数据,就是一种比较特殊的数据。)
两个常见的meta IFS 和 CR我們在 command line 中碰到两个几乎每次都会碰到的 meta :
12IFS:由 <space> 或 <tab> 或 <enter> 三者之一組成(我們 ...
Linux学习之bash学习之在bash中=和=~的区别
怎么理解 bash [[]] 判断中的 = 和 =~ 这2个判断呢??123456789查看 man bash 对 [[ 命令的 =~ 操作符说明如下:An additional binary operator, =~, is available, with the same precedence as == and !=.When it is used, the string to the right of the operator is considered an extended regular expression and matched accordingly.The return value is 0 if the string matches the pattern, and 1 otherwise.If the regular expression is syntactically incorrect, the conditional expression's return value is 2.Any part of the pat ...
Linux学习之bash学习之几个特殊变量
Special Parameters官方原文The shell treats several parameters specially.These parameters may only be referenced; assignment to them is not allowed.
$* 和 $@123* Expands to the positional parameters, starting from one. When the expansion is not within double quotes, each positional parameter expands to a separate word. In contexts where it is performed, those words are subject to further word splitting and pathname expansion. When the expansion occurs within double quotes, it expands t ...
Linux学习之常用的github仓库
bat 命令 替代 cat 命令的1https://github.com/sharkdp/bat
lsd 命令 替代 ls 命令的https://github.com/Peltoche/lsd
lsd 命令 替代 ls 命令的https://github.com/ogham/exa
https://github.com/dandavison/delta
https://github.com/bootandy/dust
https://github.com/muesli/duf
https://github.com/Canop/broothttps://github.com/dalance/procshttps://github.com/sharkdp/fdhttps://github.com/orf/gpinghttps://github.com/BurntSushi/ripgrephttps://github.com/sharkdp/hyperfinehttps://github.com/ggreer/the_silver_searcherhttps://github.com/a ...
Linux学习之文件系统zfs性能优化
How to Improve ZFS performance
https://icesquare.com/wordpress/how-to-improve-zfs-performance/
In this tutorial, I will show you how to improve the performance of your ZFS using the affordable consumer-grade hardware (e.g., Gigabit network card, standard SATA non-SSD hard drives, consumer-grade motherboard etc.).
Many people found a problem on their ZFS system. The speed is slow! It is slow to read or write files to the system. In this article, I am going to show you some tips on improving the s ...
Linux学习之常用的博客网站
http://vim.101hacks.com/
https://linux.101hacks.com/toc/
https://www.theunixschool.com/
https://catonmat.net/top-ten-one-liners-from-commandlinefu-explained
https://catonmat.net/the-next-ten-one-liners-from-commandlinefu-explained
https://catonmat.net/another-ten-one-liners-from-commandlinefu-explained
https://catonmat.net/yet-another-ten-one-liners-from-commandlinefu-explained
https://www.thegeekstuff.com/sed-awk-101-hacks-ebook/
https://mywiki.wooledge.org/BashFAQ
http://bash.cumulonim.biz/Bas ...
Linux学习之文件系统btrfs文件系统
Btrfs 简介一、btrfs文件系统简介btrfs通常解释为b-tree filesystem、better filesystem等,目标是用来解决 ext3文件系统的一些缺陷,例如单一文件系统的限制、总文件系统的限制。btrfs加入了一些核心特性:
核心特性: 1、可由底层多个物理卷进行支持 2、数据存储形式支持RAID,同时在联机的情况下进行“添加硬盘”、“移除硬盘”、“修改文件系统的大小” 3、支持写时复制更新机制,即当我们修改文件时,btrfs先复制一份原文件,对新文件进行修改,结束时,原文件名指向新文件。 4、快照,支持卷的快照和快照的快照 5、透明压缩,即当文件系统存储文件时,文件系统会自动将文件进行压缩再存储,当提取时,文件系统自动进行解压缩,但是用户看不到此过程。 6、子卷和校验码
安装1$ sudo apt update
123$ sudo apt install btrfs-progs -y # 20.04 18.04
创建btrfs文件系统123456789$ sudo mkfs.btrfs -L data /dev/s ...