Primitive Namespace¶
The Pipeline Primitive Namespace is an Autowired Variable called jte
that's accessible everywhere.
It can be used to access all the loaded Pipeline Primitives for a given Pipeline Run.
Accessing Libraries and Steps¶
If libraries were loaded, the jte
variable will have a libraries
property that stores the library's steps.
Invoking a Step Using The Primitive Namespace
libraries{
npm // contributes a build() step
}
jte.libraries.npm.build()
Accessing Keywords¶
If Keywords were defined, the jte
variable will have a keywords
property that stores the Keywords.
Accessing Keywords
keywords{
foo = "bar"
}
assert jte.keywords.foo == "bar"
Accessing Application Environments¶
If Application Environments were defined, the jte
variable will have an application_environments
property that stores the Application Environments.
Accessing Application Environments
application_environments{
dev{
ip = "1.1.1.1"
}
prod{
ip = "2.2.2.2"
}
}
assert jte.application_environments.dev.ip == "1.1.1.1"
assert jte.application_environments.prod.ip == "2.2.2.2"
Accessing Stages¶
If Stages were defined, the jte
variable will have an stages
property that stores the Stages.
Accessing Application Environments
libraries{
npm // contributes unit_test, build
}
stages{
continuous_integration{
unit_test
build
}
}
jte.stages.continuous_integration()