2 Star 2 Fork 2

一衣弈医/esp-gateway

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.gitlab-ci.yml 2.64 KB
一键复制 编辑 原始数据 按行查看 历史
Xu Chun Guang 提交于 2021-04-28 16:02 . fix: Fix ci error
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)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/junx2020/esp-gateway.git
[email protected]:junx2020/esp-gateway.git
junx2020
esp-gateway
esp-gateway
master

搜索帮助