-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathTaskfile.yml
executable file
·139 lines (114 loc) · 4.08 KB
/
Taskfile.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# Task tool documentation:
# 1) Basics: https://taskfile.dev/usage
# 2) Naming conventions: https://taskfile.dev/styleguide
version: '3'
env:
AEM_ENV: '{{.AEM_ENV | default "local"}}'
AEM_INSTANCE_PROCESSING_MODE: auto
AEM_OUTPUT_VALUE: NONE
dotenv:
- '.env' # VCS-ignored, user-specific
- '.env.{{.AEM_ENV}}' # VCS-ignored, env-specific
- '{{.AEM_ENV}}.env' # VCS-tracked, env-specific
tasks:
init:
desc: initialize project
cmds:
- sh aemw init
- sh aemw instance init
setup:
desc: start and provision AEM instances
cmds:
- task: start
- task: provision
- task: check
resetup:
desc: destroy then setup again AEM instances
cmds:
- task: destroy
- task: setup
start:
desc: start AEM instances
aliases: [ up ]
cmd: sh aemw instance launch
stop:
desc: stop AEM instances
aliases: [ down ]
cmd: sh aemw instance stop
restart:
desc: restart AEM instances
cmds:
- task: stop
- task: start
destroy:
desc: destroy AEM instances
prompt: This will permanently delete all configured AEM instances and their data. Continue?
deps: [ stop ]
cmd: sh aemw instance destroy
status:
desc: check status of AEM instances
env:
AEM_OUTPUT_VALUE: ALL
cmd: sh aemw instance status
tail:
desc: tail logs of AEM instances
cmd: tail -f aem/home/var/instance/*/crx-quickstart/logs/{stdout,error}.log
tail:author:
desc: tail logs of AEM author instance
cmd: tail -f aem/home/var/instance/author/crx-quickstart/logs/{stdout,error}.log
tail:publish:
desc: tail logs of AEM publish instance
cmd: tail -f aem/home/var/instance/publish/crx-quickstart/logs/{stdout,error}.log
provision:
desc: provision AEM instances by installing packages and applying configurations
aliases: [ configure ]
cmds:
- task: provision:repl-agent-publish
- task: provision:crx
provision:repl-agent-publish:
desc: configure replication agent on AEM author instance
internal: true
cmd: |
PROPS="
enabled: true
transportUri: {{.AEM_PUBLISH_HTTP_URL}}/bin/receive?sling:authRequestLogin=1
transportUser: {{.AEM_PUBLISH_USER}}
transportPassword: {{.AEM_PUBLISH_PASSWORD}}
userId: admin
"
echo "$PROPS" | sh aemw repl agent setup -A --location "author" --name "publish"
provision:crx:
desc: enable CRX/DE on AEM instances
internal: true
cmd: 'sh aemw osgi config save --pid "org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet" --input-string "alias: /crx/server"'
check:
deps: [ author:check, publish:check ]
author:check:
desc: check health of AEM author instance
cmds:
- curl -s -u "{{.AEM_AUTHOR_USER}}:{{.AEM_AUTHOR_PASSWORD}}" "{{.AEM_AUTHOR_HTTP_URL}}/libs/granite/core/content/login.html" | grep -q "QUICKSTART_HOMEPAGE"
- curl -s -u "{{.AEM_AUTHOR_USER}}:{{.AEM_AUTHOR_PASSWORD}}" "{{.AEM_AUTHOR_HTTP_URL}}/etc/replication/agents.author/publish.test.html" | grep -q "Replication (TEST) of /content successful"
publish:check:
desc: check health of AEM publish instance
cmd: curl -s -u "{{.AEM_PUBLISH_USER}}:{{.AEM_PUBLISH_PASSWORD}}" "{{.AEM_PUBLISH_HTTP_URL}}/libs/granite/core/content/login.html" | grep -q "QUICKSTART_HOMEPAGE"
build:
desc: build AEM package
cmd: mvn clean install
deploy:all:
desc: deploy all AEM package to AEM instances
cmd: sh aemw package deploy --file "all/target/stubs.all-*.zip"
deploy:min:
desc: deploy minimal AEM package to AEM instances
cmd: sh aemw package deploy --file "min/target/stubs.min-*.zip"
develop:all:
desc: build & deploy all AEM package to instances
cmds:
- task: build
- task: deploy:all
develop:min:
desc: build & deploy minimal AEM package to instances
cmds:
- task: build
- sh aemw package deploy --url 'https://github.com/orbinson/aem-groovy-console/releases/download/19.0.5/aem-groovy-console-all-19.0.5.zip'
- task: deploy:min
- sh aemw package deploy --file 'ui.content/target/stubs.ui.content-*.zip'