Answers: <p>No, Jenkins file is not created at execution. 
  Actually Jenkins file is a suite of all steps or activity which you want to build as a job or a groovy code.</p>
  
  <p>Jenkins file come from code repository, if you added file in your project.</p>
  
  <p><strong>Below is a Jenkins file example:</strong></p>
  
  <pre><code>pipeline {
      agent any
  
      stages {
          stage('Build') {
              steps {
                  echo 'Building..'
              }
          }
          stage('Test') {
              steps {
                  echo 'Testing..'
              }
          }
          stage('Deploy') {
              steps {
                  echo 'Deploying....'
              }
          }
      }
  }
  </code></pre>
  
  <p>for more reference watch this video: <a href="https://www.youtube.com/watch?v=KZY4Rwsewro" rel="nofollow noreferrer">https://www.youtube.com/watch?v=KZY4Rwsewro</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2019-02-07T10:01:59.190Z
Answers: 2019-02-07T10:08:35.847Z
Answers: 2019-02-07T10:08:35.847Z
Answers: Subhash
Body: <p>On creation of a new job(as free style project), and running it, I see that <code>Jenkinsfile</code> is generated in job's  workspace, <strong>after</strong> running the job.</p>
  
  <p>But I see that all the pipeline code is commented. This is declarative syntax pipeline code.</p>
  
  <p>So,  apart from scriptlet generator option, </p>
  
  <p>1) Does Jenkins(by default) create Jenkinsfile with DSL syntax in its workspace? For its job...</p>
  
  <p>2)
  If yes, Can Jenkins generate scripted pipeline in it's workspace? Groovy syntax...</p>
  
Tags: <jenkins-pipeline><jenkins-plugins><groovy><job-dsl>
Title: Does Jenkins job create Jenkinsfile? On execution
UserDisplayName: overexchange
ThreadText: # Does Jenkins job create Jenkinsfile? On execution
  
  (Asked by: username_0 on 2019-02-06)
  
  On creation of a new job(as free style project), and running it, I see that `Jenkinsfile` is generated in job's workspace, **after** running the job.
  
  But I see that all the pipeline code is commented. This is declarative syntax pipeline code.
  
  So, apart from scriptlet generator option,
  
  1) Does Jenkins(by default) create Jenkinsfile with DSL syntax in its workspace? For its job...
  
  2)
  If yes, Can Jenkins generate scripted pipeline in it's workspace? Groovy syntax...
  
  **Tags:** jenkins-pipeline, jenkins-plugins, groovy, job-dsl
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-02-07. Score: 1
  
  No, Jenkins file is not created at execution.
  Actually Jenkins file is a suite of all steps or activity which you want to build as a job or a groovy code.
  
  Jenkins file come from code repository, if you added file in your project.
  
  **Below is a Jenkins file example:**
  
  ```
  pipeline {
      agent any
  
      stages {
          stage('Build') {
              steps {
                  echo 'Building..'
              }
          }
          stage('Test') {
              steps {
                  echo 'Testing..'
              }
          }
          stage('Deploy') {
              steps {
                  echo 'Deploying....'
              }
          }
      }
  }
  
  ```
  
  for more reference watch this video: <https://www.youtube.com/watch?v=KZY4Rwsewro>
  
  
  ---
  
  