k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/scenarios/README.md (about)

     1  # DEPRECATION NOTICE
     2  
     3  *October 9, 2018* `scenarios/*.py` will be moved to become part of kubetest v2, so we are
     4  not taking PRs except for urgent bug fixes.
     5  
     6  *January 25, 2023* Please read this [issue](https://github.com/kubernetes/test-infra/issues/20760) for how to migrate away
     7  from `bootstrap.py` entirely.
     8  
     9  Also please bump [bootstrap image](/images/bootstrap) and 
    10  [kubekins image](/images/kubekins-e2e) to take in any future changes.
    11  
    12  # Test scenarios
    13  
    14  Place scripts to run test scenarios inside this location.
    15  
    16  Test jobs are composed of two things:
    17  1) A scenario to test
    18  2) Configuration options for the scenario.
    19  
    20  Three example scenarios are:
    21  
    22  * Unit tests
    23  * Node e2e tests
    24  * e2e tests
    25  
    26  Example configurations are:
    27  
    28  * Parallel tests on gce
    29  * Build all platforms
    30  
    31  The assumption is that each scenario will be called a variety of times with
    32  different configuration options. For example at the time of this writing there
    33  are over 300 e2e jobs, each run with a slightly different set of options.
    34  
    35  ## Contract
    36  
    37  The scenario assumes the calling process (bootstrap.py) has setup all
    38  prerequisites, such as checking out the right repository, setting pwd,
    39  activating service accounts, etc.
    40  
    41  The scenario also assumes that the calling process will handle all post-job
    42  works, such as recording log output, copying logs to gcs, etc.
    43  
    44  The scenario should exit 0 if and only on success.
    45  
    46  The calling process can configure the scenario by calling the scenario
    47  with different arguments. For example: `kubernetes\_build.py --fast`
    48  configures the scenario to do a fast build (one platform) and/or
    49  `kubernetes\_build.py --federation=random-project` configures the scenario
    50  to do a federation build using the random-project.
    51  
    52  Call the scenario with `-h` to see configuration options.