2018-09-19 18:57:15 +02:00
|
|
|
# Copyright Project Harbor Authors
|
2018-01-23 06:04:19 +01:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License
|
|
|
|
|
|
|
|
*** Settings ***
|
|
|
|
Documentation This resource provides any keywords related to the Harbor private registry appliance
|
|
|
|
Resource Util.robot
|
|
|
|
|
|
|
|
*** Variables ***
|
|
|
|
${SSH_USER} root
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
|
|
Nightly Test Setup
|
2018-07-19 11:02:09 +02:00
|
|
|
[Arguments] ${ip} ${HARBOR_PASSWORD} ${ip1}==${EMPTY}
|
|
|
|
Run Keyword If '${ip1}' != '${EMPTY}' CA setup ${ip1} ${HARBOR_PASSWORD} /ca/ca1.crt
|
|
|
|
Run Keyword If '${ip1}' != '${EMPTY}' Run rm -rf ./harbor_ca.crt
|
|
|
|
Run Keyword CA setup ${ip} ${HARBOR_PASSWORD}
|
2018-01-23 06:04:19 +01:00
|
|
|
Run Keyword Start Docker Daemon Locally
|
2021-03-09 04:54:57 +01:00
|
|
|
Run Keyword If '${DOCKER_USER}' != '${EMPTY}' Docker Login "" ${DOCKER_USER} ${DOCKER_PWD}
|
2018-01-23 06:04:19 +01:00
|
|
|
|
|
|
|
CA Setup
|
2018-07-19 11:02:09 +02:00
|
|
|
[Arguments] ${ip} ${HARBOR_PASSWORD} ${cert}=/ca/ca.crt
|
|
|
|
Run mv ${cert} harbor_ca.crt
|
|
|
|
Generate Certificate Authority For Chrome ${HARBOR_PASSWORD}
|
2019-05-22 05:19:08 +02:00
|
|
|
Prepare Docker Cert ${ip}
|
2021-03-09 04:54:57 +01:00
|
|
|
Enable Notary Client
|
2018-01-23 06:04:19 +01:00
|
|
|
|
|
|
|
Collect Nightly Logs
|
2018-02-28 12:37:25 +01:00
|
|
|
[Arguments] ${ip} ${SSH_PWD} ${ip1}==${EMPTY}
|
|
|
|
Run Keyword Collect Logs ${ip} ${SSH_PWD}
|
|
|
|
Run Keyword If '${ip1}' != '${EMPTY}' Collect Logs ${ip1} ${SSH_PWD}
|
|
|
|
|
|
|
|
Collect Logs
|
2018-01-23 06:04:19 +01:00
|
|
|
[Arguments] ${ip} ${SSH_PWD}
|
|
|
|
Open Connection ${ip}
|
|
|
|
Login ${SSH_USER} ${SSH_PWD}
|
|
|
|
SSHLibrary.Get File /var/log/harbor/ui.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/registry.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/proxy.log
|
2019-05-22 05:19:08 +02:00
|
|
|
SSHLibrary.Get File /var/log/harbor/adminserver.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/clair.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/jobservice.log
|
2018-05-02 13:58:24 +02:00
|
|
|
SSHLibrary.Get File /var/log/harbor/postgresql.log
|
2018-01-23 06:04:19 +01:00
|
|
|
SSHLibrary.Get File /var/log/harbor/notary-server.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/notary-signer.log
|
2019-05-22 05:19:08 +02:00
|
|
|
SSHLibrary.Get File /var/log/harbor/chartmuseum.log
|
|
|
|
SSHLibrary.Get File /var/log/harbor/registryctl.log
|
2018-02-28 12:37:25 +01:00
|
|
|
Run rename 's/^/${ip}/' *.log
|
2018-01-23 06:04:19 +01:00
|
|
|
Close All Connections
|