- job: name: openembedded-armv7a-m8m project-type: freestyle defaults: global logrotate: daysToKeep: 30 numToKeep: 30 properties: - authorization: linaro: - job-read parameters: - password: name: PRIVATE_KEY default: ${PRIVATE_KEY} - string: name: MACHINE default: 'm8m' - string: name: DISTRO default: 'poky' disabled: false node: docker-utopic display-name: 'OpenEmbedded - Socionext M8M (ARMv7-A)' triggers: - timed: '@weekly' wrappers: - timestamps builders: - linaro-publish-token - shell: | #!/bin/bash set -e trap cleanup_exit INT TERM EXIT cleanup_exit() { cd ${WORKSPACE} rm -rf build/tmp/deploy/images/m8m kill -9 ${SSH_AGENT_PID} } sudo apt-get update sudo apt-get install -y python-pycurl chrpath gawk texinfo libsdl1.2-dev TMPKEYDIR=$(mktemp -d /tmp/m8m.XXXXXX) cat > ${TMPKEYDIR}/private-key-wrapper.py << EOF #!/usr/bin/python import os import sys def main(): private_key = os.environ.get("PRIVATE_KEY", "Undefined") if private_key == "Undefined": sys.exit("PRIVATE_KEY is not defined.") buffer = private_key.replace(' ','\n') with open('linaro-private-key', 'w') as f: f.write('-----BEGIN RSA PRIVATE KEY-----\n') f.write(buffer) f.write('\n-----END RSA PRIVATE KEY-----\n') if __name__ == "__main__": main() EOF python ${TMPKEYDIR}/private-key-wrapper.py chmod 0600 ${WORKSPACE}/linaro-private-key eval `ssh-agent` >/dev/null 2>/dev/null ssh-add ${WORKSPACE}/linaro-private-key >/dev/null 2>/dev/null rm -rf ${WORKSPACE}/linaro-private-key ${TMPKEYDIR} mkdir ~/.ssh ssh-keyscan socionext.git.linaro.org >> ~/.ssh/known_hosts cat << EOF >> ~/.ssh/config Host socionext.git.linaro.org User linaro-landing-team-socionext-bot EOF chmod 0600 ~/.ssh/* git clone -b dizzy --depth 1 ssh://socionext.git.linaro.org/srv/landing-teams.git.linaro.org/socionext/poky.git ${WORKSPACE} # Build source oe-init-build-env echo "BBLAYERS += \" ${WORKSPACE}/meta-openembedded/meta-oe\"" >> conf/bblayers.conf echo "BBLAYERS += \" ${WORKSPACE}/meta-openembedded/meta-filesystems\"" >> conf/bblayers.conf echo "BBLAYERS_NON_REMOVABLE += \" ${WORKSPACE}/meta-oe\"" >> conf/bblayers.conf bitbake core-image-base # Publish rm -f ${WORKSPACE}/build/tmp/deploy/images/m8m/*.txt find ${WORKSPACE}/build/tmp/deploy/images/m8m -type l -delete cat > ${WORKSPACE}/build/tmp/deploy/images/m8m/BUILD-INFO.txt << EOF Format-Version: 0.5 Files-Pattern: * License-Type: protected Auth-Groups: linaro-landing-team-socionext-git EOF test -d ${HOME}/bin || mkdir ${HOME}/bin wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py time python ${HOME}/bin/linaro-cp.py \ --build-info ${WORKSPACE}/build/tmp/deploy/images/m8m/BUILD-INFO.txt \ ${WORKSPACE}/build/tmp/deploy/images/m8m openembedded/images/m8m/${BUILD_NUMBER} python ${HOME}/bin/linaro-cp.py --make-link openembedded/images/m8m/${BUILD_NUMBER} - shell: | #!/bin/bash set -e # Cleanup any sensitive files git clean -fdx rm -rf ${WORKSPACE}/* ${WORKSPACE}/.git* publishers: - email: recipients: 'fathi.boudra@linaro.org'