TMP Developer
TMP Developer

Reputation: 19

Perforce: how to track file "deployments"

We are a very small team using Oracle Forms / Reports as development tools, and we're using no version control at the moment. We are considering using Perforce as our version control software.

Our current policy is any developer in the team can make changes to any source file, then deploy (manually copy) the generated executable files (.fmx) to our production folders.

With Perforce, our policy will be basically the same, we just need to record and track the source file changes as well as the deployments to our production folders.

The tracking of source code changes is straight forward. But how do we track the deployments with Perforce? If this can't be done with Perforce, can any other version control software such as Subversion, Git, Mercurial, etc. do it?

Upvotes: 1

Views: 259

Answers (2)

randy-wandisco
randy-wandisco

Reputation: 3659

I'd suggest this arrangement:

  • Use one Perforce depot for source code changes
  • Use another depot for the binary artifacts you want to deploy
  • Have some process (perhaps continuous integration) build and check in the artifacts
  • On each deployment target, maintain a Perforce workspace that maps in the appropriate build artifacts.
  • On each deployment target, set up a cron job or scheduled task that simply syncs the Perforce workspace at some interval. Alternatively, you can use a review daemon to let the deployment targets know when to run the sync.

I like this setup for a few reasons:

  • You have full traceability between the source and build artifacts
  • You can easily report on which versions of artifacts are deployed to any target
  • You can use Perforce tools to verify the integrity of the artifacts on each target

Upvotes: 2

Josh Heitzman
Josh Heitzman

Reputation: 1834

Based on our discussion in the comments on the question, I believe what you are looking for is the triggers feature of Perforce.

From the linked page is an example:

change-submit  //depot/....exe  "/usr/bin/test.pl %change%"

of configuring Perforce to run a test script whenever an .exe file is checked in to the depot. In your case it would be a .fmx rather than a .exe and you might wish to narrow the trigger from the entire depot to a specific directory.

Upvotes: 2

Related Questions