Skip to content

Commit c49beb0

Browse files
Fix docker deploy steps conditions
1 parent f386b3f commit c49beb0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Diff for: .drone.yml

+18
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ anchors:
3838
- ARTIFACTORY_USER
3939
- GITHUB_TOKEN
4040

41+
when_internal_branch: &when_internal_branch
42+
when:
43+
event: [push]
44+
branch: [internal]
45+
4146
steps:
4247
- name: setup
4348
image: ubuntu
@@ -59,8 +64,20 @@ steps:
5964
ENVIRONMENT: production
6065
AMPLITUDE_API_KEY: f0b9cf5c530426c3dbacb91e74f009a5
6166

67+
# Push the staging image, tagged with the branch name. Useful for testing the image in fc-datahub.
68+
- name: docker_frontend_development
69+
<<: *docker_build_config
70+
settings:
71+
context : /drone/src/staging/
72+
dockerfile: /drone/src/staging/docker/datahub-frontend/Dockerfile
73+
tags:
74+
- ${DRONE_BRANCH//\//-}
75+
depends_on:
76+
- build_frontend_staging
77+
6278
- name: docker_frontend_staging
6379
<<: *docker_build_config
80+
<<: *when_internal_branch
6481
settings:
6582
context: /drone/src/staging/
6683
dockerfile: /drone/src/staging/docker/datahub-frontend/Dockerfile
@@ -71,6 +88,7 @@ steps:
7188

7289
- name: docker_frontend_production
7390
<<: *docker_build_config
91+
<<: *when_internal_branch
7492
settings:
7593
context: /drone/src/production/
7694
dockerfile: /drone/src/production/docker/datahub-frontend/Dockerfile

0 commit comments

Comments
 (0)