EnForce

a development and CI supporting tool

…it’s focused on providing utilities for a Salesforce development environment, making it easier to implement a Continuous Integration process for your Salesforce project! Fork me on GitHub

What?

EnForce is …

a plugin for

Gradle Logo

a plugin for

Jenkins Logo

that provides useful tasks for implement a Continuous Integration process.

that integrates Salesforce unit test and code coverage reports in your Jenkins jobs.

a plugin for

Sonarqube Logo

that allows to perform a static analysis of the project's source code to keep it cleaner and according to the conventions and best practices.

Why?

Basically

because there are no out the box support for Continuous Integration on Salesforce.

  • Migration Tool is a basic tool that cannot support complex deployment scenarios where the source code has dependencies between its elements (classes, pages, objects).
  • No easy way to upload or retrieve code from a Salesforce Organization.
  • There are no available tools for junit reports or coverage reports.

Sounds good? Let’s go!

quickstart

Setup a gradle script file

  • Create build.gradle file on your source code project, below you have an example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
buildscript {
   repositories {
       mavenCentral()
       jcenter()
   }
   dependencies {
       classpath 'org.fundacionjala.gradle.plugins.enforce:enforce-gradle-plugin:1.1.5'
   }
}

apply plugin: 'enforce'

enforce {
    srcPath = 'src'
    deleteTemporaryFiles = true
}
1
2
3
4
5
   $ gradle addCredential  -Pid=default
                        -Pusername=<USER NAME>
                        -Ppassword=<PASSWORD> 
                        -Ptoken=<SECURITY TOKEN>
   #=> Creates an entry on the credentials store, credential id with 'default' value
  • When you want to upload your local code to your salesforce organization:
1
2
   $ gradle deploy
   #=> This command in the first time break the dependencies and then upload all your code.
  • When you want to upload only files changed to your salesforce organization:
1
   $ gradle update

Now you can start using all the EnForce features reviewing the Documentation.

documentation

All the documentation is available here

Below you have links to most important ones: * Quick start * Installation * Tutorials * Development * FAQ

contribute

Do you have a cool feature and want to share it? Use your fork on github! and submit a pull request. You can find information about setup your development environment at here

about

EnForce is a project donated to the community as an open source project by the Jalasoft Foundation.

You can find more information about the participants on this project here

faq

For more information about uses enter here