[pegleg] - Used the latest pegleg verion.

Updated the cli format to match the latest version of pegleg
OLD Pegleg CLI format:
    pegleg -v site -p /workspace/primary_repo -a /workspace/auxillary_repo1 -a /workspace/auxillary_repo2  collect -s /collect site_data

NEW Pegleg CLI format:
    pegleg -v site -r /workspace/primary_repo collect -s /collect site_data

Change-Id: I23cff261c206c29b3b02869f38fee5273dc53503
This commit is contained in:
Sirajudeen 2019-02-21 11:28:04 -07:00
parent 53e02f9a9c
commit 9e74248aee
2 changed files with 20 additions and 4 deletions

View File

@ -7,7 +7,7 @@ export BUILD_WORK_DIR=${BUILD_WORK_DIR:-/work}
export BASE_IMAGE_SIZE=${BASE_IMAGE_SIZE:-68719476736}
export BASE_IMAGE_URL=${BASE_IMAGE_URL:-https://cloud-images.ubuntu.com/releases/xenial/release/ubuntu-16.04-server-cloudimg-amd64-disk1.img}
export IMAGE_PROMENADE_CLI=${IMAGE_PROMENADE_CLI:-quay.io/airshipit/promenade:cfb8aa498c294c2adbc369ba5aaee19b49550d22}
export IMAGE_PEGLEG_CLI=${IMAGE_PEGLEG_CLI:-quay.io/airshipit/pegleg:ac6297eae6c51ab2f13a96978abaaa10cb46e3d6}
export IMAGE_PEGLEG_CLI=${IMAGE_PEGLEG_CLI:-quay.io/airshipit/pegleg:50ce7a02e08a0a5277c2fbda96ece6eb5782407a}
export IMAGE_SHIPYARD_CLI=${IMAGE_SHIPYARD_CLI:-quay.io/airshipit/shipyard:4dd6b484d11e86ad51da733841b9ef137421d461}
export IMAGE_COREDNS=${IMAGE_COREDNS:-docker.io/coredns/coredns:1.2.2}
export IMAGE_DRYDOCK_CLI=${IMAGE_DRYDOCK_CLI:-quay.io/airshipit/drydock:d93d6d5a0a370ced536180612d1ade708e29cd47}

View File

@ -23,11 +23,27 @@ chmod 777 "${DEFINITION_DEPOT}"
render_pegleg_cli() {
cli_string="pegleg -v site"
if [[ "${GERRIT_SSH_USER}" ]]
then
cli_string+=" -u ${GERRIT_SSH_USER}"
fi
if [[ "${GERRIT_SSH_KEY}" ]]
then
cli_string+=" -k /workspace/${GERRIT_SSH_KEY}"
fi
primary_repo=$(config_pegleg_primary_repo)
if [[ -d "${REPO_ROOT}/${primary_repo}" ]]
then
cli_string="${cli_string} -p /workspace/${primary_repo}"
# NOTE: to get latest pegleg colllect to work
# airship-in-bottle repo has versions (v1.0demo, v1.0dev) within global
# and that is preventing pegleg to collect documents.
# It complains with duplicate data
$(find ${REPO_ROOT}/${primary_repo} -name "v1.0dev" -type d \
-exec rm -r {} +)
cli_string="${cli_string} -r /workspace/${primary_repo}"
else
log "${primary_repo} not a valid primary repository"
return 1
@ -39,7 +55,7 @@ render_pegleg_cli() {
then
for r in ${aux_repos[*]}
do
cli_string="${cli_string} -a /workspace/${r}"
cli_string="${cli_string} -e ${r}=/workspace/${r}"
done
fi
@ -53,7 +69,7 @@ render_pegleg_cli() {
collect_design_docs() {
docker run \
--rm -t \
--network none \
--network host \
-v "${REPO_ROOT}":/workspace \
-v "${DEFINITION_DEPOT}":/collect \
"${IMAGE_PEGLEG_CLI}" \