aredn/.circleci/config.yml

42 lines
1.4 KiB
YAML
Raw Normal View History

version: 2
jobs:
build:
branches:
only:
- develop
docker:
- image: arednmesh/builder
steps:
- checkout
- run:
name: Update Config.mk
command: |
export MY_WORKING_DIRECTORY=`pwd`
ls -la
sed -i "s/NoCall/${CIRCLE_PROJECT_USERNAME}-${CIRCLE_BRANCH}-${CIRCLE_BUILD_NUM}/g" ${MY_WORKING_DIRECTORY}/config.mk
cat ${MY_WORKING_DIRECTORY}/config.mk
set
- run:
name: Build
command: make
- run:
name: Compress build files
command: tar -cjf ~/${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} .
- run:
name: Deploy Files
command: scp -o StrictHostKeyChecking=no ~/${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST}:~/
- run:
name: Untar Files
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'tar -xjf ~/${ARTIFACTS_FILE} -C ~/'"
- run:
name: Remove tarball
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'rm ~/${ARTIFACTS_FILE}'"
- run:
name: Empty nightly dir
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'rm -rf ${NIGHTLY_DIR}'"
- run:
name: Move targets
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/targets ${NIGHTLY_DIR}'"
- run:
name: Move packages
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/packages ${NIGHTLY_DIR}'"