-
Notifications
You must be signed in to change notification settings - Fork 0
/
.build.yml
69 lines (60 loc) · 1.89 KB
/
.build.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
image: archlinux
packages:
- go
- podman
- buildah
- passt
- aardvark-dns
sources:
- https://github.com/go-ap/authorize
secrets:
- 3dcea276-38d6-4a7e-85e5-20cbc903e1ea
- 3f30fd61-e33d-4198-aafb-0ff341e9db1c
tasks:
- build: |
test ${BUILD_SUBMITTER} != "git.sr.ht" && complete-build
set +x
cd authorize
make all
- tests: |
cd authorize
make test
- push_to_github: |
test ${BUILD_SUBMITTER} != "git.sr.ht" && complete-build
set -a +x
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
cd authorize
git remote add hub [email protected]:go-ap/authorize
git push hub --force --all
- images: |
set -a +x
source ~/.buildah.env
_user=$(id -un)
echo 'unqualified-search-registries = ["docker.io"]' | sudo tee /etc/containers/registries.conf.d/unq-search.conf
echo "${_user}:10000:65536" | sudo tee /etc/subuid
echo "${_user}:10000:65536" | sudo tee /etc/subgid
podman system migrate
podman login -u="${BUILDAH_USER}" -p="${BUILDAH_SECRET}" quay.io
set --
cd authorize || exit
_sha=$(git rev-parse --short HEAD)
_branch=$(git branch --points-at=${_sha} | tail -n1 | tr -d '* ')
_version=$(printf "%s-%s" "${_branch}" "${_sha}")
make -C images cert builder
_push() {
_storage=${1:-all}
make -C images STORAGE="${_storage}" VERSION="${_version}" ENV=dev push
if [ "${_branch}" = "master" ]; then
make -C images STORAGE="${_storage}" ENV=qa VERSION="${_version}" push
fi
_tag=$(git describe --long --tags || true)
if [ -n "${_tag}" ]; then
make -C images STORAGE="${_storage}" ENV=prod VERSION="${_tag}" push
fi
}
_push
_push fs
# I guess I don't need everything while we're in heavy development
#_push badger
#_push boltdb
#_push sqlite