Files
templates/.cirrus.yml

47 lines
1.3 KiB
YAML
Raw Normal View History

2023-10-08 19:42:46 -07:00
# .cirrus.yml:
2023-10-09 16:23:16 -07:00
env:
CIRRUS_CLONE_DEPTH: 1
ARCH: amd64
2023-10-10 16:48:56 -07:00
task:
2023-10-09 16:23:16 -07:00
freebsd_instance:
image: freebsd-13-2-release-amd64
2023-10-10 18:00:35 -07:00
build_trigger:
- echo "BRANCH=$(GITHUB_REF)" >> $CIRRUS_ENV
2023-10-10 16:56:55 -07:00
show_build_trigger: echo $BRANCH
2023-10-10 16:37:33 -07:00
script:
- echo "branch is $BRANCH"
- pkg install -y git curl
- echo 'pf_enable="YES"' >> /etc/rc.conf
2023-10-10 16:37:33 -07:00
- git clone https://github.com/BastilleBSD/bastille.git
- cd bastille
- make install
- cd /usr/local/etc/bastille
- cp bastille.conf.sample bastille.conf
- bastille setup
- service pf start
- service pf status
- git clone https://github.com/BastilleBSD/templates.git
2023-10-10 16:37:33 -07:00
- bastille bootstrap 13.2-RELEASE
- bastille create testrun 13.2-RELEASE 10.17.89.66
2023-10-10 16:37:33 -07:00
- bastille list
- cd templates
2023-10-10 17:01:21 -07:00
- echo " branch is $BRANCH "
2023-10-10 18:46:46 -07:00
- git checkout $BRANCH
- git branch
- echo "GHSHA is $GHSHA"
- git diff --dirstat $BRANCH..main ./*
- git diff --dirstat $BRANCH..main ./* > diff.txt
2023-10-10 16:37:33 -07:00
- echo "*** diff.txt ***"
- cat diff.txt
- # Use sed to remove characters before the match pattern
- sed 's/.* //' diff.txt > changed.txt
2023-10-10 16:37:33 -07:00
- echo "*** changed.txt ***"
- cat changed.txt
- read -r CHDIR <"changed.txt"
- echo $CHDIR
- cd $CHDIR
- pwd
- chmod +x ./test.sh
- ./test.sh
2023-10-08 19:12:42 -07:00