Solution
Use the query below:
codefresh get pipelines $PIPELINE --decrypt-variables -o yaml > temp.yaml
sed -i '/VAR/{n;s/^\([[:space:]]\+value:\).*/\1 NEW_VALUE/}' temp.yaml
codefresh replace -f temp.yaml && rm temp.yaml
Use the query below:
codefresh get pipelines $PIPELINE --decrypt-variables -o yaml > temp.yaml
sed -i '/VAR/{n;s/^\([[:space:]]\+value:\).*/\1 NEW_VALUE/}' temp.yaml
codefresh replace -f temp.yaml && rm temp.yaml