Module: Satorix::Custom
- Extended by:
- Custom
- Included in:
- Custom
- Defined in:
- lib/rails/generators/templates/custom_ci_job/satorix/custom.rb
Instance Method Summary collapse
-
#available_jobs ⇒ Object
Define the custom jobs to be added to the application’s Ci pipeline.
Instance Method Details
#available_jobs ⇒ Object
Define the custom jobs to be added to the application’s Ci pipeline.
The first tier describes the stage. Default stages are build, test, and deploy. If desired, you can define your own custom stages in your gitlab-ci.yml file. For more information about GitLab stages, please refer to docs.gitlab.com/ce/ci/yaml/#stages
The second tier describes the jobs available within each tier, and the class they map to. The key should be the actual job name to be used in the gitlab-ci.yml file. The value should be a Ruby class or module with a go() method.
Example:
The available_jobs method below defines three new jobs - one for the deploy stage and
two for the test stage. The deploy job is named 'mock_deploy'.
The test jobs are named 'bare_bones_example' and 'info'.
In this example, the Satorix::CI::Test::Info#go method
will be called by an entry in gitlab-ci.yml that looks like:
display_info:
stage: test
<<: *satorix
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rails/generators/templates/custom_ci_job/satorix/custom.rb', line 36 def available_jobs { deploy: { mock_deploy: Satorix::CI::Deploy::MockDeploy }, test: { bare_bones_example: Satorix::CI::Test::BareBones, display_info: Satorix::CI::Test::Info } } end |