Code Monkey home page Code Monkey logo

Comments (5)

happz avatar happz commented on July 28, 2024

+1. We discovered the need to split prepare step into several stages in the real world, the specification should support us in doing so. In our internal workflow, we had to introduce pre-artifact-installation and post-artifact-installation steps, "wrapping" the actual installation of the artifact, all three part of the prepare step. Users should be able to specify whether they want to install a package/enable repository/run playbook/etc. before the installation of the artifact, or after, or even signal they don't care at all when this action would take the place, e.g. by not specifying any such requirement.

from tmt.

pvalena avatar pvalena commented on July 28, 2024

Shouldn't all of this be handled by prepare?

In general I agree, prepare should have some sub-items / sub-steps. But doesn't it have already? Because the 'how' comes as a list of instructions, so it should be possible to use it as a ordered list, having an some specific entry as an artifact install? (If not present, it would run last.)

Please see d46317b from #30.

from tmt.

psss avatar psss commented on July 28, 2024

I believe the use case could/should be covered by the order attribute which has been introduced during conversion into dynamic plugins. Each steps can have serveral configs and each of them can have a dedicated order. This allows users to select when/where exactly the config should happen.

Usage: tmt run prepare [OPTIONS]

  Prepare the environment for testing

  Use the 'order' attribute to select in which order preparation should
  happen if there are multiple configs. Default order is 50. Default order
  of required packages installation is 70.

  Supported methods (shell by default):

  ansible .............. Prepare guest using ansible
  install .............. Install packages on the guest
  shell ................ Prepare guest using shell scripts

  Use 'tmt run prepare --help --how <method>' to learn more about given
  prepare method and all its supported options.

from tmt.

lukaszachy avatar lukaszachy commented on July 28, 2024

As far as I know order attribute is working correctly in prepare step.
Please reopen if you need more functionality

from tmt.

psss avatar psss commented on July 28, 2024

I'm afraid the missing part is that testing farm would perform the artifact installation under a specific prepare order. I imagine this could work something like this:

tmt run --all provision ... prepare --how install --directory /path/to/rpms --insert --order=AGREED_ORDER

Users then would be able to specify prepare steps configuration for both before and after the artifact installation. But this means that tmt would have to be taught how to (properly) do the artifact installation.

from tmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.