-
Notifications
You must be signed in to change notification settings - Fork 62
/
bitbucket-pipelines.yml
64 lines (62 loc) · 1.79 KB
/
bitbucket-pipelines.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
# Copyright (c) 2014 - 2023 UNICEF. All rights reserved.
definitions:
steps:
- step: &server-test
name: Server tests
image: ruby:3.3.5-bookworm
script:
- ./bin/install_local_test_solr.sh
- ./bin/run_server_tests.sh
services:
- postgres
caches:
- bundler
- step: &client-test
name: Client tests
image: node:20.14.0
size: 2x
script:
- npm config set legacy-peer-deps true
- npm ci
- npm run test
- npm run test:components -- --maxWorkers=2
- npm run lint:run
caches:
- node
- step: &push-branch
image: atlassian/default-image:4
clone:
depth: full
script:
- git push https://[email protected]/ICTD%20-%20Primero%20X%20DEV/_git/primero $BITBUCKET_BRANCH
- git push https://[email protected]/primeroIMS/primero.git $BITBUCKET_BRANCH
services:
postgres:
image: postgres:15.6
variables:
POSTGRES_DB: 'primero_test'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'postgrespassword'
caches:
bundler: ./vendor
pipelines:
branches:
maint_*:
- step: *push-branch
'{develop*,release-*,main}':
- parallel:
- step: *server-test
- step: *client-test
- step: *push-branch
tags:
v*:
- step:
image: atlassian/default-image:4
script:
- git push https://[email protected]/ICTD%20-%20Primero%20X%20DEV/_git/primero $BITBUCKET_TAG
- git push https://[email protected]/primeroIMS/primero.git $BITBUCKET_TAG
pull-requests:
'**':
- parallel:
- step: *server-test
- step: *client-test