From 682004b784e41c04fcfe9d290b6f8c534704b347 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Madis=20M=C3=A4gi?= Date: Wed, 27 Oct 2021 20:07:49 +0300 Subject: [PATCH] Add Jenkinsfile and modify script --- Jenkinsfile | 29 +++++++++++++++++++++++++++++ script.sh | 5 +++++ 2 files changed, 34 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..6fe2dbb --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,29 @@ +#!/usr/bin/groovy +directory = "openwrt-camera-image" +pipeline { + agent any + stages { + stage("Setup") { + steps { + dir(directory) { + deleteDir() + checkout scm + } + } + } + stage("Build") { + steps { + dir(directory) { + sh "sh script.sh" + } + } + } + stage("Deliver") { + steps { + dir(directory) { + archiveArtifacts artifacts: "bin/*", allowEmptyArchive: false, fingerprint: false + } + } + } + } +} diff --git a/script.sh b/script.sh index f0aeae3..c017186 100644 --- a/script.sh +++ b/script.sh @@ -97,3 +97,8 @@ EOF make image PROFILE=glinet_gl-ar150 FILES=overlay/ PACKAGES="usbutils curl htop nano mjpg-streamer kmod-video-uvc \ v4l-utils tcpdump -odhcp6c -odhcpd -dnsmasq -pppd -luci-proto-ppp -kmod-ppp -ppp -ppp-mod-pppoe \ -kmod-ath -kmod-ath9k-common -kmod-ath9k -kmod-ip6tables -ip6tables -luci-proto-ipv6 -kmod-iptunnel6 -kmod-ipsec6 -luci" + +# Copy binaries to fixed location +cd - +mkdir -p bin/ +cp $BASENAME/bin/targets/ath79/generic/*.bin bin/