diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3eb4380123b8f9fc7d1460df42cc5fe3d6e6d32..4a46059ef7ca2333fe0596282c717d70d1c19b7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -56,6 +56,11 @@ workflow: variables: PIPELINE_TYPE: grafazos_release_tag_test when: always + - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG + =~ /^teztale-v\d+\.\d+$/ + variables: + PIPELINE_TYPE: teztale_release_tag_test + when: always - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ variables: PIPELINE_TYPE: octez_evm_node_release_tag @@ -63,14 +68,14 @@ workflow: - if: $CI_PROJECT_NAMESPACE == "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ variables: PIPELINE_TYPE: non_release_tag when: always - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ variables: PIPELINE_TYPE: non_release_tag_test when: always @@ -198,6 +203,11 @@ include: - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^grafazos-v\d+\.\d+$/ when: always +- local: .gitlab/ci/pipelines/teztale_release_tag_test.yml + rules: + - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG + =~ /^teztale-v\d+\.\d+$/ + when: always - local: .gitlab/ci/pipelines/octez_evm_node_release_tag.yml rules: - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG =~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ @@ -207,14 +217,14 @@ include: - if: $CI_PROJECT_NAMESPACE == "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ when: always - local: .gitlab/ci/pipelines/non_release_tag_test.yml rules: - if: $CI_PROJECT_NAMESPACE != "tezos" && $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_TAG != null && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+(?:\-rc\d+)?$/ && $CI_COMMIT_TAG !~ /^octez-v\d+\.\d+\-beta\d*$/ && $CI_COMMIT_TAG !~ /^octez-evm-node-v\d+\.\d+(?:\-rc\d+)?$/ - && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ + && $CI_COMMIT_TAG !~ /^grafazos-v\d+\.\d+$/ && $CI_COMMIT_TAG !~ /^teztale-v\d+\.\d+$/ when: always - local: .gitlab/ci/pipelines/schedule_extended_test.yml rules: diff --git a/.gitlab/ci/pipelines/octez_monitoring.yml b/.gitlab/ci/pipelines/octez_monitoring.yml index 4fc3dfd608af58796d2d9666e038ceb6cb9aa2d0..66e687b8d4cac729c0e360660d7fc660a2d41449 100644 --- a/.gitlab/ci/pipelines/octez_monitoring.yml +++ b/.gitlab/ci/pipelines/octez_monitoring.yml @@ -168,18 +168,32 @@ teztale.build:static-arm64: dependencies: - oc.docker:ci:arm64 timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push before_script: - . ./scripts/ci/datadog_send_job_info.sh - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh - eval $(opam env) + - . ./scripts/ci/sccache-start.sh script: - make teztale after_script: - mkdir -p ./teztale-binaries/arm64 - mv octez-teztale-* ./teztale-binaries/arm64/ + - ./scripts/ci/sccache-stop.sh variables: PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G artifacts: name: teztale-binaries expire_in: never @@ -195,18 +209,32 @@ teztale.build:static-x86_64: dependencies: - oc.docker:ci:amd64 timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push before_script: - . ./scripts/ci/datadog_send_job_info.sh - ./scripts/ci/take_ownership.sh - . ./scripts/version.sh - eval $(opam env) + - . ./scripts/ci/sccache-start.sh script: - make teztale after_script: - mkdir -p ./teztale-binaries/x86_64 - mv octez-teztale-* ./teztale-binaries/x86_64/ + - ./scripts/ci/sccache-stop.sh variables: PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G artifacts: name: teztale-binaries expire_in: never diff --git a/.gitlab/ci/pipelines/teztale_release_tag_test.yml b/.gitlab/ci/pipelines/teztale_release_tag_test.yml new file mode 100644 index 0000000000000000000000000000000000000000..463f8cea993b4dd0d8a96d188186355be9c5a49e --- /dev/null +++ b/.gitlab/ci/pipelines/teztale_release_tag_test.yml @@ -0,0 +1,134 @@ +# This file was automatically generated, do not edit. +# Edit file ci/bin/main.ml instead. + +stages: +- images +- build + +oc.docker:ci:amd64: + image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 + stage: images + tags: + - gcp + dependencies: [] + timeout: 90 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + script: + - ./images/ci_create_ci_images.sh + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_VERSION: 24.0.7 + CI_DOCKER_HUB: "false" + ARCH: amd64 + artifacts: + reports: + dotenv: ci_image_tag.env + +oc.docker:ci:arm64: + image: ${GCP_REGISTRY}/tezos/docker-images/ci-docker:v1.12.0 + stage: images + tags: + - gcp_arm64 + dependencies: [] + timeout: 90 minutes + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + script: + - ./images/ci_create_ci_images.sh + services: + - docker:${DOCKER_VERSION}-dind + variables: + DOCKER_VERSION: 24.0.7 + CI_DOCKER_HUB: "false" + ARCH: arm64 + artifacts: + reports: + dotenv: ci_image_tag.env + retry: + max: 1 + when: + - runner_system_failure + +teztale.build:static-x86_64: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp + dependencies: + - oc.docker:ci:amd64 + timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make teztale + after_script: + - mkdir -p ./teztale-binaries/x86_64 + - mv octez-teztale-* ./teztale-binaries/x86_64/ + - ./scripts/ci/sccache-stop.sh + variables: + PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + artifacts: + name: teztale-binaries + expire_in: never + paths: + - teztale-binaries/x86_64/octez-teztale-* + when: on_success + +teztale.build:static-arm64: + image: ${ci_image_name}/build:${ci_image_tag} + stage: build + tags: + - gcp_arm64 + dependencies: + - oc.docker:ci:arm64 + timeout: 60 minutes + cache: + - key: cargo-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/.cargo/registry/cache + policy: pull-push + - key: sccache-$CI_JOB_NAME_SLUG + paths: + - $CI_PROJECT_DIR/_sccache + policy: pull-push + before_script: + - . ./scripts/ci/datadog_send_job_info.sh + - ./scripts/ci/take_ownership.sh + - . ./scripts/version.sh + - eval $(opam env) + - . ./scripts/ci/sccache-start.sh + script: + - make teztale + after_script: + - mkdir -p ./teztale-binaries/arm64 + - mv octez-teztale-* ./teztale-binaries/arm64/ + - ./scripts/ci/sccache-stop.sh + variables: + PROFILE: static + CARGO_NET_OFFLINE: "false" + SCCACHE_DIR: $CI_PROJECT_DIR/_sccache + SCCACHE_CACHE_SIZE: 5G + artifacts: + name: teztale-binaries + expire_in: never + paths: + - teztale-binaries/arm64/octez-teztale-* + when: on_success diff --git a/ci/bin/code_verification.ml b/ci/bin/code_verification.ml index 445b06018dbab1041f3e138e45c4db42d93540ae..7e990fa97e0ada4a5f491745e0e788f844d58b69 100644 --- a/ci/bin/code_verification.ml +++ b/ci/bin/code_verification.ml @@ -846,11 +846,10 @@ let jobs pipeline_type = () in let job_build_teztale ~arch = - Teztale.job_build + Teztale.Common.job_build ~arch - ~rules:(make_rules ~manual:Yes ~changes:Teztale.changeset ()) + ~rules:(make_rules ~manual:Yes ~changes:Teztale.Common.changeset ()) () - |> enable_cargo_cache |> enable_sccache in [ job_build_arm64_release; diff --git a/ci/bin/common.ml b/ci/bin/common.ml index 41016f4e21378e1c25ebd03582085082a63daea2..fd0d783612915523ae33c33ae97ac70e7f2149fc 100644 --- a/ci/bin/common.ml +++ b/ci/bin/common.ml @@ -139,44 +139,6 @@ let enable_kernels = (* Common GitLab CI caches *) -(** Add variable enabling sccache. - - This function should be applied to jobs that build rust files and - which has a configured sccache Gitlab CI cache. - - - [key] and [path] configure the key under which the cache is - stored, and the path that will be cached. By default, the [key] - contains the name of the job, thus scoping the cache to all - instances of that job. By default, [path] is the folder - ["$CI_PROJECT_DIR/_sccache"], and this function also sets the - environment dir [SCCACHE_DIR] such that sccache stores its caches - there. - - - [cache_size] sets the environment variable [SCCACHE_CACHE_SIZE] - that configures the maximum size of the cache. - - - [error_log], [idle_timeout] and [log] sets the environment - variables [SCCACHE_ERROR_LOG], [SCCACHE_IDLE_TIMEOUT] and - [SCCACHE_LOG] respectively. See the sccache documentation for more - information on these variables. *) -let enable_sccache ?key ?error_log ?idle_timeout ?log - ?(path = "$CI_PROJECT_DIR/_sccache") ?(cache_size = "5G") job = - let key = - Option.value - ~default:("sccache-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) - key - in - job - |> append_variables - ([("SCCACHE_DIR", path); ("SCCACHE_CACHE_SIZE", cache_size)] - @ opt_var "SCCACHE_ERROR_LOG" Fun.id error_log - @ opt_var "SCCACHE_IDLE_TIMEOUT" Fun.id idle_timeout - @ opt_var "SCCACHE_LOG" Fun.id log) - |> append_cache (cache ~key [path]) - (* Starts sccache and sets [RUSTC_WRAPPER] *) - |> append_before_script [". ./scripts/ci/sccache-start.sh"] - |> append_after_script ["./scripts/ci/sccache-stop.sh"] - (** Enable caching of Cargo's target folder which stores files which can speed up subsequent compilation passes. @@ -200,28 +162,6 @@ let enable_cargo_target_caches ?key job = ] |> append_cache (cache ~key [cache_dir]) -(** Allow cargo to access the network by setting [CARGO_NET_OFFLINE=false]. - - This function should only be applied to jobs that have a GitLab CI - cache for [CARGO_HOME], as enabled through [enable_cache_cargo] (that - function calls this function, so there is no need to apply both). - Exceptions can be made for jobs that must have CARGO_HOME set to - something different than {!cargo_home}. *) -let enable_networked_cargo = append_variables [("CARGO_NET_OFFLINE", "false")] - -(** Adds a GitLab CI cache for the CARGO_HOME folder. - - More precisely, we only cache the non-SCM dependencies in the - sub-directory [registry/cache]. *) -let enable_cargo_cache job = - job - |> append_cache - (cache - ~key:("cargo-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) - [cargo_home // "registry/cache"]) - (* Allow Cargo to access the network *) - |> enable_networked_cargo - (** Add variable enabling dune cache. This function can be applied to jobs that run dune. diff --git a/ci/bin/main.ml b/ci/bin/main.ml index 20987e8183b2d84201c8d1002257d2c026a876a4..0f0f247d477c1b4bc3d77a5c3fe51f1766e53c26 100644 --- a/ci/bin/main.ml +++ b/ci/bin/main.ml @@ -148,6 +148,8 @@ let () = in (* Matches Grafazos release tags, e.g. [grafazos-v1.2]. *) let grafazos_release_tag_re = "/^grafazos-v\\d+\\.\\d+$/" in + (* Matches Teztale release tags, e.g. [teztale-v1.2]. *) + let teztale_release_tag_re = "/^teztale-v\\d+\\.\\d+$/" in let open Rules in let open Pipeline in (* Matches either Octez release tags or Octez beta release tags, @@ -162,7 +164,8 @@ let () = Predefined_vars.ci_commit_tag != null && (not has_any_octez_release_tag) && (not (has_tag_match octez_evm_node_release_tag_re)) - && not (has_tag_match grafazos_release_tag_re)) + && (not (has_tag_match grafazos_release_tag_re)) + && not (has_tag_match teztale_release_tag_re)) in let release_description = "\n\n\ @@ -238,6 +241,17 @@ let () = intended, without publishing any release. Developers or release \ managers can create this pipeline by pushing a tag to a fork of \ 'tezos/tezos', e.g. to the 'nomadic-labs/tezos' project." ; + (* TODO: We should be able to register this pipeline in [teztale/ci]. *) + register + "teztale_release_tag_test" + If.(not_on_tezos_namespace && push && has_tag_match teztale_release_tag_re) + ~jobs:(Teztale.Release.jobs ~test:true ()) + ~description: + "Test release pipeline for Teztale.\n\n\ + This pipeline checks that 'teztale_release_tag' pipelines work as \ + intended, without publishing any release. Developers or release \ + managers can create this pipeline by pushing a tag to a fork of \ + 'tezos/tezos', e.g. to the 'nomadic-labs/tezos' project." ; register "octez_evm_node_release_tag" If.(push && has_tag_match octez_evm_node_release_tag_re) diff --git a/ci/bin/release_tag.ml b/ci/bin/release_tag.ml index 2c0095a001f42119b948a51bc309cd57869255da..f8ae910908d9a864d149df206bef9d1b5905cdaa 100644 --- a/ci/bin/release_tag.ml +++ b/ci/bin/release_tag.ml @@ -53,8 +53,8 @@ let monitoring_child_pipeline = job_datadog_pipeline_trace; Grafazos_ci.Common.job_build_grafazos (); job_build_layer1_profiling ~expire_in:Never (); - Teztale.job_build ~expire_in:Never ~arch:Arm64 (); - Teztale.job_build ~expire_in:Never ~arch:Amd64 (); + Teztale.Common.job_build ~expire_in:Never ~arch:Arm64 (); + Teztale.Common.job_build ~expire_in:Never ~arch:Amd64 (); ] let job_release_page ~test ?dependencies () = diff --git a/ci/lib_tezos_ci/tezos_ci.ml b/ci/lib_tezos_ci/tezos_ci.ml index dc7c4b8010da9aaa64d584be5ef5145ef2762fc9..bde13545cc59db837154ac8c302428f298e411bd 100644 --- a/ci/lib_tezos_ci/tezos_ci.ml +++ b/ci/lib_tezos_ci/tezos_ci.ml @@ -1,7 +1,7 @@ (*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2023-2024 Nomadic Labs. *) +(* Copyright (c) 2023 Nomadic Labs. *) (* *) (*****************************************************************************) @@ -1440,6 +1440,45 @@ let job_docker_authenticated ?(skip_docker_initialization = false) ~name script +(** {2 Caches} *) + +let enable_sccache ?key ?error_log ?idle_timeout ?log + ?(path = "$CI_PROJECT_DIR/_sccache") ?(cache_size = "5G") job = + let key = + Option.value + ~default:("sccache-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) + key + in + job + |> append_variables + ([("SCCACHE_DIR", path); ("SCCACHE_CACHE_SIZE", cache_size)] + @ opt_var "SCCACHE_ERROR_LOG" Fun.id error_log + @ opt_var "SCCACHE_IDLE_TIMEOUT" Fun.id idle_timeout + @ opt_var "SCCACHE_LOG" Fun.id log) + |> append_cache (cache ~key [path]) + (* Starts sccache and sets [RUSTC_WRAPPER] *) + |> append_before_script [". ./scripts/ci/sccache-start.sh"] + |> append_after_script ["./scripts/ci/sccache-stop.sh"] + +let cargo_home = + (* Note: + - We want [CARGO_HOME] to be in a sub-folder of + {!ci_project_dir} to enable GitLab CI caching. + - We want [CARGO_HOME] to be hidden from dune + (thus the dot-prefix). *) + Gitlab_ci.Predefined_vars.(show ci_project_dir) // ".cargo" + +let enable_networked_cargo = append_variables [("CARGO_NET_OFFLINE", "false")] + +let enable_cargo_cache job = + job + |> append_cache + (cache + ~key:("cargo-" ^ Gitlab_ci.Predefined_vars.(show ci_job_name_slug)) + [cargo_home // "registry/cache"]) + (* Allow Cargo to access the network *) + |> enable_networked_cargo + (** A set of internally and externally built images. Use this module to register images built in the CI of diff --git a/ci/lib_tezos_ci/tezos_ci.mli b/ci/lib_tezos_ci/tezos_ci.mli index 769b92e778b601cd406a63ff9aecffdeea1709ed..1143bef934e58ec0406ecff6265d4d7dc2088c40 100644 --- a/ci/lib_tezos_ci/tezos_ci.mli +++ b/ci/lib_tezos_ci/tezos_ci.mli @@ -1,7 +1,7 @@ (*****************************************************************************) (* *) (* SPDX-License-Identifier: MIT *) -(* Copyright (c) 2023-2024 Nomadic Labs. *) +(* Copyright (c) 2023 Nomadic Labs. *) (* *) (*****************************************************************************) @@ -170,6 +170,51 @@ module Pipeline : sig val describe_pipeline : string -> unit end +(** Add variable enabling sccache. + + This function should be applied to jobs that build rust files and + which has a configured sccache Gitlab CI cache. + + - [key] and [path] configure the key under which the cache is + stored, and the path that will be cached. By default, the [key] + contains the name of the job, thus scoping the cache to all + instances of that job. By default, [path] is the folder + ["$CI_PROJECT_DIR/_sccache"], and this function also sets the + environment dir [SCCACHE_DIR] such that sccache stores its caches + there. + + - [cache_size] sets the environment variable [SCCACHE_CACHE_SIZE] + that configures the maximum size of the cache. + + - [error_log], [idle_timeout] and [log] sets the environment + variables [SCCACHE_ERROR_LOG], [SCCACHE_IDLE_TIMEOUT] and + [SCCACHE_LOG] respectively. See the sccache documentation for more + information on these variables. *) +val enable_sccache : + ?key:string -> + ?error_log:string -> + ?idle_timeout:string -> + ?log:string -> + ?path:string -> + ?cache_size:string -> + tezos_job -> + tezos_job + +(** Allow cargo to access the network by setting [CARGO_NET_OFFLINE=false]. + + This function should only be applied to jobs that have a GitLab CI + cache for [CARGO_HOME], as enabled through [enable_cache_cargo] (that + function calls this function, so there is no need to apply both). + Exceptions can be made for jobs that must have CARGO_HOME set to + something different than {!cargo_home}. *) +val enable_networked_cargo : tezos_job -> tezos_job + +(** Adds a GitLab CI cache for the CARGO_HOME folder. + + More precisely, we only cache the non-SCM dependencies in the + sub-directory [registry/cache]. *) +val enable_cargo_cache : tezos_job -> tezos_job + (** A facility for registering images for [image:] keywords. Images can be registered in two manners: diff --git a/teztale/ci/teztale.ml b/teztale/ci/common.ml similarity index 97% rename from teztale/ci/teztale.ml rename to teztale/ci/common.ml index d11b11f8011c586d77dc6650f7087bb90a3e1ee3..0f9b092d8ff0035098f61057331403ce5a60eec1 100644 --- a/teztale/ci/teztale.ml +++ b/teztale/ci/common.ml @@ -42,3 +42,4 @@ let job_build ?rules ?(expire_in = Gitlab_ci.Types.(Duration (Days 1))) ~arch () "mv octez-teztale-* ./teztale-binaries/" ^ arch_string ^ "/"; ] ["make teztale"] + |> enable_cargo_cache |> enable_sccache diff --git a/teztale/ci/release.ml b/teztale/ci/release.ml new file mode 100644 index 0000000000000000000000000000000000000000..feb09f7bc69a5c13a9355621715ca280132ac650 --- /dev/null +++ b/teztale/ci/release.ml @@ -0,0 +1,29 @@ +(*****************************************************************************) +(* *) +(* SPDX-License-Identifier: MIT *) +(* Copyright (c) 2025 Nomadic Labs. *) +(* *) +(*****************************************************************************) + +open Tezos_ci + +let job_datadog_pipeline_trace : tezos_job = + job + ~__POS__ + ~allow_failure:Yes + ~name:"datadog_pipeline_trace" + ~image:Images.datadog_ci + ~before_script:[". ./scripts/ci/datadog_send_job_info.sh"] + ~stage:Stages.start + [ + "CI_MERGE_REQUEST_IID=${CI_MERGE_REQUEST_IID:-none}"; + "DATADOG_SITE=datadoghq.eu datadog-ci tag --level pipeline --tags \ + pipeline_type:$PIPELINE_TYPE --tags mr_number:$CI_MERGE_REQUEST_IID"; + ] + +let jobs ~test () = + (if test then [] else [job_datadog_pipeline_trace]) + @ [ + Common.job_build ~expire_in:Never ~arch:Amd64 (); + Common.job_build ~expire_in:Never ~arch:Arm64 (); + ]