Collapsible sections lines not hidden in output

Hi,

i’m trying to use collapsible sections like described here Jobs | GitLab , but it seems other than stated in the documentation the lines are not removed from the rendered output.

The first variant is directly from the documentation, the second one was just to change color…

Here’s the html for those lines

Any idea why those are not hidden ?
I’m not sure what i’m doing wrong :frowning:

Hi, please post the .gitlab-ci.yml Part of the configuration and your current GitLab Version?

Hi,

sure this is one example where it happens
And GitLab is current Version 13.7.1 (c97c8073a0e)

build_image_docker:
  stage: build-docker
  image: srv-nexus-oss.mydomain.com/docker:latest
  services:
  - docker:dind
  script:
    - echo -e "section_start:`date +%s`:before_script_section[collapsed=true]\r\e[0K\e[0K\e[33;1mBuilding Docker Image"
    - echo "{\"name\":\"`echo $CI_PROJECT_DIR | cut -d'/' -f 7-`\",\"version\":\"$CI_BUILD_REF_NAME\",\"build_nr\":\"$CI_BUILD_ID\",\"build_date\":\"`date`\"}" >> ci-build.json
    - cat ci-build.json
    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY  
    - echo $DOCKERREGISTRY_PWD | docker login -u k8s --password-stdin $URL_DOCKERREGISTRY
    - docker pull -q $DOCKER_IMAGE_NAME_LATEST || true
    - docker build --cache-from ${DOCKER_IMAGE_NAME_LATEST} --build-arg env=$CI_COMMIT_REF_NAME -t ${DOCKER_IMAGE_NAME_FULL} -f ./Dockerfile .
    - docker tag ${DOCKER_IMAGE_NAME_FULL} ${DOCKER_IMAGE_NAME_LATEST}
    - docker push $DOCKER_IMAGE_NAME_FULL
    - docker push $DOCKER_IMAGE_NAME_LATEST
    - echo -e "section_end:`date +%s`:before_script_section\r\e[0K"
  interruptible: true
  tags:
    - kubernetes
  rules:
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_TAG
    - if: $CI_COMMIT_BRANCH

And this is the other part from my screenshot

before_script:
    - echo -e "section_start:`date +%s`:before_script_section[collapsed=true]\r\e[0KRunning before_script"
    - mkdir -p /tmp
    - export VAULT_ADDR=https://vault.mydomain.com
    - export VAULT_TOKEN="$(vault write -field=token auth/jwt/login role=terraform jwt=$CI_JOB_JWT)"
    - echo -e "section_end:`date +%s`:before_script_section\r\e[0K"