CI: Fix standard gitlab key

This commit is contained in:
David Cermak
2021-11-03 09:30:08 +01:00
parent 09287a1156
commit 08c4d62bf4

View File

@ -17,6 +17,13 @@ before_script:
# Use CI Tools # Use CI Tools
- curl -sSL ${CIT_LOADER_URL} | sh - curl -sSL ${CIT_LOADER_URL} | sh
- source citools/import_functions - source citools/import_functions
# Add gitlab ssh key
- 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
- PATH=$CI_PROJECT_DIR/esp-idf/tools:$PATH - PATH=$CI_PROJECT_DIR/esp-idf/tools:$PATH
- export IDF_PATH=$CI_PROJECT_DIR/esp-idf - export IDF_PATH=$CI_PROJECT_DIR/esp-idf
- export MQTT_PATH=$CI_PROJECT_DIR - export MQTT_PATH=$CI_PROJECT_DIR
@ -28,7 +35,6 @@ build_with_idf_v3:
- build - build
dependencies: [] dependencies: []
script: script:
- cit_add_ssh_key "${GITLAB_KEY}"
- git clone "${IDF_REPO}" - git clone "${IDF_REPO}"
# build with IDFv3.2 # build with IDFv3.2
- $MQTT_PATH/ci/set_idf.sh release/v3.2 - $MQTT_PATH/ci/set_idf.sh release/v3.2
@ -53,7 +59,6 @@ build_with_idf_v4:
variables: variables:
PYTHON_VER: 3.6.13 PYTHON_VER: 3.6.13
script: script:
- cit_add_ssh_key "${GITLAB_KEY}"
- git clone "${IDF_REPO}" - git clone "${IDF_REPO}"
- source /opt/pyenv/activate && pyenv global $PYTHON_VER - source /opt/pyenv/activate && pyenv global $PYTHON_VER
- $MQTT_PATH/ci/set_idf.sh master - $MQTT_PATH/ci/set_idf.sh master
@ -105,7 +110,6 @@ build_and_test_qemu:
variables: variables:
PYTHON_VER: 3.6.13 PYTHON_VER: 3.6.13
script: script:
- cit_add_ssh_key "${GITLAB_KEY}"
- git clone "${IDF_REPO}" - git clone "${IDF_REPO}"
- source /opt/pyenv/activate && pyenv global $PYTHON_VER - source /opt/pyenv/activate && pyenv global $PYTHON_VER
# switch to IDF and setup the tools # switch to IDF and setup the tools