Artifacts download script no longer works

Hello,

I had written a shell script that downloaded all the artifacts of the last successful build of a particular build type. This script is now broken with the latest changes made to artifact URLs. It seems that I can no longer get to the artifacts page to get a list of the available artifacts using "lastSuccessful" as the build id.

This is pertinent part of the script:
bt_num=$1
artifacts_dir=$2
build-machine="build.machine.us"
last_successful_url="http://${build-machine}:8111/viewLog.html?tab=buildResultsDiv&buildTypeId=bt$&buildId=lastSuccessful&guest=1" artifact_url_prefix="http://${build-machine}:8111/viewArtifacts.html/buildTypeId/bt$/buildId/lastSuccessful"
artifacts_url="http://${build-machine}:8111/viewLog.html?buildId=lastSuccessful&buildTypeId=bt$&tab=artifacts&guest=1"

artifacts_list=`wget -q -O- "$" | grep viewArtifacts | cut -d"'" -f2 | cut -d"/" -f6 | grep -v "\.log" | sed 's/^[ \t]//;s/[ \t]$//'` artifacts=`wget -q -O- "$" | grep viewArtifacts | cut -d"'" -f2 | cut -d"/" -f6 | grep -v "\.log" | sed -n 'H;${g;s/\n/ /g;p}' | sed 's/^[ \t]//;s/[ \t]$//'`

echo -e "Artifacts to be retrieved are:\n$"

echo -e "\nGetting requested artifacts:"
for artifact in $
do
echo -e "Getting: $" wget $ "$/$" -O "$/$"
done


I know that I can change to these variables once the artifacts_url problem is solved:
artifacts_list=`wget -q -O- "$" | grep download | awk -F"<span" '{print $1}'| sed -e :a -e 's/<[>]*>//g;/</N;//ba' | grep -v "\.log" | sed -n 'H;${g;s/\n/ /g;p}' | sed 's/[ \t]//;s/[ \t]$//'` artifacts=`wget -q -O- "$" | grep download | awk -F"<span" '{print $1}' | sed -e :a -e 's/<[>]*>//g;/</N;//ba' | grep -v "\.log" | sed 's/[ \t]//;s/[ \t]$//'`

Is there a way of getting to the artifacts page of the last successful build of a certain build type as a guest user with the current Agra build?

Thanks,
-Dave

5 comments
Comment actions Permalink

Hello Dave,

Looks like this functionality is now broken... I mean links to download
artifacts by lastSuccessful/lastFinished should work, but because of a bug
you can't access artifacts tab using lastSuccessful / lastFinished buildId.
We will fix this in the next EAP. Unfortunately I can't suggest any
workarounds for this EAP.

--
Pavel Sher

"Dave Leskovac" <no_reply@jetbrains.com> wrote in message
news:11669015.1172597477138.JavaMail.itn@is.intellij.net...

Hello,

>

I had written a shell script that downloaded all the artifacts of the last
successful build of a particular build type. This script is now broken
with the latest changes made to artifact URLs. It seems that I can no
longer get to the artifacts page to get a list of the available artifacts
using "lastSuccessful" as the build id.

>

This is pertinent part of the script:
bt_num=$1
artifacts_dir=$2
build-machine="build.machine.us"
last_successful_url="http://${build-machine}:8111/viewLog.html?tab=buildResultsDiv&buildTypeId=bt$&buildId=lastSuccessful&guest=1" > artifact_url_prefix="http://${build-machine}:8111/viewArtifacts.html/buildTypeId/bt$/buildId/lastSuccessful"
artifacts_url="http://${build-machine}:8111/viewLog.html?buildId=lastSuccessful&buildTypeId=bt$&tab=artifacts&guest=1"

>

artifacts_list=`wget -q -O- "$" | grep viewArtifacts | > cut -d"'" -f2 | cut -d"/" -f6 | grep -v "\.log" | sed 's/^[ \t]*//;s/[ > \t]*$//'` > artifacts=`wget -q -O- "$" | grep viewArtifacts |
cut -d"'" -f2 | cut -d"/" -f6 | grep -v "\.log" | sed -n 'H;${g;s/\n/
/g;p}' | sed 's/^[ \t]//;s/[ \t]$//'`

>

echo -e "Artifacts to be retrieved are:\n$"

>

echo -e "\nGetting requested artifacts:"
for artifact in $
do
echo -e "Getting: $" > wget $ "$/$" -O
"$/$"
done

>
>

I know that I can change to these variables once the artifacts_url problem
is solved:
artifacts_list=`wget -q -O- "$" | grep download | > awk -F"<span" '{print $1}'| sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | > grep -v "\.log" | sed -n 'H;${g;s/\n/ /g;p}' | sed 's/^[ \t]*//;s/[ > \t]*$//'` > artifacts=`wget -q -O- "$" | grep download | awk -F"<span"
'{print $1}' | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' | grep -v "\.log" |
sed 's/^[ \t]//;s/[ \t]$//'`

>

Is there a way of getting to the artifacts page of the last successful
build of a certain build type as a guest user with the current Agra build?

>

Thanks,
-Dave



0
Comment actions Permalink

Pavel,

Looks like this functionality is now broken...
We will fix this in the next EAP. Unfortunately I
can't suggest any workarounds for this EAP.


Has a bug been filed in JIRA for this issue or should I issue one?

Thanks,
-Dave

0
Comment actions Permalink

Hello Dave,

The bug is already fixed. Please wait for next EAP.

--
Pavel Sher

"Dave Leskovac" <no_reply@jetbrains.com> wrote in message
news:753239.1172612431207.JavaMail.itn@is.intellij.net...

Pavel,

>
>> Looks like this functionality is now broken...
>> We will fix this in the next EAP. Unfortunately I
>> can't suggest any workarounds for this EAP.
>

Has a bug been filed in JIRA for this issue or should I issue one?

>

Thanks,
-Dave



0
Comment actions Permalink

Hello Pavel,

The bug is already fixed. Please wait for next EAP.


This problem continues in the current Agra build (3811).

-Dave

0
Comment actions Permalink

Hello Pavel,

The bug is already fixed. Please wait for next EAP.


This problem continues in the current Agra build (3811).


Never mind. After reworking all the URLs, the script now works.

Thanks,
-Dave

0

Please sign in to leave a comment.