vmware-archive / pcf-pipelines

PCF Pipelines
Apache License 2.0
158 stars 282 forks source link

create-offline-pinned-pipelines broken because of missing pivnet artifact "pcf-automation" #289

Closed punkadiddle closed 6 years ago

punkadiddle commented 6 years ago

Issue

create-offline-pinned-pipelines/pipeline.yml references a pivnet artifact called "pcf-automation", supposedly containing a release of this git, which does not exist.

Context

The task pcf-pipelines-tarball fails to download pcf-automation and thus fails the create-offline-pinned-pipelines pipeline. Latest version (73f782e49b13eb681820374e3166d52c4167f3c4).

Expected result

All downloads should run smoothly.

Current result

task pcf-pipelines-tarball defect

Steps to Reproduce

Run create-offline-pinned-pipelines

Possible Fix

Tried to yaml_patch using the following snippet to download from github instead. However, further testing showed it's not equivalent; removed logs related to the evalution to not clutter the issue.

- op: replace
  path: /resources/name=pcf-pipelines-tarball
  value:
    name: pcf-pipelines-tarball
    type: github-release
    source:
      # https://api.github.com/repos/pivotal-cf/pcf-pipelines/releases
      owner: pivotal-cf
      repository: pcf-pipelines
      release: true
      pre_release: true

Logs and Screenshots

Running with original pipeline trying to download from pivnet, pcf-pipelines-tarball CHECK says:

resource script '/opt/resource/check []' failed: exit status 1

stderr:
2018/02/17 12:06:38 Exiting with error: could not find product with 'id' or 'slug'=pcf-automation
cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

abbyachau commented 6 years ago

Hi @punkadiddle thanks - is this issue related to #290, if so, can we close this issue in favour of #290? pcf-automation is the slug name for the pcf-pipelines tool on Pivotal Network - which you may not have access to.

punkadiddle commented 6 years ago

I don't see any relation to #290 since #290 does not build on the pcf-automation artifact (jobs run parallel) and can easily be fixed.

If the package has limited access, I would not have access to it on the account used. If so, it would be the only package with limited access on the pipeline, which should be documented as a precondition.

abbyachau commented 6 years ago

Hi @punkadiddle can you speak to whether this issue still persists - or was it related to the legacy token issue? Thanks.

punkadiddle commented 6 years ago

Seeing that the documentation now tells to not use the pipelines from gitlab but pivnet I'm closing this issue. Thank you.

akamalov commented 6 years ago

@abbyachau @punkadiddle I am having exact same issues. I tried both with legacy and new token to no avail. Using Pivnet release. Getting error:

resource script '/opt/resource/check []' failed: exit status 1

stderr:
2018/07/02 13:00:28 Exiting with error: could not find product with 'id' or 'slug'=pcf-automation

Login with old, legacy token and check the product:

$: ~> pivnet login --api-token='NCgXXXXXXXXXXXXX'
Warning: The use of static Pivnet API tokens is deprecated and will be removed. Please see https://network.pivotal.io/docs/api#how-to-authenticate for details on the new UAA API Token mechanism.
Logged-in successfully
$: ~> pivnet releases -p p-healthwatch
+--------+---------+--------------------------------+--------------------------+
|   ID   | VERSION |          DESCRIPTION           |        UPDATED AT        |
+--------+---------+--------------------------------+--------------------------+
| 106732 | 1.2.2   | PCF Healthwatch 1.2.2. Please  | 2018-06-19T20:08:55.315Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  96596 | 1.2.1   | PCF Healthwatch 1.2.1. Please  | 2018-06-19T20:08:34.955Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  87932 | 1.2.0   | PCF Healthwatch 1.2.0. Please  | 2018-06-19T20:08:14.012Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
| 100148 | 1.1.8   | PCF Healthwatch 1.1.8. Please  | 2018-05-15T15:13:14.181Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  89771 | 1.1.7   | PCF Healthwatch 1.1.7. Please  | 2018-04-26T23:04:35.637Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  68106 | 1.1.6   | PCF Healthwatch 1.1.6. Please  | 2018-03-20T23:13:02.701Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  65211 | 1.1.5   | PCF Healthwatch 1.1.5. Please  | 2018-03-19T16:09:22.771Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  44827 | 1.1.4   | PCF Healthwatch 1.1.4. Please  | 2018-02-08T20:38:04.175Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  28580 | 1.1.3   | PCF Healthwatch 1.1.3. Please  | 2018-04-26T23:04:35.616Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  16420 | 1.1.1   | PCF Healthwatch 1.1.1. Please  | 2018-04-26T23:04:35.603Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
+--------+---------+--------------------------------+--------------------------+
$: ~> pivnet releases -p pcf-automation
Pivnet error: could not find product with 'id' or 'slug'=pcf-automation
$: ~>

Logging in with new-style token and check the product:

$: ~> pivnet login --api-token='bf7XXXXXXXXXXXXXXXXXXXXX-r'
Logged-in successfully
$: ~> pivnet releases -p p-healthwatch
+--------+---------+--------------------------------+--------------------------+
|   ID   | VERSION |          DESCRIPTION           |        UPDATED AT        |
+--------+---------+--------------------------------+--------------------------+
| 106732 | 1.2.2   | PCF Healthwatch 1.2.2. Please  | 2018-06-19T20:08:55.315Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  96596 | 1.2.1   | PCF Healthwatch 1.2.1. Please  | 2018-06-19T20:08:34.955Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  87932 | 1.2.0   | PCF Healthwatch 1.2.0. Please  | 2018-06-19T20:08:14.012Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
| 100148 | 1.1.8   | PCF Healthwatch 1.1.8. Please  | 2018-05-15T15:13:14.181Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  89771 | 1.1.7   | PCF Healthwatch 1.1.7. Please  | 2018-04-26T23:04:35.637Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  68106 | 1.1.6   | PCF Healthwatch 1.1.6. Please  | 2018-03-20T23:13:02.701Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  65211 | 1.1.5   | PCF Healthwatch 1.1.5. Please  | 2018-03-19T16:09:22.771Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  44827 | 1.1.4   | PCF Healthwatch 1.1.4. Please  | 2018-02-08T20:38:04.175Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  28580 | 1.1.3   | PCF Healthwatch 1.1.3. Please  | 2018-04-26T23:04:35.616Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
|  16420 | 1.1.1   | PCF Healthwatch 1.1.1. Please  | 2018-04-26T23:04:35.603Z |
|        |         | see release notes for more     |                          |
|        |         | information.                   |                          |
+--------+---------+--------------------------------+--------------------------+
$: ~> pivnet releases -p pcf-automation
Pivnet error: could not find product with 'id' or 'slug'=pcf-automation
$: ~>