forked from vexxhost/ansible-collection-kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Earthfile
69 lines (63 loc) · 2.03 KB
/
Earthfile
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
VERSION 0.7
CURL_IF_UPDATED:
COMMAND
ARG --required url
ARG --required path
RUN curl \
-sL ${url} \
-z ${path} \
-o ${path}
DOWNLOAD_PROVIDER:
COMMAND
ARG --required repository
ARG --required type
ARG name
ARG --required version
ARG path=${type}-${name}
RUN mkdir -p roles/cluster_api/files/providers/${path}/${version}
DO +CURL_IF_UPDATED \
--url=https://github.com/${repository}/releases/download/${version}/${type}-components.yaml \
--path=roles/cluster_api/files/providers/${path}/${version}/${type}-components.yaml
DO +CURL_IF_UPDATED \
--url=https://github.com/${repository}/releases/download/${version}/metadata.yaml \
--path=roles/cluster_api/files/providers/${path}/${version}/metadata.yaml
vendor.cluster-api:
LOCALLY
ARG capi=v$(grep cluster_api_core_version roles/cluster_api/defaults/main.yml | cut -d' ' -f2)
ARG capo=v$(grep cluster_api_infrastructure_version roles/cluster_api/defaults/main.yml | cut -d' ' -f2)
DO +DOWNLOAD_PROVIDER \
--repository=kubernetes-sigs/cluster-api \
--type=core \
--path=cluster-api \
--version=${capi}
DO +DOWNLOAD_PROVIDER \
--repository=kubernetes-sigs/cluster-api \
--type=bootstrap \
--name=kubeadm \
--version=${capi}
DO +DOWNLOAD_PROVIDER \
--repository=kubernetes-sigs/cluster-api \
--type=control-plane \
--name=kubeadm \
--version=${capi}
DO +DOWNLOAD_PROVIDER \
--repository=kubernetes-sigs/cluster-api-provider-openstack \
--type=infrastructure \
--name=openstack \
--version=${capo}
mkdocs-image:
FROM squidfunk/mkdocs-material:9.1.15
RUN pip install \
mkdocs-literate-nav
SAVE IMAGE mkdocs
mkdocs-serve:
LOCALLY
WITH DOCKER --load=+mkdocs-image
RUN docker run --rm -p 8000:8000 -v ${PWD}:/docs mkdocs
END
mkdocs-build:
FROM +mkdocs-image
COPY . /docs
RUN mkdocs build
RUN --push --secret GITHUB_TOKEN git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/vexxhost/ansible-collection-kubernetes.git
RUN --push mkdocs gh-deploy --force