Question about build stages & jobs

I have such travis.yml, where I have two stages. in first stage, i have two jobs (each of them takes around i.e. 10 minutes):

env:
  jobs:
    - JOBNAME=A1    <----- here I run tests
    - JOBNAME=A2    <----- here I generate other files
jobs:
  include:
    - stage: final_stage
      script:
        - if [ "$JOBNAME" = "A2" ]; then
          ...
          fi

What I want is to run those two jobs in parallel, but then, if all of them finishes successfully, i want a build stage with the logic to trigger only for “A2” job, because in that job, the needed files/artefacts are generated, which I want to push generated files on cloud.
does my travis file look correct?