mirror of https://github.com/aredn/aredn.git
parent
b68b3da5c4
commit
53cbaf44c2
|
@ -1,7 +1,6 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build:
|
||||
working_directory: /opt/aredn/aredn_ar71xx
|
||||
branches:
|
||||
only:
|
||||
- develop
|
||||
|
@ -12,25 +11,25 @@ jobs:
|
|||
- run:
|
||||
name: Update Config.mk
|
||||
command: |
|
||||
sed -i 's/NoCall/${CIRCLE_BRANCH}-${CIRCLE_BUILDNUM}/g' ${CONFIG_MK}
|
||||
cat ${CONFIG_MK}
|
||||
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 ${HOME}/${ARTIFACTS_FILE} -C ${ARTIFACTS_DIR} .
|
||||
- run:
|
||||
name: Delete old snapshot files
|
||||
command: echo "delete old files on ${SSH_HOST}:${NIGHTLY_DIR} (rm -rf ${NIGHTLY_DIR}"
|
||||
command: tar -cjf ~/${ARTIFACTS_FILE} -C ${MY_WORKING_DIRECTORY}/${ARTIFACTS_DIR} .
|
||||
- run:
|
||||
name: Deploy Files
|
||||
command: scp -o StrictHostKeyChecking=no ${HOME}/${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST}:~/
|
||||
command: scp -o StrictHostKeyChecking=no ~/${ARTIFACTS_FILE} ${SSH_USER}@${SSH_HOST}:~/
|
||||
- run:
|
||||
name: Process Files
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'tar -xjf ~/${ARTIFACTS_FILE} -C ~/'"
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'rm ~/${ARTIFACTS_FILE}'"
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'rm -rf ~/${NIGHTLY_DIR}'"
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mkdir -p ${NIGHTLY_DIR}'"
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/targets ${NIGHTLY_DIR}'"
|
||||
command: ssh ${SSH_USER}@${SSH_HOST} "sh -c 'mv ~/packages ${NIGHTLY_DIR}'"
|
Loading…
Reference in New Issue