<p>OK, as usual the error was between the keyboard and the screen... I did use the "try again" button on the jobs list, which, of course was making use of the same commit, and therefore the changed made to the script were not taken into account ...</p>

CC BY-SA 4.0
2019-09-13T14:15:40.730Z
2019-09-13T14:15:40.730Z
Pier
<p>I have a problem I can't get my head around in gitlab-ci: I have a monorepo where I store some infra code (IaC), in this repo I have a script which allow me to lint the saltstack states code, as :</p>

<pre><code>#!/bin/bash

# Std var
_hostname=$(hostname -f)

for file in $( find . -iname "*.sls" ! \( -path '*/files/orchestration_states/*' -or -path '*/files/reactor_states/*' -or -name "top.sls" \) ); do
    state_path_name=$( echo ${file%.*}| tr -d "."| tr "/" ".")
    if ! sudo salt-call --file-root=. --pillar-root=/home/gitlab-runner/salt_pillars/testBed/ --local --retcode-passthrough state.show_sls ${state_path_name}  pillar='{"tgt_client_name": "dummy-dummy.domain}' ; then 
        echo -e "&gt; Error found while validating state file: please fix it!\
        \n
        \nDetails:\
        \n - File(s) name(s): ${state_path_name}\
        \n - Pipeline ID: ${CI_JOB_ID}\
        \n
        \n - Job link: ${CI_JOB_URL}"\
        |mail -s "${CI_PROJECT_NAME} | Pipeline #${CI_JOB_ID} has failed" -aFrom:${_hostname}@spie.com "mail@domain.com"
        exit 1
    fi
done

</code></pre>

<p>In this script I need to update the <code>--pillar-root=/home/gitlab-runner/salt_pillars/testBed/</code> to replace the <code>testBed</code> string by something lese, let's say <code>toto</code>.
But when I update the string inside the repo the runner keeps using the old version of this script (which failed because the path is not correct).</p>

<p>I can see the correct version of the script inside the repo, but the runner does not update this script when fetching the branch to lint the states.</p>

<p>Any ideas about why the runner does not update the script ?</p>

<p>Thanks</p>

<salt><gitlab-ci-runner><linting>
gitlab -ci script not being updated on runner
Pier
# gitlab -ci script not being updated on runner

(Asked by: username_0 on 2019-09-13)

I have a problem I can't get my head around in gitlab-ci: I have a monorepo where I store some infra code (IaC), in this repo I have a script which allow me to lint the saltstack states code, as :
#!/bin/bash

# Std var
_hostname=$(hostname -f)

for file in $( find . -iname "*.sls" ! \( -path '*/files/orchestration_states/*' -or -path '*/files/reactor_states/*' -or -name "top.sls" \) ); do
    state_path_name=$( echo ${file%.*}| tr -d "."| tr "/" ".")
    if ! sudo salt-call --file-root=. --pillar-root=/home/gitlab-runner/salt_pillars/testBed/ --local --retcode-passthrough state.show_sls ${state_path_name}  pillar='{"tgt_client_name": "dummy-dummy.domain}' ; then 
        echo -e "> Error found while validating state file: please fix it!\
        \n
        \nDetails:\
        \n - File(s) name(s): ${state_path_name}\
        \n - Pipeline ID: ${CI_JOB_ID}\
        \n
        \n - Job link: ${CI_JOB_URL}"\
        |mail -s "${CI_PROJECT_NAME} | Pipeline #${CI_JOB_ID} has failed" -aFrom:${_hostname}@spie.com "mail@domain.com"
        exit 1
    fi
done


In this script I need to update the --pillar-root=/home/gitlab-runner/salt_pillars/testBed/ to replace the testBed string by something lese, let's say toto.
But when I update the string inside the repo the runner keeps using the old version of this script (which failed because the path is not correct).
I can see the correct version of the script inside the repo, but the runner does not update this script when fetching the branch to lint the states.
Any ideas about why the runner does not update the script ?
Thanks

**Tags:** salt, gitlab-ci-runner, linting


---

## 1 answers

### Answer by username_0 on 2019-09-13. Score: 0 | Accepted answer

OK, as usual the error was between the keyboard and the screen... I did use the "try again" button on the jobs list, which, of course was making use of the same commit, and therefore the changed made to the script were not taken into account ...


---

