Skip to content

Commit

Permalink
Fix tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Dec 20, 2017
1 parent b63cd01 commit a412499
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ node('docker && linux-build') {
]) {
stage('Prepare') {
sh '''#!/bin/bash
set +xe
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
ccache -M 0 -F 0
git clean -ffdx -e ccache
Expand All @@ -49,15 +49,15 @@ node('docker && linux-build') {

stage('U-boot') {
sh '''#!/bin/bash
set +xe
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make u-boot-build
'''
}

stage('Kernel') {
sh '''#!/bin/bash
set +xe
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make kernel-build KERNEL_DIR=kernel
make kernel-build KERNEL_DIR=kernel-mainline
Expand All @@ -66,7 +66,7 @@ node('docker && linux-build') {

stage('Images') {
sh '''#!/bin/bash
set +xe
set -xe
export CCACHE_DIR=$WORKSPACE/ccache
make -j$(nproc) $MAKE_TARGET
'''
Expand Down Expand Up @@ -95,14 +95,18 @@ node('docker && linux-build') {

stage('Tagging') {
sh '''#!/bin/bash
repo forall -e -c git tag "$GITHUB_USER/$GITHUB_REPO/$VERSION"
# use -ve, otherwise we could leak GITHUB_TOKEN...
set -ve
repo forall -g tagged -e -c git tag "$GITHUB_USER/$GITHUB_REPO/$VERSION"
'''

if (params.GITHUB_UPLOAD) {
retry(2) {
sh '''#!/bin/bash
# use -ve, otherwise we could leak GITHUB_TOKEN...
set -ve
echo "machine github.com login user password $GITHUB_TOKEN" > ~/.netrc
repo forall -e -c git push ayufan "$GITHUB_USER/$GITHUB_REPO/$VERSION" -f
repo forall -g tagged -e -c git push ayufan "$GITHUB_USER/$GITHUB_REPO/$VERSION" -f
rm ~/.netrc
'''
}
Expand Down

0 comments on commit a412499

Please sign in to comment.