1
1
ALL =elastic-agent-standalone elastic-agent-managed
2
2
BEAT_VERSION =$(shell head -n 1 ../../version/docs/version.asciidoc | cut -c 17- )
3
+ BRANCH_VERSION =$(shell sed -n '2p' ../../version/docs/version.asciidoc | cut -c 14- )
3
4
4
5
# variables needed for ci-create-kubernetes-templates-pull-request
5
6
ELASTIC_AGENT_REPO =kibana
@@ -9,7 +10,7 @@ ELASTIC_AGENT_BRANCH=update-k8s-templates-$(shell date "+%Y%m%d%H%M%S")
9
10
10
11
.PHONY : generate-k8s $(ALL )
11
12
generate-k8s : $(ALL )
12
-
13
+
13
14
test : generate-k8s
14
15
for FILE in $( shell ls * -kubernetes.yaml) ; do \
15
16
BEAT=$$(echo $$FILE | cut -d \- -f 1 ) ; \
@@ -19,21 +20,21 @@ test: generate-k8s
19
20
clean :
20
21
@for f in $(ALL ) ; do rm -f " $$ f-kubernetes.yaml" ; done
21
22
22
- $(ALL ) :
23
+ $(ALL ) :
23
24
ifdef WITHOUTCONFIG
24
25
@echo "Generating
[email protected] "
25
26
26
27
@for f in $(shell ls $@/*.yaml | grep -v daemonset-configmap); do \
27
- sed "s/%VERSION%/VERSION/g" $$f >>
[email protected] ; \
28
+ sed
-e "s/%VERSION%/VERSION
/g" -e "s/%BRANCH%/${BRANCH_VERSION} /g" $$f >>
[email protected] ; \
28
29
29
30
done
30
31
else
31
- @echo "Generating
[email protected] "
32
-
32
+ @echo "Generating
[email protected] "
33
+
33
34
@for f in $(shell ls $@/*.yaml); do \
34
- sed "s/%VERSION%/${BEAT_VERSION}/g" $$f >>
[email protected] ; \
35
+ sed
-e "s/%VERSION%/${BEAT_VERSION
}/g" -e "s/%BRANCH%/${BRANCH_VERSION }/g" $$f >>
[email protected] ; \
35
36
36
- done
37
+ done
37
38
endif
38
39
39
40
CHDIR_SHELL := $(SHELL )
47
48
ci-clone-kibana-repository :
48
49
git clone
[email protected] :elastic/kibana.git
49
50
cp $(FILE_REPO ) $(ELASTIC_AGENT_REPO ) /$(ELASTIC_AGENT_REPO_PATH )
50
-
51
+
51
52
# # ci-create-kubernetes-templates-pull-request : Create the pull request for the kubernetes templates
52
53
.PHONY : ci-create-kubernetes-templates-pull-request
53
54
ci-create-kubernetes-templates-pull-request :
0 commit comments