Skip to content

Commit

Permalink
CI: wire into Jenkins
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Jun 22, 2018
1 parent f6edf34 commit 9851562
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pipeline {
agent any

stages {
stage('Build') {
steps {
sh '/bin/bash ./jenkins_build.sh'
}
}
}
}
30 changes: 30 additions & 0 deletions jenkins_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash


#git://git.kernel.org/pub/scm/utils/dtc/dtc.git

git_tag="v1.4.4"
project="dtc"
server="git://git.kernel.org/pub/scm/utils/dtc/dtc.git"

if [ ! -d ${HOME}/git/ ] ; then
mkdir -p ${HOME}/git/ || true
fi

if [ ! -f ${HOME}/git/${project}/.git/config ] ; then
git clone ${server} ${HOME}/git/${project}/
fi

cd ${HOME}/git/${project}/
make clean
git checkout master -f
git pull || true

git checkout ${git_tag} -b ${git_tag}-build

make clean
make PREFIX=/usr/local/ CC=gcc CROSS_COMPILE= all
echo "Installing into: /usr/local/bin/"
sudo make PREFIX=/usr/local/ install
sudo ln -sf /usr/local/bin/dtc /usr/bin/dtc
echo "dtc: `/usr/local/bin/dtc --version`"

0 comments on commit 9851562

Please sign in to comment.