Skip to content

Commit

Permalink
Craigs-MBP.lan
Browse files Browse the repository at this point in the history
  • Loading branch information
craigcomstock committed Jun 28, 2023
1 parent d052018 commit 78d6375
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 7 deletions.
26 changes: 26 additions & 0 deletions ci/README
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,33 @@ See /data/buildscripts/ci/build.sh for required environment variables and steps

# virtual or real machine

For virtual machine such as with vagrant, at $NTECH_ROOT (aka top-level directory containing all CFEngine repositories), init an ubuntu-20.04 vagrant machine so it has access to all your repositories.

vagrant init ubuntu/focal64
vagrant ssh
# note however, that currently you will need to copy /vagrant to a non shared filesystem most likely as vboxsf type doesn't support required hard and soft links for packaging :(
cp -R /vagrant ~/workspace

And then do the following as you would on a real machine:
./setup.sh # install needed dependencies/packages/etc
./build.sh # run the build, should generate a package

don't use ./clean.sh ./run.sh or ./shell.sh those are specifically for containerized/docker build

# manual debugging on-host

cat buildscripts/ci/build.sh
# now export the environment variables there (and adjust as needed)
export BUILD_TYPE=DEBUG
export ESCAPETEST=yes
export TEST_MACHINE=chroot

then take each step one-at-a-time or re-run as needed

./buildscripts/build-scripts/install-dependencies

Note that you can provide an argument to install-dependencies to just build ONE dependency, such as

./buildscripts/build-scripts/install-dependencies lmdb

If you change the version of a dependency the cache for that should be skipped and the dep rebuilt from scratch.
14 changes: 7 additions & 7 deletions ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ export TEST_MACHINE=chroot
./buildscripts/build-scripts/configure
./buildscripts/build-scripts/generate-source-tarballs
./buildscripts/build-scripts/compile
apt remove -y 'cfbuild*' || true
apt remove -y 'cfengine-*' || true
rm -rf /var/cfengine
rm -rf /opt/cfengine
sudo apt remove -y 'cfbuild*' || true
sudo apt remove -y 'cfengine-*' || true
sudo rm -rf /var/cfengine
sudo rm -rf /opt/cfengine
./buildscripts/build-scripts/install-dependencies
./buildscripts/build-scripts/package
mkdir -p packages
cp cfengine-nova-hub/*.deb packages/ || true
cp cfengine-nova-hub/*.rpm packages/ || true
sudo mkdir -p packages
sudo cp cfengine-nova-hub/*.deb packages/ || true
sudo cp cfengine-nova-hub/*.rpm packages/ || true

# todo maybe save the cache cp -R ~/.cache buildscripts/ci/cache

0 comments on commit 78d6375

Please sign in to comment.