mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
.deploy_job_template:
|
|
stage: deploy
|
|
image: $ESP_ENV_IMAGE
|
|
tags: [ deploy ]
|
|
|
|
.metrics_template:
|
|
stage: deploy
|
|
tags: [ fast_run, shiny ]
|
|
image: python:3.13-slim
|
|
needs:
|
|
- job: manual_gate
|
|
optional: true
|
|
dependencies: null
|
|
variables:
|
|
PIP_CACHE_DIR: ".cache/pip"
|
|
# Metrics - related env vars
|
|
ESP_METRICS_PROJECT_URL: "$CI_PROJECT_URL"
|
|
ESP_METRICS_PROJECT_ID: "$CI_PROJECT_ID"
|
|
ESP_METRICS_COMMIT_SHA: "$PIPELINE_COMMIT_SHA"
|
|
ESP_METRICS_BRANCH_NAME: "$CI_COMMIT_REF_NAME"
|
|
cache:
|
|
key: metrics-pip
|
|
paths:
|
|
- .cache/pip
|
|
before_script:
|
|
- echo "Installing esp-metrics-cli tool"
|
|
- pip install "esp-metrics-cli>=0.3,<1"
|
|
|
|
deploy_update_SHA_in_esp-dockerfiles:
|
|
extends:
|
|
- .deploy_job_template
|
|
- .before_script:minimal
|
|
- .rules:protected:deploy
|
|
dependencies: []
|
|
variables:
|
|
GIT_DEPTH: 2
|
|
tags: [build, shiny]
|
|
script:
|
|
- 'curl --header "PRIVATE-TOKEN: ${ESPCI_SCRIPTS_TOKEN}" -o create_MR_in_esp_dockerfile.sh $GITLAB_HTTP_SERVER/api/v4/projects/1260/repository/files/create_MR_in_esp_dockerfile%2Fcreate_MR_in_esp_dockerfile.sh/raw\?ref\=master'
|
|
- chmod +x create_MR_in_esp_dockerfile.sh
|
|
- ./create_MR_in_esp_dockerfile.sh
|
|
environment:
|
|
name: deploy_update_SHA_in_esp-dockerfiles_production
|
|
deployment_tier: production
|
|
|
|
target-examples-count-metrics:
|
|
extends:
|
|
- .metrics_template
|
|
allow_failure: true
|
|
script:
|
|
- echo "Generating ESP-IDF examples count metrics"
|
|
- cd tools/ci/metrics/examples_count
|
|
- python3 generate_metrics.py
|
|
- esp-metrics-cli upload -d schema.yaml -i metrics.json
|