Rebuild failure - skipping "after_assets_precompile" section of app.yml

Help!

On rebuild, the process skips the following section in the app.yml file:

after_assets_precompile:
  - exec:
      cd: $home
      cmd:
        - sudo -E -u discourse bundle exec rake s3:upload_assets
        - sudo -E -u discourse bundle exec rake s3:expire_missing_assets

Immediately after rebuild, I can manually process the commands via:

./launcher enter app
rake s3:upload_assets
rake s3:expire_missing_assets

The commands run and process the required files to S3.

I have added an echo command to the after_assets_precompile code.

      cmd:
        - echo "Beginning of precompile commands"
        - sudo -E -u discourse bundle exec rake s3:upload_

The echo statement never appears in the rebuild output.

The rebuild step processes the steps before and after this section in the app.yml file. It processes all plugins and custom commands.

I have taken the following steps to try and resolve:

  1. Removed all plugins
  2. Disabled all components
  3. Reviewed all the discourse log files. Did not find any errors indicated.
  4. Reviewed base system log files. Did not find any errors indicated.

Does anyone have a clue why the rebuild process would skip this section?