Skip to content

Commit 69e1101

Browse files
authored
Merge pull request #48 from poespas/feature/bitbucket_reuse_build_step
Reuse build step in bitbucket pipeline template
2 parents caede53 + 05e1849 commit 69e1101

File tree

1 file changed

+16
-17
lines changed

1 file changed

+16
-17
lines changed

templates/bitbucket-pipelines.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,34 @@
11
# See https://quay.io/repository/hypernode/deploy?tab=tags for all possible tags.
22
image: quay.io/hypernode/deploy:3-php8.2-node18
33

4+
definition:
5+
steps:
6+
- step: &hypernode-build
7+
name: Build
8+
script:
9+
- hypernode-deploy build -vvv
10+
artifacts:
11+
- build/**
12+
413
pipelines:
514
branches:
615
# Deploy to test configuration
716
# If you are only deploying to production remove this configuration
8-
test:
9-
- step:
10-
name: build
11-
script:
12-
- hypernode-deploy build -vvv
13-
artifacts:
14-
- build/**
17+
test: # acceptance/staging branch
18+
- step: *hypernode-build
1519
- step:
16-
name: deploy
20+
name: Deploy to staging
1721
deployment: test
1822
script:
1923
- hypernode-deploy deploy test -vvv
2024
after-script:
2125
- hypernode-deploy cleanup
22-
2326
# Deploy to production
2427
master:
28+
- step: *hypernode-build
2529
- step:
26-
name: build
27-
script:
28-
- hypernode-deploy build
29-
artifacts:
30-
- build/**
31-
- step:
32-
name: deploy
30+
name: Deploy to production
3331
deployment: production
3432
script:
35-
- hypernode-deploy deploy production
33+
- hypernode-deploy deploy production -vvv
34+

0 commit comments

Comments
 (0)