Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 7b5c41d

Browse files
committed
Jenkins: use IDF_HASH
1 parent d85d5b7 commit 7b5c41d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Diff for: Jenkinsfile

+11-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@ node {
1313
checkout scm
1414
sh 'rm -rf esp-idf'
1515
sh 'git clone --recursive -b idf_v3.3.1 https://github.com/pycom/pycom-esp-idf.git esp-idf'
16+
IDF_HASH=get_idf_hash()
17+
dir('esp-idf'){
18+
sh 'git checkout ' + IDF_HASH
19+
sh 'git submodule update --init --recursive'
20+
}
1621
}
17-
22+
1823
stage('git-tag') {
1924
PYCOM_VERSION=get_version()
2025
GIT_TAG = sh (script: 'git rev-parse --short HEAD', returnStdout: true).trim()
@@ -131,6 +136,11 @@ def get_version() {
131136
matcher ? matcher[0][1].trim().replace('"','') : null
132137
}
133138

139+
def get_idf_hash() {
140+
def matcher = readFile('esp32/Makefile') =~ 'IDF_HASH=(.+)'
141+
matcher ? matcher[0][1].trim().replace('"','') : null
142+
}
143+
134144
def get_firmware_name(short_name) {
135145
node {
136146
def node_info = sh (script: 'cat ${JENKINS_HOME}/pycom-ic.conf || exit 0', returnStdout: true).trim()

0 commit comments

Comments
 (0)