# Multi line script does not get executed in Travis CI

**URL:** <https://travis-ci.community/t/multi-line-script-does-not-get-executed-in-travis-ci/7386>\
**Category:** Travis CI Discussions & Feedback\
**Created:** [February 27, 2020, 7:02pm UTC](https://travis-ci.community/t/multi-line-script-does-not-get-executed-in-travis-ci/7386 "2020-02-27T19:02:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![joesan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/joesan/32/5824_2.png) [@joesan](https://travis-ci.community/u/joesan)\
**Post date:** [February 27, 2020, 7:02pm UTC](https://travis-ci.community/t/multi-line-script-does-not-get-executed-in-travis-ci/7386/1 "2020-02-27T19:02:43Z")

</div>

I have the following job definitions as stages:

```
jobs:
  include:
  - stage: test
    script: sbt clean coverage test coverageReport
  - stage: docker_push
    script: sbt "set test in assembly := {}" assembly
    script: bash docker_push.sh 
    if: branch = master
```

As you can see the docker\_push stage contains two scripts, but when I take a look at the logs only the second one seems to be running. Why is this? How can I make both the scripts work one after another?

---

<div class="post-metadata">

**Author:** ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)\
**Post date:** [February 27, 2020, 7:39pm UTC](https://travis-ci.community/t/multi-line-script-does-not-get-executed-in-travis-ci/7386/2 "2020-02-27T19:39:33Z")

</div>

In YAML, the last key-value pair wins if you define more than 1 item with the same key. This is [the YAML specification](https://yaml.org/spec/1.1/).

If you want to execute multiple commands in `script`, pass an array.

```
- stage: docker_push
    script:
      - sbt "set test in assembly := {}" assembly
      - bash docker_push.sh 
    if: branch = master
```
