Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Request: eval context to help DRY up jobs #90

Closed
iautom8things opened this issue Aug 8, 2017 · 9 comments
Closed

Request: eval context to help DRY up jobs #90

iautom8things opened this issue Aug 8, 2017 · 9 comments
Assignees

Comments

@iautom8things
Copy link
Contributor

Could you please evaluate the context parameter like here: https://github.com/cloudfoundry-community/slack-notification-resource/blob/c1686fb4b6ed41a4a28d6de497889e5fae7e2cfd/out#L99

This will help D.R.Y. up job definitions where there are several build contexts and statuses used.

@jtarchie jtarchie self-assigned this Aug 11, 2017
@jtarchie
Copy link
Owner

Are you able to try out the feature? Use the test docker image jtarchie/pr#test.

@iautom8things
Copy link
Contributor Author

I'll try this out today. Currently trying to figure out why my mbp is stuck in a reboot loop with security update 10.12.6 o.O

@iautom8things
Copy link
Contributor Author

I'm not sure what I'm doing wrong:

I changed:

resource_types:
  - name: pull-request
     type: docker-image
     source:
       repository: jtarchie/pr

to

resource_types:
  - name: pull-request
     type: docker-image
     source:
       repository: jtarchie/pr:test

This results in resource script '/opt/resource/in [/tmp/build/get]' failed: exit status 1

screen shot 2017-08-14 at 9 35 04 am

And if I force a re-trigger of the pipeline it fails after pulling the image:

Successfully pulled jtarchie/pr:test@sha256:9951a43f8972f69253677f4ab2cc563a79ddb9a34206c3c1cac36f1a18e1c4fa.

"docker inspect" requires at least 1 argument(s).
See 'docker inspect --help'.

screen shot 2017-08-14 at 9 37 13 am

I tried switching the repository to jtarchie/pr#test as you suggested with a similar check error message, and triggering the job manually gives this error:

Pulling jtarchie/pr#test@sha256:9951a43f8972f69253677f4ab2cc563a79ddb9a34206c3c1cac36f1a18e1c4fa...
invalid reference format

Pulling jtarchie/pr#test@sha256:9951a43f8972f69253677f4ab2cc563a79ddb9a34206c3c1cac36f1a18e1c4fa (attempt 2 of 3)...
invalid reference format

Pulling jtarchie/pr#test@sha256:9951a43f8972f69253677f4ab2cc563a79ddb9a34206c3c1cac36f1a18e1c4fa (attempt 3 of 3)...
invalid reference format


Failed to pull image jtarchie/pr#test@sha256:9951a43f8972f69253677f4ab2cc563a79ddb9a34206c3c1cac36f1a18e1c4fa.

screen shot 2017-08-14 at 9 39 40 am

@iautom8things
Copy link
Contributor Author

Is there a reason that the docker image has nearly tripled?

screen shot 2017-08-14 at 9 41 42 am

@jtarchie
Copy link
Owner

resource_types:
  - name: pull-request
     type: docker-image
     source:
       repository: jtarchie/pr
       tag: test

And the extra-size is because it has test dependencies, don't worry about that for the final image.

@iautom8things
Copy link
Contributor Author

Thanks, that worked! Sorry about that >_<

Yeah, this is the desired result!

@jtarchie
Copy link
Owner

Great! I'll release an official release tonight.

@jtarchie
Copy link
Owner

Done, pushed it to latest.

@iautom8things
Copy link
Contributor Author

iautom8things commented Aug 22, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants