You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The artifact-updateCode task throws away all modes (not sure why, a comment would be nice). Acquia Cloud can then not execute the cloud hooks.
I was able to extend this to preserve the mode. Not sure if this causes issues if the directory doesn't exist.
<!--Copy Acquia Cloud Hooks and preserve their execution permissions. -->
<copy todir="${artifact.directory}/hooks" overwrite="true" haltonerror="true">
<fileset dir="${build.dir}/hooks" />
</copy>
I put this right after the part where most of the files are copied over.
<!-- List all files that are checked in to git, then use the list to copy them all
into the artifact. -->
<tempfile property="tmpfile" destdir="${build.dir}/artifacts" />
<exec command="git ls-files" dir="${build.dir}" output="${tmpfile}" />
<copy todir="${artifact.directory}" preservemode="false" mode="750" overwrite="true" haltonerror="true">
<filelist dir="${build.dir}" listfile="${tmpfile}" />
</copy>
<delete file="${tmpfile}" />
The text was updated successfully, but these errors were encountered:
I think I did this because everything in the build repo needs to be writable, and when it's not, the artifact can fail to update. I also know that sometimes devs end up with weird permissions on files (e.g. chmod 777 * to try to fix something), and didn't want those types of changes to work their way through to the artifact. It's a brute-force approach, and it sounds like it breaks some things! Perhaps it would make more sense to chmod -R u+w against the artifact repo before copying, and then preserve permissions? Other ideas?
The
artifact-updateCode
task throws away all modes (not sure why, a comment would be nice). Acquia Cloud can then not execute the cloud hooks.I was able to extend this to preserve the mode. Not sure if this causes issues if the directory doesn't exist.
I put this right after the part where most of the files are copied over.
The text was updated successfully, but these errors were encountered: