How to set manual approval for a stage?

I have some stages and jobs linked to it.


install-rpm:
  stage: deployrpm
  allow_failure: true
  extends:
   - .iftestawsdeploy
  image:
    name: amazon/aws-cli
    entrypoint: [""]
  variables:
      terraform_version: 1.1.7
      terragrunt_version: 0.36.6
      kubectl_version: 1.21.11
  before_script:
    - *install_dependencies
    - *install_myproject_rpm
  script:
    - *run_myproject_deploy
    - exit 0
  after_script:
    - *forward_myproject_resources
    - ls dist1
    - exit 0
  artifacts:
   paths:
    - ./dist1
  tags:
    - ec2runner

cleanup-aws:
  stage: cleanup
  allow_failure: true
  extends:
   - .iftestawsdeploy
  image:
    name: amazon/aws-cli
    entrypoint: [""]
  variables:
      terraform_version: 1.1.7
      terragrunt_version: 0.36.6
      kubectl_version: 1.21.11
  before_script:
    - *install_dependencies
    - *install_myproject_rpm
    - *use_myproject_resources
  script:
    - *teardown_myproject
  after_script:
    - *nuke_SUB_AWS_resources
  tags:
    - dev

I want to set an option before the job cleanupaws above or the cleanup stage so that when previous stages completed, this job/stage should wait till someone clicks on continue or approve button.
So that, we can do our R&D tasks if any failure in deployment and later we can resume cleanup tasks.
Please suggest how to setup that.

I did this in my pipeline, so in my case it only need manual approval for Prod, for anything else it’s auto approve, I hope this will help you

approve deployment:
  stage: approve
  script:
    - echo "Approve Deployment"
  rules:
    - if: $DEPLOY_ENV == "Prod"
      when: manual
    - when: on_success

Thanks reza.
I got the similar solution in the morning.
It would be great if you or any of your team members reply in IST timings also :slight_smile: