Git Product home page Git Product logo

sfdo-tooling / cumulusci Goto Github PK

View Code? Open in Web Editor NEW
350.0 50.0 234.0 98.71 MB

Python framework for building portable automation for Salesforce projects

Home Page: http://cumulusci.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

Python 97.45% Makefile 0.07% RobotFramework 2.20% CSS 0.05% HTML 0.13% Smarty 0.07% JavaScript 0.04%
salesforce continuous-integration github sfdx

cumulusci's People

Contributors

aditya-balachander avatar almostthor avatar bethbrains avatar boakley avatar carlosvl avatar cdcarter avatar ceiroa avatar codexmarcel avatar cpolcyn avatar davidjray avatar davidmreed avatar davisagli avatar force2b avatar github-actions[bot] avatar jkasturi-sf avatar jlantz avatar jofsky avatar jstvz avatar julian88tex avatar justinvholt avatar matthewblanski avatar naicigam avatar pyup-bot avatar sfdcale avatar spelak-salesforce avatar szandor72 avatar thebitshepherd avatar topherlandry avatar vmarasow avatar vsbharath avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cumulusci's Issues

Zip unpackaged pre/post bundles and add to GitHub Release

When creating a GitHub Release, upload the unpackaged/pre and unpackaged/post bundles from the package as individual zip attachments to the Release.

Also, pass the zip url to mrbelvedere to configure the bundles for installation.

Question: Does storing zips from every build potentially create issues with limits in GitHub?

Make package availability timeout available in Codeship environment variable

Currently, we use a loop with a hard coded count of 5 iterations to try to install a newly created beta package. Typically, this is enough time for a new package to be copied between pods and available for installation.

However, a better approach is to use time rather than number of iterations. Loop through trying to install the package and at the end of each loop where the installation failed, find if we have been trying for longer than the timeout value. If so, stop the loop and fail otherwise keep trying.

Auto-create unmanaged package when deploying unmanaged code

Currently, you have to manually create the unmanaged package in a new DE org before you can deploy unmanaged code into it. I incorrectly assumed you can't create the unmanaged package via the MDAPI because we got INVALID_CROSS_REFERENCE_ID errors when trying to run deployCI against a new DE org. It turns out that the only reason that happens is that the uninstall target which runs at the start of the build tries to retrieve metadata from the package which is when the error occurs.

I think the solution is to do an empty deployment at the start of the build using a package.xml file with the <fullName> element set which should create the unmanaged package in the target org.

Queue concurrent feature branch builds at Codeship

How can we handle the following scenario when an organization has >1 concurrent build for their Codeship account:

  1. User A pushes feature/User-A-Code branch on repo my_package
  2. Codeship starts build of feature/User-A-Code to the my_package.feature org
  3. User B pushes feature/User-B-Code branch on repo my_package
  4. Codeship starts a concurrent build of feature/User-B-Code to the my_package.feature org
  5. feature/User-B-Code build fails due to the my_package.feature org is still deploying feature/User-A-Code branch

Add deployDevOrg target to setup new DE orgs

The deployDevOrg target should do pretty much everything the deployCI build does except it should not run all tests. It should also have its own pre and post hook targets so projects can override the configuration of developer orgs.

updatePackageXml should ignore vi's .<file>.swp files

When editing a file in vi, a swap file is stored. The updatePackageXml target processes the swap file. For example, if you have vi open on MyObject.object, you will also have a .MyObject.object.swp file. You wind up with MyObject and .MyObject listed in the package.xml. The package xml generation should ignore these files.

Workflow object incorrectly included in destructiveChanges.xml

When you run the uninstall target in a repository which has Workflows, the following error occurs:

Error: Cannot delete a workflow object; Workflow Rules and Actions must be deleted individually

Need to figure out a way to selectively exclude single file based metadata from the destructiveChanges.xml generation.

Auto-Assign field permissions to all profiles

When I deploy a github project into a new dev org, I would like for all profiles to have full access to all incoming metadata. When I recently ran through the org-init process, I don't think field security was assigned, because I'm now having to go back into the profile config and enable all tabs, as well as enable read/write on all fields in the packaged code.

Add support for more metadata types...

For one potential user, the following metadata types need to be supported by the build scripts:

ConnectedApp
CustomObjectTranslation
Profile
ReportType
Translations

Filter out unnecessary ant output in codeship.sh

Some of the ant macros spit out a lot of unnecessary output to STDOUT. Ant provides no means to turn off that output, but since codeship.sh calls the ant tasks it can filter the STDOUT from them to remove the unnecessary lines.

We need to make sure that we're showing the build status to date and that we can correctly capture the exit status of the ant command.

Make package_upload.py tolerant of spaces in cumulusci.properties

Selenium build appears to fail if the property key and value are separated like: ' = ' instead of run together like: '='.

Failed:

cumulusci.package.name.managed = rC Bios

Passed:

cumulusci.package.name.managed=rC Bios

Failure traceback:

deployUnpackagedPost:

BUILD SUCCESSFUL
Total time: 5 minutes 28 seconds
Requirement already up-to-date: selenium in /home/rof/.virtualenv/lib/python2.7/site-packages
Cleaning up...
Requirement already up-to-date: requests in /home/rof/.virtualenv/lib/python2.7/site-packages
Cleaning up...
Starting browser
Loaded package listing page
Traceback (most recent call last):
File "../CumulusCI/ci/package_upload.py", line 232, in <module>
uploader.build_package(build_name)
File "../CumulusCI/ci/package_upload.py", line 132, in build_package
driver.find_element_by_xpath("//th[contains(@class,'dataCell')]/a[text()='%s']" % self.package).click()
File "/home/rof/.virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 230, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/rof/.virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 662, in find_element
{'using': by, 'value': value})['value']
File "/home/rof/.virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 173, in execute
self.error_handler.check_response(response)
File "/home/rof/.virtualenv/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 166, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: u'Unable to locate element: {"method":"xpath","selector":"//th[contains(@class,\'dataCell\')]/a[text()=\'cumulusci.package.name.managed = rC Bios\']"}' ; Stacktrace: 
at FirefoxDriver.prototype.findElementInternal_ (file:///tmp/tmpKpv9s8/extensions/[email protected]/components/driver-component.js:9618:7)
at fxdriver.Timer.prototype.setTimeout/<.notify (file:///tmp/tmpKpv9s8/extensions/[email protected]/components/driver-component.js:548:5) 

Set up test builds for CumulusCI

Related to #44

Once the test repository exists, configure a Codeship project to test all commits of the CumulusCI repository and start using CumulusCI on CumulusCI (sort of) to create a more stable release process.

Create documentation on working around prefix issues

Our dev process is based on the premise that the project's code will work the same in developer orgs and in the packaging org. We should document the places where the namespace is and isn't automatically resolved, and describe the workarounds for the latter.

Add support for @deprecated

Since CumulusCI is designed to support the same package code being deployed into both unmanaged and managed packages, there is a challenge of how to support the @deprecated annotation which is only valid when deployed to the packaging org.

The solution is likely to use a commented annotation and have a build target remove the comment (i.e. from //@deprecated to @deprecated) before deploying to the packaging org via deployCIPackageOrg. This way, developers working on unmanaged code would still be able to deploy the code in the repo to their orgs making the development experience with tools like the Force.com IDE a lot more pleasant. Deployments to the packaging org shouldn't be happening from the Force.com IDE but instead via the deployCIPackageOrg target so dynamically modifying the code only for managed deployments seems reasonable.

Expanding the test execution properties

Being able to specify both parallel testing as well as include/exclude values would be great!

cumulusci.test.parallel=true
cumulusci.test.namematch.include=%Test,rC_%Tests_%
cumulusci.test.namematch.exclude=rC_DeveloperLocalTests_%

Additionally, being able to override this with an environment variable would be great! That we our feature branch builds would use the fast tests, and the master builds would use the full test suite.

export CUMULUSCI_TEST_NAMEMATCH_INCLUDE=FastTests_%

Integration with CircleCI

Implement support for CircleCI as an easy to setup automation alternative to Jenkins for running the process automation.

Remove hard coded branch and tag prefixes

Currently, some of the python scripts hard code the branch prefixes. These should get passed as environment variables to override or set to the default values feature/ master beta/ and release/

Study making it a Maven project

Advantages:

  • We could make the dependencies be Maven dependencies. Like:
    • AntUnit (new dependency - to test ant script)
    • Ant Contrib (already a dependency)
  • We could create an archetype for new projects (existing projects could be added the necessary files through a specific target)

Calling Ant from Maven should not be a problem, since we can use the Maven AntRun plugin (https://maven.apache.org/plugins/maven-antrun-plugin/). We can also use Maven from Ant with https://maven.apache.org/ant-tasks/.

Change from OAuth to username/password/token in package_upload.py

Currently, package_upload.py uses an OAuth token to log into the packaging org. With cloud CI platforms like Codeship.io and CircleCI, you already have to configure the packaging org's username, password, and security token so it makes more sense to just use those in selenium rather than requiring the configuration of OAuth.

Integration with Codeship.io

Finish the integration with Codeship.io to provide the automation layer as an easier to setup alternative to Jenkins.

Add hooks for custom overrides in project's build.xml

The following hooks should be added to avoid the need to override the base targets:

preDeployCI - Runs at the start of the deployCI target
preDeployCIPackageOrg - Runs at the start of the deployCIPackageOrg target
preDeployManaged - Runs at the start of the deployManaged target
preDeployManagedBeta - Runs at the start of the deployManagedBeta target
preDeployWithoutTest - Runs at the start of the deployWithoutTest target
postDeployCI - Runs at the end of the deployCI target
postDeployCIPackageOrg - Runs at the end of the deployCIPackageOrg target
postDeployManaged - Runs at the end of the deployManaged target
postDeployManagedBeta - Runs at the end of the deployManagedBeta target
postDeployWithoutTest - Runs at the end of the deployWithoutTest target

Example use case: A project has static resource bundle source files stored outside the src directory and wants to zip them up before any CI deployment. They want to create the static resource zips differently for unmanaged vs managed deployments.

In this use case, they would currently have to override some of the main targets. With these hooks in place, they could just override the hook while keeping the core functionality of the main targets.

Handle patch release workflow

The process for handling patch releases was considered but has not yet been implemented. Since NPSP 3.0 is deployed to everyone at once and we isolate all work in feature branches, we can easily cut new releases and push out for any issues that come up. Thus, we've never needed to do patch upgrades.

However, many projects face customer demands that require use of the patch release process. The solution is to create a branch to track the patch changes and ensure any fixes which need to be included in master get included. This probably means adding new build targets and automation scripts to support the process, however much of the existing process should be able to be leveraged for patch releases.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.