代码拉取完成,页面将自动刷新
stages:
- build
- deploy
esp32_v4.3_build:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-ci-env
tags:
- build
variables:
GIT_STRATEGY: clone
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
script:
- git clone -b release/v4.3 ${GITLAB_SSH_SERVER}/espressif/esp-idf.git esp-idf
- export IDF_PATH=$(pwd)/esp-idf
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
- $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)" || exit 1
- cd $IDF_PATH
- git submodule update --init --recursive
- cd ..
- idf.py set-target esp32
- idf.py build
esp32_master_build:
stage: build
image: $CI_DOCKER_REGISTRY/esp32-ci-env
tags:
- build
variables:
GIT_STRATEGY: clone
before_script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
script:
- git clone -b master ${GITLAB_SSH_SERVER}/espressif/esp-idf.git esp-idf
- export IDF_PATH=$(pwd)/esp-idf
- source $IDF_PATH/tools/ci/configure_ci_environment.sh
- $IDF_PATH/tools/idf_tools.py --non-interactive install && eval "$($IDF_PATH/tools/idf_tools.py --non-interactive export)" || exit 1
- cd $IDF_PATH
- git submodule update --init --recursive
- cd ..
- idf.py set-target esp32
- idf.py build
push_master_to_github:
stage: deploy
only:
- master
- /^release\/v/
# when: on_success
image: $CI_DOCKER_REGISTRY/esp32-ci-env
variables:
GIT_STRATEGY: clone
GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
before_script:
- echo "skip default before_script"
script:
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_PUSH_KEY >> ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote add github [email protected]:espressif/esp-gateway.git
- eval $(git for-each-ref --shell bash --format 'if [ $CI_BUILD_REF == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。