Skip to content

pre/post compile hooks #89

Open
Open

Description

@pixeleet

As a Developer using the Deis platfrom I'd like to have pre/post compile hooks available for dockerfile based builds too, so I can execute checks that my services required for tests are alive and execute tests after an image has been made. Thus making my flow more CI/CD enabled.

Activity

  1. mboersma commented on Sep 13, 2016

    @mboersma
    Member

    This general idea works well for buildpack-based apps (now that deis/slugbuilder#104 landed).

    It would be useful to have a similar pre-/post-compile hook mechanism for Dockerfile apps, as well as for deis pull deploys. We should put some thought into how to implement that in a consistent way--suggestions welcome!

  2. robholland commented on Oct 14, 2016

    @robholland
    Contributor

    This probably belongs on deis/controller then?

  3. pixeleet commented on Oct 14, 2016

    @pixeleet
    Author

    So controller would setup the service you depend on for testing? Would it work with shell scripts? Would it be a DSL like some ci systems use? How do you imagine it working @robholland?

  4. bacongobbler commented on Oct 14, 2016

    @bacongobbler
    Member

    I still think it's fair to keep it here for the time being until someone writes out a design document/PR for the proposed feature.

  5. robholland commented on Oct 14, 2016

    @robholland
    Contributor

    Simplest functionality would be to specify commands that are run inside the container after build/pull. This would be useful for asset compilation for example, which needs to be run with the correct environment.

  6. robholland commented on Oct 18, 2016

    @robholland
    Contributor

    How about:

    $ deis hooks:post:list
    === app Post Hooks
    $ deis hooks:post:add 'bundle exec rake assets:precompile'
    === app Post Hooks
    bundle exec rake assets:precompile
    $ deis hooks:post:remove 'bundle exec rake assets:precompile'
    === app Post Hooks
    

    The registered commands are run inside the docker container after build and before deployment to k8s.

  7. bacongobbler commented on Oct 18, 2016

    @bacongobbler
    Member

    I'm concerned about the added time to run the one-off command in the same API call as when we build the app. We're already seeing a large number of issues come in that's usually ELB-related with the builder timing out.

    If you're willing to take a crack at a PR as well as some end-to-end tests, I don't see an issue with the proposal as long as it works.

  8. added this to the v2.13 milestone on Mar 1, 2017
  9. bacongobbler commented on Mar 22, 2017

    @bacongobbler
    Member

    Does anyone have the time to work on this or shall we remove from the milestone since the cut-off for v2.13 is April 3rd?

  10. mboersma commented on Mar 22, 2017

    @mboersma
    Member

    It seems unlikely we can tackle this in time for v2.13. I'll kick it into the future.

  11. modified the milestones: v2.14, v2.13 on Mar 22, 2017
  12. modified the milestones: v2.15, v2.14 on Apr 27, 2017
  13. modified the milestones: v2.16, v2.15 on May 24, 2017
  14. removed this from the v2.16 milestone on Jul 3, 2017
  15. Cryptophobia commented on Mar 13, 2018

    @Cryptophobia

    This issue was moved to teamhephy/dockerbuilder#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions