virtualenv $WORKSPACE/venv_dlrnapi
source $WORKSPACE/venv_dlrnapi/bin/activate

pip install dlrnapi_client shyaml

curl -sLo $BUILD_TAG.yaml $(echo $DELOREAN_URL | sed 's/delorean\.repo/commit.yaml/')

commit_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.commit_hash)
distro_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.distro_hash)

dlrnapi report-result \
    --url https://$DELOREAN_HOST/api-$RDO_VERSION \
    --username ciuser \
    --job-id $JOB_NAME \
    --commit-hash $commit_hash \
    --distro-hash $distro_hash \
    --timestamp $(date +%s) \
    --info-url https://ci.centos.org/artifacts/rdo/$BUILD_TAG/console.txt.gz \
    --success $JOB_SUCCESS

virtualenv $WORKSPACE/venv_dlrnapi
source $WORKSPACE/venv_dlrnapi/bin/activate

pip install dlrnapi_client shyaml

curl -sLo $BUILD_TAG.yaml $(echo $DELOREAN_URL | sed 's/delorean\.repo/commit.yaml/')

commit_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.commit_hash)
distro_hash=$(cat $BUILD_TAG.yaml| shyaml get-value commits.0.distro_hash)

dlrnapi --url https://$DELOREAN_HOST/api-$RDO_VERSION \
    --username ciuser \
    report-result \
    --job-id $JOB_NAME \
    --commit-hash $commit_hash \
    --distro-hash $distro_hash \
    --timestamp $(date +%s) \
    --info-url https://ci.centos.org/artifacts/rdo/$BUILD_TAG/console.txt.gz \
    --success $JOB_SUCCESS

Fix dlrnapi reporting script for tripleo
Fix dlrnapi reporting script for tripleo

The order of the arguments were not correct which makes the reporting
fail. This fixes the script.

Change-Id: I24fa339d161a29e13b4dd9106f2c7ce245652952
