8000 Jenkins: use IDF_HASH · pycom/pycom-micropython-sigfox@57b8aab · GitHub
[go: up one dir, main page]

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

Commit 57b8aab

Browse files
peter-pycomXykon
authored andcommitted
Jenkins: use IDF_HASH
1 parent d14a92c commit 57b8aab

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Jenkinsfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ node {
1010
checkout scm
1111
sh 'rm -rf esp-idf'
1212
sh 'git clone --recursive -b idf_v3.3.1 https://github.com/pycom/pycom-esp-idf.git esp-idf'
13+
IDF_HASH=get_idf_hash()
14+
dir('esp-idf'){
15+
sh 'git checkout ' + IDF_HASH
16+
sh 'git submodule update --init --recursive'
17+
}
1318
}
14-
19+
1520
stage('git-tag') {
1621
PYCOM_VERSION=get_version()
1722
GIT_TAG = sh (script: 'git rev-parse --short HEAD', returnStdout: true).trim()
@@ -115,6 +120,11 @@ def get_version() {
115120
matcher ? matcher[0][1].trim().replace('"','') : null
116121
}
117122

123+
def get_idf_hash() {
124+
def matcher = readFile('esp32/Makefile') =~ 'IDF_HASH=(.+)'
125+
matcher ? matcher[0][1].trim().replace('"','') : null
126+
}
127+
118128
def get_firmware_name(short_name) {
119129
node {
120130
def node_info = sh (script: 'cat ${JENKINS_HOME}/pycom-ic.conf || exit 0', returnStdout: true).trim()

0 commit comments

Comments
 (0)
0