Skip to content

Commit b835df4

Browse files
committed
feat: adding CircleCI cfg for scheduled pipelines
1 parent b49a954 commit b835df4

File tree

1 file changed

+58
-2
lines changed

1 file changed

+58
-2
lines changed

.circleci/config.yml

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,21 @@ commands:
3030
- setup_remote_docker:
3131
version: 19.03.13
3232

33+
pull_docker_image_from_dockerhub:
34+
parameters:
35+
docker_image:
36+
type: string
37+
skip:
38+
type: string
39+
default: "no"
40+
steps:
41+
- run:
42+
name: Pull Docker Image from DockerHub - << parameters.docker_image >>
43+
command: |
44+
if [[ "<< parameters.skip >>" == "no" ]]; then
45+
docker pull "<< parameters.docker_image >>"
46+
fi
47+
3348
push_docker_image_to_dockerhub:
3449
parameters:
3550
docker_image:
@@ -113,7 +128,7 @@ commands:
113128
default: "no"
114129
steps:
115130
- run:
116-
name: Test Docker Image - << parameters.docker_image >>
131+
name: Test Docker Image
117132
command: |
118133
if [[ "<< parameters.skip >>" == "no" ]]; then
119134
tests/integration/runtime/docker_image_integration_tests.sh \
@@ -257,11 +272,52 @@ jobs:
257272
docker_image: ${DOCKER_TEMP_RUNTIME_LITE_IMAGE}
258273
skip: ${SKIP_RUNTIME_LITE:-}
259274

275+
pull_docker_images_and_run_integration_tests:
276+
working_directory: ~/repo
277+
executor: dev-env
278+
environment:
279+
DOCKER_DEV_ENV_IMAGE: simonsdave/cloudfeaster-dev-env:latest
280+
DOCKER_RUNTIME_IMAGE: simonsdave/cloudfeaster:latest
281+
DOCKER_RUNTIME_LITE_IMAGE: simonsdave/cloudfeaster-lite:latest
282+
steps:
283+
- checkout
284+
- pull_docker_image_from_dockerhub:
285+
docker_image: ${DOCKER_DEV_ENV_IMAGE}
286+
- run_dev_env_docker_image_integration_tests:
287+
docker_image: ${DOCKER_DEV_ENV_IMAGE}
288+
- pull_docker_image_from_dockerhub:
289+
docker_image: ${DOCKER_RUNTIME_IMAGE}
290+
skip: ${SKIP_RUNTIME:-}
291+
- run_runtime_docker_image_integration_tests:
292+
docker_image: ${DOCKER_RUNTIME_IMAGE}
293+
skip: ${SKIP_RUNTIME:-}
294+
- pull_docker_image_from_dockerhub:
295+
docker_image: ${DOCKER_RUNTIME_LITE_IMAGE}
296+
skip: ${SKIP_RUNTIME_LITE:-}
297+
- run_runtime_docker_image_integration_tests:
298+
docker_image: ${DOCKER_RUNTIME_LITE_IMAGE}
299+
skip: ${SKIP_RUNTIME_LITE:-}
300+
260301
workflows:
261302
version: 2
262-
commit:
303+
build_test_and_deploy:
304+
when:
305+
or:
306+
- equal: [ webhook, << pipeline.trigger_source >> ]
307+
- equal: [ api, << pipeline.trigger_source >> ]
263308
jobs:
264309
- build_test_and_deploy:
265310
context:
266311
- cloudfeaster
267312
- docker-executor
313+
314+
integration_tests:
315+
when:
316+
and:
317+
- equal: [ scheduled_pipeline, << pipeline.trigger_source >> ]
318+
- equal: [ "integration_tests", << pipeline.schedule.name >> ]
319+
jobs:
320+
- pull_docker_images_and_run_integration_tests:
321+
context:
322+
- cloudfeaster
323+
- docker-executor

0 commit comments

Comments
 (0)