Gitlab CI who to retry correctly pipeline

In first time I encountered a malfunction when retrying a older pipeline with 4 stages and 1 jobs each, when pipeline is retried only step 4 and step 1 as run

  • It seems to me that during the re-execution of the pipeline all my stages will be correctly re-executed

  • Add the CI configuration from .gitlab-ci.yml and other configuration if relevant (e.g. docker-compose.yml)

stages:

  • build
  • deploy
  • clean

before_script:

variables:
GIT_SUBMODULE_STRATEGY: recursive
GIT_STRATEGY: clone

build:
stage: build
script:

  • git submodule init
  • git submodule update -f
    allow_failure: false
    when: manual
    only:
    - master

production:
stage: deploy
script:
- ssh $DEPLOY_SERVER_USER@$DEPLOY_SERVER_ADDRESS "[ -f /usr/bin/rsync ] || apt-get install -qq -y rsync && [ -f /usr/bin/getfacl ] …. »
allow_failure: false

rollback:
stage: clean
script:
- ssh $DEPLOY_SERVER_USER@$DEPLOY_SERVER_ADDRESS “[ -d /var/www/old/ ] … exit 1”
when: on_failure
allow_failure: false

cleanup:
stage: clean
script:
- ssh $DEPLOY_SERVER_USER@$DEPLOY_SERVER_ADDRESS “rm -rf /var/www/old && rm -rf /var/www/new && rm -rf /var/www/acl”
when: on_success
allow_failure: false

Or would it not be more logical in my git workflow to revert my master to the desired commit?