jobs:
build:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
deploy-staging:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: yarn install
- run:
name: deploy
command: |
ssh -o StrictHostKeyChecking=no ubuntu@MY_PUBLIC_IP "mkdir testing-CircleCI"
deploy-prod:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
workflows:
version: 2
build_and_deploy:
jobs:
- build
- deploy-staging:
type: approval
requires:
- build
- deploy-prod:
type: approval
requires:
- build
Here is my config file. I have three jobs in workflow. second and third job dependent on first. First job runs successfully after this when i approve second or third job manually, these jobs are not getting started. nothing happens when when i approve job. if i refresh page UI shows that jobs is completed successfully but when i go to jobs listing page there is no entry for that job which i approved manually.
If i remove type: approval from 2nd and third job than all jobs runs successfully and comes up in jobs listing page.