Search code examples
yamlgitlab-civersionmaster-slave

How to get master and slave version gitlab-ci.yml


I have my pippeline where:

    - echo 'Komponente;Version' >> $VERSION_CSV
    - echo 'Master; \"$MASTER_VERSION\"' >> $VERSION_CSV
    - echo 'Slave; \"$SLAVE_VERSION\"' >> $VERSION_CSV
    - 'eval "$DEPLOY_CURL_COMMAND_4"'

but in the output displays this and not the version:

enter image description here

someone know how to display the version or tell me what am I doing wrong?


Solution

  • This has nothing to do with Gitlab CI, what you are doing is Shell-Scripting and your problem is in Shell-Skripting. As you didn't write which Shell we can only guess. For Bash this should give you the right result:

    echo "Master; $MASTER_VERSION" >> $VERSION_CSV
    

    Pro-Tip: Don't show your real paths on Stackoverflow.