Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit ba089f8

Browse files
committed
Adding deploy.dryRun param for deploy:artifact target.
1 parent 5e671d2 commit ba089f8

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

template/build/core/phing/tasks/deploy.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,13 @@
2727
<phingcall target="deploy:artifact:build"/>
2828
<phingcall target="deploy:artifact:commit"/>
2929

30-
<!-- Push up changes to remotes. -->
31-
<phingcall target="deploy:artifact:push-all"/>
30+
<!-- Push up changes to remotes if this is not a dry run.-->
31+
<if>
32+
<not><isset property="deploy.dryRun"/></not>
33+
<then>
34+
<phingcall target="deploy:artifact:push-all"/>
35+
</then>
36+
</if>
3237
</target>
3338

3439
<target name="deploy:artifact:add-remote" description="Adds a git remote and checks out deploy branch from upstream.">
@@ -70,6 +75,7 @@
7075
</target>
7176

7277
<target name="deploy:artifact:commit">
78+
<!-- We make these commands quiet because they can cause the output to be so long that Travis CI stops logging. -->
7379
<exec command="git add -A" dir="${deploy.dir}" logoutput="true" passthru="true" checkreturn="true"/>
7480
<exec command="git commit -m '${deploy.commitMsg}' --quiet" dir="${deploy.dir}" logoutput="true" passthru="true" checkreturn="true"/>
7581
</target>

template/readme/deploy.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ In order to create the build artifact in `/deploy`, simply run
2727

2828
This task is analogous to `setup:build:all` but with a few critical differences:
2929
* The docroot is created at `/deploy/docroot`.
30-
* Only production required to the docroot
30+
* Only production required to the docroot
3131
* (planned) CSS / JS are compiled in production mode (compressed / minified)
3232
* (planned) Sensitive files, such as CHANGELOG.txt, are removed.
3333

@@ -36,13 +36,23 @@ After the artifact is created, you can inspect it or even run it as a website lo
3636
## <a name="build-artifact"></a>Create and deploy the build artifact
3737

3838
To both create and deploy the build artifact in a single command, run the following command
39-
39+
4040
````
4141
./blt.sh deploy:artifact -Ddeploy.branch=develop-build -Ddeploy.commitMsg='BLT-123: The commit message.'
4242
````
4343

4444
This command will commit the artifact to the `develop-build` branch with the specified commit message and push it to the remotes defined in project.yml.
4545

46+
### Debugging deployment artifacts
47+
48+
If you would like to create, commit, but _not push_ the artifact, you may do a dry run:
49+
50+
````
51+
./blt.sh deploy:artifact -Ddeploy.branch=develop-build -Ddeploy.commitMsg='BLT-123: The commit message.' -Ddeploy.dryRun=true
52+
````
53+
54+
This is helpful for debugging deployment artifacts.
55+
4656
## Continuous integration
4757

4858
Instead of performing these deployments manually, you can enlist the help of a CI tool such as Travis or Jenkins.

0 commit comments

Comments
 (0)