-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
67 lines (57 loc) · 1.66 KB
/
Copy pathTaskfile.yml
File metadata and controls
67 lines (57 loc) · 1.66 KB
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: '3'
vars:
BASH_SCRIPTS:
sh: find . -iname '*.sh' -not -path './cygwin/*' -not -path './config/pi/agent/packages/*' | xargs echo
tasks:
test:
cmds:
- echo {{.BASH_SCRIPTS}}
- bash ./test/shellcheck.sh {{.BASH_SCRIPTS}}
- bash ./test/check-safe-bash.sh {{.BASH_SCRIPTS}}
- bash ./test/betterleaks.sh
sources:
- "**/*.sh"
#- "{{.BASH_SCRIPTS}}"
format:
cmds:
- shfmt -i 2 -w {{.BASH_SCRIPTS}}
sources:
- "**/*.sh"
#- "{{.BASH_SCRIPTS}}"
scan-secrets:
cmds:
- bash ./test/betterleaks.sh
install-git-hooks:
cmds:
- git config core.hooksPath .githooks
lint-containerfile:
cmds:
- podman run --rm -i hadolint/hadolint < Containerfile
sources:
- Containerfile
build-container:
cmds:
- podman build --format=docker -t nvolcz/dotfiles .
- podman build --format=docker -t nvolcz/dotfiles-base --target base .
- podman build --format=docker -t nvolcz/dotfiles-bootstrapped --target bootstrapped .
sources:
- Containerfile
- "{bin,config,installs,local}/*"
- bootstrap.sh
run-container:
deps: [build-container]
cmds:
- podman run -it nvolcz/dotfiles-bootstrapped /bin/bash
run-container-base:
deps: [build-container]
cmds:
- podman run -it nvolcz/dotfiles-base /bin/bash
test-container:
deps: [build-container]
cmds:
- |
CONTAINER_ID=$(podman run -t -d nvolcz/dotfiles)
echo ${CONTAINER_ID}
trap 'podman kill ${CONTAINER_ID}' EXIT
podman exec -it $CONTAINER_ID \
bash -c 'cd /home/niklas/git/dotFiles; sudo bash ./test/container-test.sh'