// Declarative // pipeline { agent any stages { stage('Example') { steps {  ① echo 'Hello World' } } } } // Script // ① The  steps  section must contain one or more steps. The  environment  directive specifies a sequence of key-value pairs which will be defined as environment variables for the all steps, or stage-specific steps, depending on where the  environment directive is located within the Pipeline. This directive supports a special helper method  credentials()  which can be used to access pre- defined Credentials by their identifier in the Jenkins environment. For Credentials which are of type "Secret Text", the  credentials()  method will ensure that the environment variable specified contains the Secret Text contents. For Credentials which are of type "Standard username and password", the environment variable specified will be set to  username:password  and two additional environment variables will be automatically be defined:  MYVARNAME_USR  and  MYVARNAME_PSW respective. Directives environment Example Require d No Parame ters None Allowed Inside the  pipeline  block, or within  stage  directives. 88