安装lftools
$ sudo apt install python3-pip
$ sudo python3 -m pip install -U pip
$ sudo python3 -m pip install -U setuptools
$ sudo -H pip3 install --ignore-installed PyYAML
$ sudo pip3 install lftools
配置
$ vim ~/.netrc
machine nexus.akraino.org
login <LF ID>
password <Password>
上传CD log
$ vim push_logs.sh
# Deploying logs to LF Nexus log server ##
# BUILD_NUMBER and JOB_NAME should be set by Jenkins
NEXUS_URL=https://nexus.akraino.org
SILO=myais
JENKINS_HOSTNAME=https://52.83.xx.xxx/
JOB_NAME=smartcities
BUILD_NUMBER=8
BUILD_URL="${JENKINS_HOSTNAME}/job/${JOB_NAME}/${BUILD_NUMBER}/"
NEXUS_PATH="${SILO}/job/${JOB_NAME}/${BUILD_NUMBER}"
lftools deploy logs $NEXUS_URL $NEXUS_PATH $BUILD_URL
echo "Logs uploaded to $NEXUS_URL/content/sites/logs/$NEXUS_PATH"
上传BluVal Results
$ zip -r results.zip ./results
NEXUS_PATH="/pcei/job/v2"
NEXUS_URL="https://nexus.akraino.org/"
lftools deploy nexus-zip $NEXUS_URL logs $NEXUS_PATH results.zip