On Wed, Aug 25, 2021 at 04:55:29PM +0800, Lu Weitao wrote:
[Why] compass-ci/container/srv-http may change the communication protocol: http => https it's depends on whether there are ssl certificates on the server we need convert all 'http://compass-ci.api.openeuler.org.*' to 'https://compass-ci.api.openeuler.org.*'
[How] scope: gg http.*SRV_HTTP
lib/mail_bisect_result.rb:44: prefix_srv_result = "http://#%7BSRV_HTTP_DOMAIN%7D:#%7BSRV_HTTP_RESULT_PORT%7D" lib/mail_bisect_result.rb:45: prefix_srv_git = "http://#%7BSRV_HTTP_DOMAIN%7D:#%7BSRV_HTTP_GIT_PORT%7D" sbin/download-rootfs:38: wget_download "http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_OS_PORT%7D/os/$%7Bos%7D/$%7..." sbin/download-rootfs:48: wget_download "http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT%7D/initrd/osima..." sbin/download-rootfs:49: wget_download "http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT%7D/initrd/deps/..." sparrow/0-package/os/openEuler:53: wget_rpm http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/initr... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l... sparrow/0-package/os/openEuler:54: wget_rpm http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/initr... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
Signed-off-by: Lu Weitao luweitaobe@163.com
lib/constants.rb | 3 +++ lib/mail_bisect_result.rb | 4 ++-- sbin/download-rootfs | 6 +++--- sparrow/0-package/os/openEuler | 4 ++-- sparrow/local/compare-results.md | 2 +- 5 files changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/constants.rb b/lib/constants.rb index d85ca5c3..38e1ec92 100644 --- a/lib/constants.rb +++ b/lib/constants.rb @@ -70,6 +70,9 @@ SRV_HTTP_GIT_PORT ||= config['SRV_HTTP_GIT_PORT'] || ENV['SRV_HTTP_GIT_PORT'] ||
SRV_HTTP_DOMAIN ||= config['SRV_HTTP_DOMAIN'] || ENV['SRV_HTTP_DOMAIN'] || 'api.compass-ci.openeuler.org'
+SRV_HTTP_PROTOCOL ||=
- File.exist?('/etc/ssl/certs/web-backend.key') && File.exist?('/etc/ssl/certs/web-backend.crt') ? 'https' : 'http'
ASSISTANT_HOST ||= config['ASSISTANT_HOST'] || ENV['ASSISTANT_HOST'] || '172.17.0.1' ASSISTANT_PORT ||= config['ASSISTANT_PORT'] || ENV['ASSISTANT_PORT'] || 8101
diff --git a/lib/mail_bisect_result.rb b/lib/mail_bisect_result.rb index 855fcdc9..cff3137b 100644 --- a/lib/mail_bisect_result.rb +++ b/lib/mail_bisect_result.rb @@ -41,8 +41,8 @@ class MailBisectResult
def compose_mail subject = "[Compass-CI][#{@repo.split('/')[1]}] #{@commit_id[0..9]} #{@bisect_error[0].split("\n")[0]}"
- prefix_srv_result = "http://#%7BSRV_HTTP_DOMAIN%7D:#%7BSRV_HTTP_RESULT_PORT%7D"
- prefix_srv_git = "http://#%7BSRV_HTTP_DOMAIN%7D:#%7BSRV_HTTP_GIT_PORT%7D"
- prefix_srv_result = "#{SRV_HTTP_PROTOCOL}://#{SRV_HTTP_DOMAIN}:#{SRV_HTTP_RESULT_PORT}"
- prefix_srv_git = "#{SRV_HTTP_PROTOCOL}://#{SRV_HTTP_DOMAIN}:#{SRV_HTTP_GIT_PORT}" pkgbuild_repo_url = "we build project with this script:\n#{prefix_srv_git}/git/#{@pkgbuild_repo}/PKGBUILD\n" first_bad_commit_job_url = "first bad commit result :\n#{prefix_srv_result}#{@first_bad_commit_result_root}/build-pkg\n"
diff --git a/sbin/download-rootfs b/sbin/download-rootfs index 0d0d1c7b..9f1d0070 100755 --- a/sbin/download-rootfs +++ b/sbin/download-rootfs @@ -35,7 +35,7 @@ wget_download() download_os_rootfs() { cd $rootfs_dir && {
wget_download "http://api.compass-ci.openeuler.org:${SRV_HTTP_OS_PORT}/os/${os}/${os_arch}/${os_version}.cgz"
wget_download "https://api.compass-ci.openeuler.org:${SRV_HTTP_OS_PORT}/os/${os}/${os_arch}/${os_version}.cgz"
gzip -dc ${os_version}.cgz | cpio -id rm -rf ${os_version}.cgz
@@ -45,8 +45,8 @@ download_os_rootfs() download_osimage() { cd $osimage_dir && {
wget_download "http://api.compass-ci.openeuler.org:${SRV_HTTP_INITRD_PORT}/initrd/osimage/${os}/${os_arch}/${os_version}/current"
wget_download "http://api.compass-ci.openeuler.org:${SRV_HTTP_INITRD_PORT}/initrd/deps/nfs/debian/aarch64/sid/run-ipconfig.cgz"
wget_download "https://api.compass-ci.openeuler.org:${SRV_HTTP_INITRD_PORT}/initrd/osimage/${os}/${os_arch}/${os_version}/current"
wget_download "https://api.compass-ci.openeuler.org:${SRV_HTTP_INITRD_PORT}/initrd/deps/nfs/debian/aarch64/sid/run-ipconfig.cgz"
^-----^-----^-------^--- need to change ${os_mount}/${os}/${os_version} ? Thanks, Liushaofei
} }
diff --git a/sparrow/0-package/os/openEuler b/sparrow/0-package/os/openEuler index 1c61e2c0..399e5e47 100755 --- a/sparrow/0-package/os/openEuler +++ b/sparrow/0-package/os/openEuler @@ -50,8 +50,8 @@ public_network_ok && {
# lib64lockfile1 from http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l... # lockfile-progs from http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
- wget_rpm http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/initr... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
- wget_rpm http://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/initr... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
wget_rpm https://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/init... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
wget_rpm https://api.compass-ci.openeuler.org:$%7BSRV_HTTP_INITRD_PORT:-20008%7D/init... || wget_rpm http://abf-downloads.openmandriva.org/rock/repository/$(arch)/main/release/l...
rpm -i --force lib64lockfile1-1.16-1-omv4002.$(arch).rpm lockfile-progs-0.1.18-5-omv4002.$(arch).rpm rm -rf *.rpm
diff --git a/sparrow/local/compare-results.md b/sparrow/local/compare-results.md index e555f32e..d82b0165 100644 --- a/sparrow/local/compare-results.md +++ b/sparrow/local/compare-results.md @@ -6,7 +6,7 @@ submit -m cci-depends.yaml cci-depends.benchmark=iperf
-2. 编辑os-matrix-dc.yaml,指定使用centos:7和 [openEuler:20.03-pre](http://api.compass-ci.openeuler.org:20008/initrd/dockerimage/openeuler-pre.tar)(由于dockerhub没有openeuler20.03的镜像,可以下载该链接并使用docker load -i openeuler-pre.tar加载到本地),如需要使用其他os,参考如下文件格式修改即可。 +2. 编辑os-matrix-dc.yaml,指定使用centos:7和 [openEuler:20.03-pre](https://api.compass-ci.openeuler.org:20008/initrd/dockerimage/openeuler-pre.tar)(由于dockerhub没有openeuler20.03的镜像,可以下载该链接并使用docker load -i openeuler-pre.tar加载到本地),如需要使用其他os,参考如下文件格式修改即可。
cat > /c/lkp-tests/jobs/os-matrix-dc.yaml << EOF os_arch: aarch64 -- 2.23.0