ci auto deploy
This commit is contained in:
parent
1bfd7c3a59
commit
07e31e7c77
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
HOST=$1
|
||||||
|
|
||||||
|
|
||||||
|
ssh-keygen -R $HOST
|
||||||
|
ssh-keyscan flur.hotoho.n.sum7.eu
|
||||||
|
|
||||||
|
scp -6 $CI_PROJECT_DIR/build_dir/bin/packages/mips_24kc/wifictld/wifictld_*mips_24kc.ipk "root@$HOST":/tmp/wifictld.ipk
|
||||||
|
|
||||||
|
ssh -6 "root@$HOST" opkg install /tmp/wifictld.ipk
|
||||||
|
ssh -6 "root@$HOST" opkg remove wifictld
|
||||||
|
|
|
@ -1,22 +1,31 @@
|
||||||
image: openwrtorg/packages-cci
|
image: openwrtorg/packages-cci
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
SDK_HOST: "downloads.openwrt.org"
|
SDK_HOST: "downloads.openwrt.org"
|
||||||
SDK_PATH: "snapshots/targets/ar71xx/generic"
|
SDK_PATH: "snapshots/targets/ar71xx/generic"
|
||||||
SDK_FILE: "openwrt-sdk-ar71xx-generic_*.Linux-x86_64.tar.xz"
|
SDK_FILE: "openwrt-sdk-ar71xx-generic_*.Linux-x86_64.tar.xz"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- compile
|
- compile
|
||||||
|
- deploy
|
||||||
|
|
||||||
compile:
|
compile:
|
||||||
stage: compile
|
stage: compile
|
||||||
script:
|
script:
|
||||||
- echo "==== Download the SDK ===="
|
- echo "==== Download the SDK ===="
|
||||||
- sh .ci/download_sdk.sh
|
- .ci/download_sdk.sh
|
||||||
- echo "==== Prepare build_dir ===="
|
- echo "==== Prepare build_dir ===="
|
||||||
- sh .ci/prepare_build_dir.sh
|
- .ci/prepare_build_dir.sh
|
||||||
- echo "==== build packages ===="
|
- echo "==== build packages ===="
|
||||||
- sh .ci/build_pkgs.sh
|
- .ci/build_pkgs.sh
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build_dir/bin/packages
|
- build_dir/bin/packages
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
stage: deploy
|
||||||
|
script:
|
||||||
|
- 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
|
||||||
|
- .ci/deploy.sh flur.hotoho.n.sum7.eu
|
||||||
|
|
Loading…
Reference in New Issue