-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
46 lines (39 loc) · 1.22 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
version: '3'
env:
ROOT_PATH:
sh: pwd
GH_TOKEN:
sh: aws ssm get-parameter --profile kasada-dev --region ap-southeast-2 --name /ops/ci/lerna-git-ssh --with-decryption --output text --query Parameter.Value
tasks:
build_and_publish_image:
cmds:
- task: bake-base-image
- task: install-deps
- task: changed-images
- task: configure-git
- task: set-new-version
- docker-compose run --rm node env && yarn workspaces run build_and_publish_image
# set new version in package.json if changes detected
set-new-version:
cmds:
# call lerna through yarn to avoid installing lerna cli globally
# another option is to use npx
- docker-compose run --rm node yarn set-new-version:ci
changed-images:
cmds:
- docker-compose run --rm node sh -c 'yarn --silent changed | jq --raw-output .[].name > changed.txt'
install-deps:
cmds:
- docker-compose run --rm node yarn install --frozen-lockfile
sources:
- package.json
- yarn.lock
generates:
- node_modules/**
method: timestamp
bake-base-image:
cmds:
- docker build -t base-image .
configure-git:
cmds:
- docker-compose run --rm node sh ./configure-git.sh