mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
.deploy_job_template:
|
|
stage: deploy
|
|
image: $ESP_ENV_IMAGE
|
|
tags:
|
|
- deploy
|
|
|
|
# Check this before push_to_github
|
|
check_submodule_sync:
|
|
extends:
|
|
- .deploy_job_template
|
|
- .rules:test:submodule
|
|
stage: test_deploy
|
|
tags:
|
|
- github_sync
|
|
retry: 2
|
|
variables:
|
|
GIT_STRATEGY: clone
|
|
SUBMODULES_TO_FETCH: "none"
|
|
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
|
|
dependencies: []
|
|
script:
|
|
- git submodule deinit --force .
|
|
# setting the default remote URL to the public one, to resolve relative location URLs
|
|
- git config remote.origin.url ${PUBLIC_IDF_URL}
|
|
# check if all submodules are correctly synced to public repository
|
|
- git submodule init
|
|
- git config --get-regexp '^submodule\..*\.url$' || true
|
|
- git submodule update --recursive
|
|
- echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
|
|
|
|
push_to_github:
|
|
extends:
|
|
- .deploy_job_template
|
|
- .before_script_minimal
|
|
- .rules:protected-no_label
|
|
dependencies: []
|
|
script:
|
|
- add_github_ssh_keys
|
|
- git remote remove github &>/dev/null || true
|
|
- git remote add github git@github.com:espressif/esp-idf.git
|
|
- tools/ci/push_to_github.sh
|