about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-01-22T11·06+0300
committerclbot <clbot@tvl.fyi>2022-01-22T11·29+0000
commita4aabaff687cf0e4a6d0fe1851823a51b407f316 (patch)
treeed216d5f6f1d6d1ffba2ea5c1c8f7795d350472f
parent4b9bd8afd7a2a3eab1a6a459a5ee08b2264f96b8 (diff)
refactor(ops/pipelines): Move :git: step up in the pipeline r/3655
This step is independent of the build result and can be scheduled at
the beginning while pipeline eval is still in progress.

Change-Id: I2ee268e4c333efa654dcb12c0b1562b43231d241
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5044
Tested-by: BuildkiteCI
Autosubmit: tazjin <tazjin@tvl.su>
Reviewed-by: ezemtsov <eugene.zemtsov@gmail.com>
-rw-r--r--ops/pipelines/static-pipeline.yaml29
1 files changed, 15 insertions, 14 deletions
diff --git a/ops/pipelines/static-pipeline.yaml b/ops/pipelines/static-pipeline.yaml
index b0170e9a017a..d1b42854cfce 100644
--- a/ops/pipelines/static-pipeline.yaml
+++ b/ops/pipelines/static-pipeline.yaml
@@ -15,6 +15,21 @@ steps:
     build:
       message: "Verification triggered by ${BUILDKITE_COMMIT}"
 
+  # Create a revision number for the current commit for builds on
+  # canon.
+  #
+  # This writes data back to Gerrit using the Buildkite agent
+  # credentials injected through a git credentials helper.
+  #
+  # Revision numbers are defined as the number of commits in the
+  # lineage of HEAD, following only the first parent of merges.
+  - label: ":git:"
+    if: "build.branch == 'refs/heads/canon'"
+    command: |
+      git -c 'credential.helper=gerrit-creds' \
+        push origin "HEAD:refs/r/$(git rev-list --count --first-parent HEAD)"
+
+  # Generate & upload dynamic build steps
   - label: ":llama:"
     key: "pipeline-gen"
     command: |
@@ -97,17 +112,3 @@ steps:
     depends_on:
       - step: ":duck:"
         allow_failure: false
-
-  # Create a revision number for the current commit for builds on
-  # canon.
-  #
-  # This writes data back to Gerrit using the Buildkite agent
-  # credentials injected through a git credentials helper.
-  #
-  # Revision numbers are defined as the number of commits in the
-  # lineage of HEAD, following only the first parent of merges.
-  - label: ":git:"
-    if: "build.branch == 'refs/heads/canon'"
-    command: |
-      git -c 'credential.helper=gerrit-creds' \
-        push origin "HEAD:refs/r/$(git rev-list --count --first-parent HEAD)"