coding持续集成之自动发布

Python014

coding持续集成之自动发布,第1张

服务器环境-centos7.2

使用技术如下:

CODING 的持续集成本质上就是每次实例化一台 CVM,再把 Jenkins 安装进去,和我们在普通的云服务器上部署是一样的。

CODING 持续集成会为每个构建任务分配一台 VM 作为构建资源,您可以通过内置的 agent label 来使用不同的环境进行构建。目前支持的构建环境有三种:

默认环境中提供的 SDK 以及对应的版本如下(更新日期:2019 年 11 月 30 日):

android-sdk: 26.1.1

build-essential

java: 1.8.0_191

python: 2.7.12

python3: 3.5.2

python3.7: 3.7.3

nodejs: 10.15.3

php: 7.3.5

ruby: 2.6.0

go: 1.12.4

dotnet-core: 2.2

erlang: Erlang/OTP 21

elixir: 1.8.1

默认环境中提供的命令行工具以及对应的版本如下(更新日期:2019 年 11 月 30 日):

cmake: 3.5.1

maven: 3.6.1

gradle: 4.10.3

nvm: 0.34.0

yarn: 1.15.2

composer: 1.8.5

bundler: 1.17.2

rvm: 1.29.7

docker: 18.09.1

docker-compose: 1.23.1

kubectl: 1.14

rancher: 2.2.0

helm: 2.13.1

coscmd: 1.8.5.36

tccli: 3.0.67.1

svn: 1.9.3

mercurial: 3.7.3

git: 2.7.4

git-lfs: 2.7.2

jq: 1.5-1-a5b5cbe

pigz: 2.3.1

sshpass: 1.05

vsftpd: 3.0.3

通过上图可以设置根据不同的触发规则来自动构建项目达到自动发布的目的。

前提:DevKit已经安装好了,按照Ruby-China上的WIKI已经配置了CPATH和LIBRARY_PATH了。

错误代码如下:

C:\Users\Administrator>gem install rmagick -- --with-opt-dir=D:\Dev\openssl-1.0.

0k-x86-windows

Temporarily enhancing PATH to include DevKit...

Building native extensions with: '--with-opt-dir=D:\Dev\openssl-1.0.0k-x86-windo

ws'

This could take a while...

ERROR: Error installing rmagick:

ERROR: Failed to build gem native extension.

D:/Dev/Ruby200/bin/ruby.exe extconf.rb --with-opt-dir=D:\Dev\openssl-1.0.0k-

x86-windows

checking for Ruby version >= 1.8.5... yes

checking for stdint.h... *** extconf.rb failed ***

Could not create Makefile due to some reason, probably lack of necessary

libraries and/or headers. Check the mkmf.log file for more details. You may

need configuration options.

Provided configuration options:

--with-opt-dir

--with-opt-include

--without-opt-include=${opt-dir}/include

--with-opt-lib

--without-opt-lib=${opt-dir}/lib

--with-make-prog

--without-make-prog

--srcdir=.

--curdir

--ruby=D:/Dev/Ruby200/bin/ruby

D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to ge

nerate an executable file. (RuntimeError)

You have to install development tools first.

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:565:in `try_cpp'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:1038:in `block in have_header

'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:889:in `block in checking_for

'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block (2 levels) in p

ostpone'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:340:in `block in postpone'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:310:in `open'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:336:in `postpone'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:888:in `checking_for'

from D:/Dev/Ruby200/lib/ruby/2.0.0/mkmf.rb:1037:in `have_header'

from extconf.rb:37:in `configure_headers'

from extconf.rb:17:in `initialize'

from extconf.rb:474:in `new'

from extconf.rb:474:in `<main>'

Gem files will remain installed in D:/Dev/Ruby200/lib/ruby/gems/2.0.0/gems/rmagi

ck-2.15.0 for inspection.

Results logged to D:/Dev/Ruby200/lib/ruby/gems/2.0.0/gems/rmagick-2.15.0/ext/RMa

gick/gem_make.out