diff --git a/build/get-finn-dev.sh b/build/get-finn-dev.sh deleted file mode 100755 index 541e857..0000000 --- a/build/get-finn-dev.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# Copyright (c) 2020, Xilinx -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# * Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# * Neither the name of FINN nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# URL for git repo to be cloned -REPO_URL=https://github.com/Xilinx/finn - -# directory (under the same folder as this script) to clone to -REPO_DIR=finn - -# absolute path to this script, e.g. /home/user/bin/foo.sh -SCRIPT=$(readlink -f "$0") -# absolute path this script is in, thus /home/user/bin -SCRIPTPATH=$(dirname "$SCRIPT") -# absolute path for the repo local copy -CLONE_TO=$SCRIPTPATH/$REPO_DIR - -# clone repo if dir not found -if [ ! -d "$CLONE_TO" ]; then - git clone $REPO_URL $CLONE_TO -fi -git -C $CLONE_TO pull -# checkout top of dev -git -C $CLONE_TO checkout dev diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 8bc6675..f584717 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -16,7 +16,7 @@ pipeline { steps { cleanLocalCloneDir() dir('build') { - sh './get-finn-dev.sh' + getFinn() // WORKAROUND - Jenkins is not an interactive shell, deselect '-it', // in order to build bitstreams/run build script with Jenkins. dir('finn') { @@ -393,3 +393,21 @@ def checkAllBoards() { return overallResult } + +void getFinn() { + // Using shell commands due to git plugin not behaving when cloning a new repo into + // an existing one. Likely a way to do this, but shell commands are sufficient + + // Cleanup existing checkout + sh "rm -rf finn" + + // Clone FINN repo into finn directory and checkout correct branch + sh "git clone https://github.com/Xilinx/finn finn" + sh "git -C finn checkout testing/jenkins-integration" + + // WORKAROUND - Jenkins is not an interactive shell, deselect '-it', + // in order to build bitstreams/run build script with Jenkins. + dir('finn') { + sh "sed -i '/DOCKER_INTERACTIVE=\"-it\"/d' run-docker.sh" + } +}