flapjack / omnibus-flapjack

Flapjack packages for all! Build the packages, and update the repositories.
http://flapjack.io
23 stars 14 forks source link

Packages builds failing after publish with "Unknown component: " #98

Closed jessereynolds closed 9 years ago

jessereynolds commented 9 years ago

It looks like the post publish testing is failing as the component is resolving to an empty string:

00:36 Failed build of Flapjack v1.6.0rc1 for ubuntu trusty package (experimental) in 26m 20s, log: http://is.gd/4HJ0UG

upload: aptly/public/v1/pool/main/index.html to s3://packages.flapjack.io/aptly/public/v1/pool/main/index.html
Completed 112 of 112 part(s) with 1 file(s) remaining
upload: aptly/public/v1/pool/experimental/f/flapjack/flapjack_1.6.0~rc1~20150513143953~v1.6.0rc1~trusty-1_amd64.deb to s3://packages.flapjack.io/aptly/public/v1/pool/experimental/f/flapjack/flapjack_1.6.0~rc1~20150513143953~v1.6.0rc1~trusty-1_amd64.deb
Removing package upload lockfile
delete: s3://packages.flapjack.io/flapjack_upload_deb.lock
Publishing completed, duration was 12s
Removing flapjack_1.6.0~rc1~20150513143953~v1.6.0rc1~trusty-1_amd64.deb from packages.flapjack.io/tmp
rake aborted!
Unknown component: 
/home/ubuntu/omnibus-flapjack/Rakefile:473:in `block in <top (required)>'
Tasks: TOP => build_and_publish => post_publish_test
(See full trace by running task with --trace)
delete: s3://packages.flapjack.io/tmp/flapjack_1.6.0~rc1~20150513143953~v1.6.0rc1~trusty-1_amd64.deb
distro:          ubuntu
distro_release:  trusty
major_version:   v1
package_version: 1.6.0~rc1~20150513143953~v1.6.0rc1~trusty
file_suffix:     deb
major_delim:     _
minor_delim:     ~

I, [2015-05-13T15:06:12.915974 #20377]  INFO -- : Failed build of v1.6.0rc1 on ubuntu trusty at 2015-05-13T15:06:12Z, duration: 26m 20s
jessereynolds commented 9 years ago

Yep, so the build_and_publish rake task is expecting the FLAPJACK_COMPONENT environment variable to be set. We should be using the package class to determine the component.

https://github.com/flapjack/omnibus-flapjack/blob/489858f52c9ecfb5b92361b75241ffdd94906cf6/Rakefile#L457

jessereynolds commented 9 years ago

I worked around this for now by seeing the FLAPJACK_COMPONENT environment variable in the calling script. It's not clear to me how best to handle this within the rake task when calling :build_and_publish but that would be idea.