ajgon / opsworks_ruby

Set of chef recipes for OpsWorks based Ruby projects.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

public/assets always purged

toreym opened this issue · comments

Expected Behavior

When setting

                "purge_before_symlink": [
                    "log",
                    "tmp/cache",
                    "tmp/pids",
                    "public/system"
                ]

public/assets should not be purged. right?

the sprockets manifest file in this directory needs to stay in place for our deploy.

Actual Behavior

This directory is getting purged no matter what we do. The following line in the log from opsworks.

purged directories in checkout log, tmp/cache, tmp/pids, public/system, public/assets

Custom JSON

{
    "deploy": {
        "ourapp": {
            "source": {
                "remove_scm_files": false
            },
            "global": {
                "logrotate_rotate": 14,
                "purge_before_symlink": [
                    "log",
                    "tmp/cache",
                    "tmp/pids",
                    "public/system"
                ]
            },
            "appserver": {
                "application_yml": true,
                "adapter": "unicorn"
            },
            "framework": {
                "migrate": false,
                "assets_precompile": false
            }
        }
    },
    "ruby-version": "2.3"
}

notes

We've tried to find the issue, but cannot track down where this directory is being purged from and why.

The enhancement above will keep existing functionality however, it also allows a user to remove a directory from the list of defaults. This is useful for example when you precompile before a deploy and keep the public/assets/.sprockets.manifest.json file in source control.