Skip to content

Commit 069b912

Browse files
committed
jenkins: fix mici release branch pushing
1 parent a8772eb commit 069b912

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@ node {
166166
env.GIT_BRANCH = checkout(scm).GIT_BRANCH
167167
env.GIT_COMMIT = checkout(scm).GIT_COMMIT
168168

169-
def excludeBranches = ['__nightly', 'devel', 'devel-staging', 'release3', 'release3-staging',
170-
'release-tici', 'release-tizi', 'release-tizi-staging', 'release-mici-staging', 'testing-closet*', 'hotfix-*']
169+
def excludeBranches = ['__nightly', 'devel', 'devel-staging',
170+
'release-tizi', 'release-tizi-staging', 'release-mici', 'release-mici-staging', 'testing-closet*', 'hotfix-*']
171171
def excludeRegex = excludeBranches.join('|').replaceAll('\\*', '.*')
172172

173173
if (env.BRANCH_NAME != 'master' && !env.BRANCH_NAME.contains('__jenkins_loop_')) {
@@ -179,7 +179,7 @@ node {
179179
try {
180180
if (env.BRANCH_NAME == 'devel-staging') {
181181
deviceStage("build release-tizi-staging", "tizi-needs-can", [], [
182-
step("build release-tizi-staging", "RELEASE_BRANCH=release-tizi-staging $SOURCE_DIR/release/build_release.sh && git push -f origin release-tizi-staging:release-mici-staging"),
182+
step("build release-tizi-staging", "RELEASE_BRANCH=release-tizi-staging,release-mici-staging $SOURCE_DIR/release/build_release.sh"),
183183
])
184184
}
185185

release/build_release.sh

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ if [ -z "$RELEASE_BRANCH" ]; then
1616
exit 1
1717
fi
1818

19+
BUILD_BRANCH=release-build
20+
1921

2022
# set git identity
2123
source $DIR/identity.sh
@@ -26,7 +28,7 @@ mkdir -p $BUILD_DIR
2628
cd $BUILD_DIR
2729
git init
2830
git remote add origin git@github.com:commaai/openpilot.git
29-
git checkout --orphan $RELEASE_BRANCH
31+
git checkout --orphan $BUILD_BRANCH
3032

3133
# do the files copy
3234
echo "[-] copying files T=$SECONDS"
@@ -86,9 +88,11 @@ cd $BUILD_DIR
8688
RELEASE=1 pytest -n0 -s selfdrive/test/test_onroad.py
8789
#pytest selfdrive/car/tests/test_car_interfaces.py
8890

89-
if [ ! -z "$RELEASE_BRANCH" ]; then
90-
echo "[-] pushing release T=$SECONDS"
91-
git push -f origin $RELEASE_BRANCH:$RELEASE_BRANCH
92-
fi
91+
echo "[-] pushing release T=$SECONDS"
92+
REFS=()
93+
for branch in ${RELEASE_BRANCH//,/ }; do
94+
REFS+=("$BUILD_BRANCH:$branch")
95+
done
96+
git push -f origin "${REFS[@]}"
9397

9498
echo "[-] done T=$SECONDS"

0 commit comments

Comments
 (0)