Skip to content
Snippets Groups Projects
Select Git revision
  • 99a7e58dae65e1d1077b498d6bf8e00016930263
  • master default protected
2 results

extract.yml

Blame
  • extract.yml 540 B
    # this job extracts the bash script from the given template(s)
    extract-script:
      image: alpine
      stage: .pre
      script:
        - echo "#!/bin/bash" > script.sh
        - sed -n '/BEGSCRIPT/,/ENDSCRIPT/p' "$GITLAB_CI_FILES" | sed 's/^  //' >> script.sh
        - export LC_ALL=C.UTF-8
      artifacts:
        when: always
        name: extracted template script
        expire_in: 1h
        paths:
          - script.sh
      rules:
        # exclude merge requests
        - if: $CI_MERGE_REQUEST_ID
          when: never
        # enabled if $GITLAB_CI_FILES is set
        - if: $GITLAB_CI_FILES