-
Notifications
You must be signed in to change notification settings - Fork 3
/
.cirrus.yml
46 lines (45 loc) · 1.28 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# .cirrus.yml:
env:
CIRRUS_CLONE_DEPTH: 1
ARCH: amd64
task:
freebsd_instance:
image: freebsd-13-2-release-amd64
build_trigger:
- echo "BRANCH=$(GITHUB_REF)" >> $CIRRUS_ENV
show_build_trigger: echo $BRANCH
script:
- echo "branch is $BRANCH"
- pkg install -y git curl
- echo 'pf_enable="YES"' >> /etc/rc.conf
- 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
- bastille bootstrap 13.2-RELEASE
- bastille create testrun 13.2-RELEASE 10.17.89.66
- bastille list
- cd templates
- echo " branch is $BRANCH "
- git checkout $BRANCH
- git branch
- echo "GHSHA is $GHSHA"
- git diff --dirstat $BRANCH..main ./*
- git diff --dirstat $BRANCH..main ./* > diff.txt
- echo "*** diff.txt ***"
- cat diff.txt
- # Use sed to remove characters before the match pattern
- sed 's/.* //' diff.txt > changed.txt
- echo "*** changed.txt ***"
- cat changed.txt
- read -r CHDIR <"changed.txt"
- echo $CHDIR
- cd $CHDIR
- pwd
- chmod +x ./test.sh
- ./test.sh