CI Lint misses after_script when parsing

Please read this!

Summary

When doing a CI Lint (which is btw a very cool feature) it seems like after_script entries are not parsed. Though after_script works fine and is executed by gitlab ci.

Steps to reproduce

goto https://gitlab.com/ci/lint and enter the following code:

before_script: 
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.com:4567    

after_script: 
  - ./cleanup-docker  # check for any dangling image or orphan container
  - docker logout registry.com:4567 

print_sysinfos:
  script:
    - ls --help 2>&1 | head -1  # see which shell we're running

What is the current bug behavior?

current output in 9.4.1-ee gitlab-ce@1ae0012728304fb533c3267ddf23c77465821440

docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.com:4567
ls --help 2>&1 | head -1

What is the expected correct behavior?

docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.com:4567
ls --help 2>&1 | head -1
./cleanup-docker  # check for any dangling image or orphan container
docker logout registry.com:4567 

Output of checks

This bug happens on GitLab.com

Possible fixes

Sorry not enough time to debug.. But it should be somewhere around the Lint-ing of before_script

Assignee Loading
Time tracking Loading