Refactor tests to travis.yml and move build process from script to buildbot

pull/1/head
Max Weiss 1 year ago
parent ae55be8be9
commit 72327c4d67
Signed by untrusted user: maxweiss
GPG Key ID: C2D8443BA1D372DB
  1. 4
      .travis.yml
  2. 31
      buildbot/ipxe_config_sed.sh
  3. 5
      buildbot/test.sh
  4. 41
      buildbot/x86_iso_build.sh

@ -0,0 +1,4 @@
---
script:
- ./buildbot/test.sh

@ -0,0 +1,31 @@
#!/usr/bin/env bash
if [[ ! $1 ]]; then
>&2 echo "No IPXE repo directory was supplied as an argument."
exit 1
fi
# Enable required IPXE features
sed -i 's/^\/\/\#define\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ TIME_CMD/\#define\ TIME_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ DIGEST_CMD/\#define\ DIGEST_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ REBOOT_CMD/\#define\ REBOOT_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ NTP_CMD/\#define\ NTP_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\/\/\#define\ CERT_CMD/\#define\ CERT_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ TIME_CMD/\#define\ TIME_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ DIGEST_CMD/\#define\ DIGEST_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ REBOOT_CMD/\#define\ REBOOT_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ NTP_CMD/\#define\ NTP_CMD/g' "${1}/src/config/general.h"
sed -i 's/^\#undef\ CERT_CMD/\#define\ CERT_CMD/g' "${1}/src/config/general.h"

@ -0,0 +1,5 @@
#!/usr/bin/env bash
# TODO
/bin/true

@ -1,41 +0,0 @@
#!/usr/bin/env bash
# By this point, the dependencies are installed, so we just need to download
# IPXE and build our ISO
git clone git://git.ipxe.org/ipxe.git
cd ipxe
# Do we want to specify a specific commit to lock in??
git checkout HEAD
cd src
# Enable required IPXE features
sed -i 's/^\/\/\#define\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' config/general.h
sed -i 's/^\/\/\#define\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ TIME_CMD/\#define\ TIME_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ DIGEST_CMD/\#define\ DIGEST_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ REBOOT_CMD/\#define\ REBOOT_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ NTP_CMD/\#define\ NTP_CMD/g' config/general.h
sed -i 's/^\/\/\#define\ CERT_CMD/\#define\ CERT_CMD/g' config/general.h
sed -i 's/^\#undef\ DOWNLOAD_PROTO_HTTPS/\#define\ DOWNLOAD_PROTO_HTTPS/g' config/general.h
sed -i 's/^\#undef\ NSLOOKUP_CMD/\#define\ NSLOOKUP_CMD/g' config/general.h
sed -i 's/^\#undef\ TIME_CMD/\#define\ TIME_CMD/g' config/general.h
sed -i 's/^\#undef\ DIGEST_CMD/\#define\ DIGEST_CMD/g' config/general.h
sed -i 's/^\#undef\ REBOOT_CMD/\#define\ REBOOT_CMD/g' config/general.h
sed -i 's/^\#undef\ POWEROFF_CMD/\#define\ POWEROFF_CMD/g' config/general.h
sed -i 's/^\#undef\ IMAGE_TRUST_CMD/\#define\ IMAGE_TRUST_CMD/g' config/general.h
sed -i 's/^\#undef\ NTP_CMD/\#define\ NTP_CMD/g' config/general.h
sed -i 's/^\#undef\ CERT_CMD/\#define\ CERT_CMD/g' config/general.h
IPXE_EMBED_FILE_LOC="$(realpath $(dirname $(realpath $0))/../embed.ipxe)"
make bin/ipxe.iso EMBED="${IPXE_EMBED_FILE_LOC}" \
CERT="${IPXE_SIGNING_CERT},${IPXE_SIGNING_CA_CRT}" \
TRUST="${IPXE_SIGNING_CA_CRT}"
Loading…
Cancel
Save