You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@yetus.apache.org by "Allen Wittenauer (JIRA)" <ji...@apache.org> on 2019/04/15 15:53:00 UTC

[jira] [Comment Edited] (YETUS-811) Add an API for robots to do their own artifact URLs

    [ https://issues.apache.org/jira/browse/YETUS-811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815953#comment-16815953 ] 

Allen Wittenauer edited comment on YETUS-811 at 4/15/19 3:52 PM:
-----------------------------------------------------------------

If you 'prime the pump' by creating a fake artifact, you can get circle ci's by:

{code}
function circleci_get_artifacts_url
{
  apiurl="https://circleci.com/api/v1.1/project/github/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}/artifacts"

  if "${CURL}" --silent --fail \
          --output "${PATCH_DIR}/circleci.txt" \
          --location \
          "${apiurl}"; then
    baseurl=$("${GREP}" url | head -1 | cut -f2- -d:)
    baseurl=$(echo "${baseurl}" | "${SED}" -e 's,\ ,,g'  -e 's,\",,g' -e 's,^\(https://.*\.com/[0-9]*/\).*$,\1,g')
  fi
}
{code}


was (Author: aw):
If you 'prime the pump' by creating a fact artifact, you can get circle ci's by:

{code}
function circleci_get_artifacts_url
{
  apiurl="https://circleci.com/api/v1.1/project/github/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${CIRCLE_BUILD_NUM}/artifacts"

  if "${CURL}" --silent --fail \
          --output "${PATCH_DIR}/circleci.txt" \
          --location \
          "${apiurl}"; then
    baseurl=$("${GREP}" url | head -1 | cut -f2- -d:)
    baseurl=$(echo "${baseurl}" | "${SED}" -e 's,\ ,,g'  -e 's,\",,g' -e 's,^\(https://.*\.com/[0-9]*/\).*$,\1,g')
  fi
}
{code}

> Add an API for robots to do their own artifact URLs
> ---------------------------------------------------
>
>                 Key: YETUS-811
>                 URL: https://issues.apache.org/jira/browse/YETUS-811
>             Project: Yetus
>          Issue Type: Improvement
>          Components: Precommit
>            Reporter: Allen Wittenauer
>            Assignee: Allen Wittenauer
>            Priority: Major
>             Fix For: 0.10.0
>
>         Attachments: YETUS-811.00.patch, YETUS-811.01.patch
>
>
> In playing around with Azure Pipelines, it is does not use a URL that has a (foo)/(filename) structure which pretty much all of test-patch assumes.  test-patch should be modified to add an routine defined by robots for the report calculation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)