Procházet zdrojové kódy

[monorepo] document jenkins pipelines (#27954)

* [saas-e2e] reset database when db-migration files were removed

* [monorepo] document jenkins pipelines

* [monorepo] trim docs for jenkins pipelines

GitOrigin-RevId: 783ad94f05b36f4057e3ac6cc8b8c40f850e5d2f
Jakob Ackermann před 1 rokem
rodič
revize
2c9ce619dd
2 změnil soubory, kde provedl 18 přidání a 0 odebrání
  1. 9 0
      server-ce/test/Jenkinsfile
  2. 9 0
      services/web/Jenkinsfile

+ 9 - 0
server-ce/test/Jenkinsfile

@@ -1,3 +1,7 @@
+// Initialize variables to signal that a given stage finished.
+// We use them to build a graph of interconnected steps/dependencies.
+// - Incoming edges use "waitUntil" and reference the given variables of dependencies.
+// - Outgoing edges set the given variable to true.
 def job_copybara_done = false
 def job_copybara_done = false
 def job_npm_install_done = false
 def job_npm_install_done = false
 def job_prefetch_custom_done = false
 def job_prefetch_custom_done = false
@@ -8,13 +12,17 @@ def job_server_pro_build_done = false
 pipeline {
 pipeline {
   agent {
   agent {
     node {
     node {
+      // Select a VM with the given tabel.
       label 'jenkins-agent-web'
       label 'jenkins-agent-web'
+      // Use the monorepo checkout in /workspace.
       customWorkspace '/workspace'
       customWorkspace '/workspace'
     }
     }
   }
   }
 
 
   options {
   options {
+    // Print timestamp next to each log line.
     timestamps()
     timestamps()
+    // Abort build after hitting first failure.
     parallelsAlwaysFailFast()
     parallelsAlwaysFailFast()
     timeout(time: 15, unit: 'MINUTES')
     timeout(time: 15, unit: 'MINUTES')
   }
   }
@@ -220,6 +228,7 @@ pipeline {
     }
     }
   }
   }
   post {
   post {
+    // Ensure tear down of test containers, remove CE docker images, then run general Jenkins VM cleanup.
     cleanup {
     cleanup {
       dir('server-ce/test') {
       dir('server-ce/test') {
         sh 'make clean'
         sh 'make clean'

+ 9 - 0
services/web/Jenkinsfile

@@ -1,3 +1,7 @@
+// Initialize variables to signal that a given stage finished.
+// We use them to build a graph of interconnected steps/dependencies.
+// - Incoming edges use "waitUntil" and reference the given variables of dependencies.
+// - Outgoing edges set the given variable to true.
 def action_test_frontend_ct_build = false
 def action_test_frontend_ct_build = false
 def action_build_deps = false
 def action_build_deps = false
 def action_copy_external_pages = false
 def action_copy_external_pages = false
@@ -11,13 +15,17 @@ def action_build_production= false
 pipeline {
 pipeline {
   agent {
   agent {
     node {
     node {
+      // Select a VM with the given tabel.
       label 'jenkins-agent-web'
       label 'jenkins-agent-web'
+      // Use the monorepo checkout in /workspace.
       customWorkspace '/workspace'
       customWorkspace '/workspace'
     }
     }
   }
   }
 
 
   options {
   options {
+    // Print timestamp next to each log line.
     timestamps()
     timestamps()
+    // Abort build after hitting first failure.
     parallelsAlwaysFailFast()
     parallelsAlwaysFailFast()
     timeout(time: 15, unit: 'MINUTES')
     timeout(time: 15, unit: 'MINUTES')
   }
   }
@@ -447,6 +455,7 @@ pipeline {
     }
     }
   }
   }
   post {
   post {
+    // Ensure tear down of test containers, then run general Jenkins VM cleanup.
     cleanup {
     cleanup {
       dir('services/web') {
       dir('services/web') {
         sh 'make clean'
         sh 'make clean'