Appian version manager not working as expeced.

I am trying to use Appian version manager as given in Appian documentation.

https://community.appian.com/w/the-appian-playbook/198/deployment-automation#Automated_Versioning_Manager

I am trying to use -action as addContents and it is giving me an error as below

"java.lang.IllegalStateException: Error: the Zip file cannot be committed to the respository. The Zip file contains one or more application XML file and version toool has been invoked with paramameter -UUID signaling it should be patch"

 

I am using below command and also updated attributes/parameter in version-manager.properties file.

version-application.bat  -action addContents -vc_username (VC_USERNAME) -vc_password (VC_PASSWORD) -application_path "C:\\Users\\43987901\\Downloads\\Country Flag Icons.zip" -commit_message “Commit by@439879

below are parameter defined in version-manager.properties as well.

action=addContents

commitMessage="Commit by@439879"

localRepoPath=C:\\Developer_Appian

repoUrl=https://alm-github.uk.hsbc/HSBC-GST/Developer_Appian

uuid=_a-0000de51-e49e-8000-9ba2-011c48011c48_16348

vcPassword=GIT_Username

vcUsername=GIT_password

versionControlType=GIT
repoUrl=https://alm-github.systems.uk.hsbc/HSBC-GST/Developer_Appian

Can anyone please let me know probably cause for the above error....

Thanks in advance

  Discussion posts and replies are publicly visible

  • You will need to export the entire application for your first commit. Check the application from the list of applications in designer and export from there. Do not open the application and add objects to a patch. After you've committed this full application you will be able to start committing patches using the application's UUID.
  • 0
    A Score Level 1
    in reply to bradc
    Thanks a Lot bradc. After ages, I was able to successfully commited the application, took full application and ran command without UUID.

    so, just to confirm for my understanding, whenever we want to create any new application in git as per our application in appian(as branch in GIT) we want to follow same procedure where we can run command without UUID? once, git branch getting created, we will be able to commit the objects into git using UUID?
    We will be using uuid of Appian application?

    2018-03-15 20:10:15,413 [main] INFO com.appiancorp.ps.automatedversioning.VersionUtils - Successfully extracted file C:\Developer_Appian\application_files\META-INF/MANIFEST.MF
    2018-03-15 20:10:15,416 [main] INFO com.appiancorp.ps.automatedversioning.VersionUtils - Successfully extracted file C:\Developer_Appian\application_files\META-INF/export.log
    2018-03-15 20:10:15,417 [main] INFO com.appiancorp.ps.automatedversioning.VCSAndBuildController - Checking for DDLs
    2018-03-15 20:10:16,027 [main] INFO com.appiancorp.ps.automatedversioning.GitObject - Committed all changes to repository at C:\Developer_Appian\.git. Commit hash: 4d737d7d0af6b318d8c1604aefa5b6bcca8d2a6c
    2018-03-15 20:10:25,989 [main] INFO com.appiancorp.ps.automatedversioning.GitObject - Changes pushed successfully.
  • Yes, that is correct. Going forward, for this application you can simply export a patch with the objects you've modified and use the Appian UUID for this application. The AVM tool will then insert your objects from the patch into your repository.

    In my experience, we have created separate repositories for each Appian application rather than a branch. I am not sure how you intend to structure your git, but we use repositories for Appian applications and branches in each repository for development changes to each application.

    Happy to help!
  • Thanks again bradc, i have been tried to work by creating a branch for each of application in an Appian. but i found it bit difficult too. so, i am now trying to work like your way by creating seperate respositories.
    Now, i just want to understand that, do i need to create a branch in each respository for each of sprint or for each day where by each developer will update their work on? and then we have to remember first Hash comment and last comment to create a deployment patch out of it?
  • I think at this point it's up to your preference on how to manage branches. In my organization, we have a "development" branch where each developer branches from. When we have committed all our changes for a sprint and completed our unit testing, we will push our personal branch back to the development branch. This development branch is what is pushed to UA/prod when ready.

    Regarding your start & end hashes - these are optional. We use a start hash in our builds, which is the final commit to the development branch from the prior sprint. Keep in mind the start hash used is NOT included in the build. We have not yet had a scenario where the end hash was necessary because we've always wanted to use all commits. If you are trying to create a build in a range of commits, you would use an end hash.
  • Hi bradc, I hope you are doing good. i am getting an error after running command for build package option.

    Command

    version-application.bat -action buildPackage -vc_username 43987901 -vc_password passwd -start_hash 6ca23a9 -end_hash d6a4316

    i have used start hash df070738e05f33d88d0956ccab72ed831315b42e which was generated after running first addContents command while commiting application.
    I have also used commit alpha numeric number in github for this. This is my first buildpackage command, do i need to some thing else to make it successful?
    I also keep below option as uncommented in .properties file
    packagePath=C:\\Users\\43987901\\Desktop\\PROD_DEPLOY_BACKUP_10172017\\Test_Patch_VM_Mandar_sandbox

    2018-03-23 16:39:40,512 [main] ERROR com.appiancorp.ps.automatedversioning.AutomatedVersioningManager - Details of error:
    java.nio.file.FileAlreadyExistsException: C:\Users\43987901\Desktop\PROD_DEPLOY_BACKUP_10172017\Test_Patch_VM_Mandar_sandbox
    at com.appiancorp.ps.automatedversioning.helper.PackageGenerationHelper.getPackageFile(PackageGenerationHelper.java:164)
    at com.appiancorp.ps.automatedversioning.helper.PackageGenerationHelper.createZipFileFromChangedFiles(PackageGenerationHelper.java:76)
    at com.appiancorp.ps.automatedversioning.helper.PackageGenerationHelper.generatePackage(PackageGenerationHelper.java:55)
    at com.appiancorp.ps.automatedversioning.VCSAndBuildController.buildPackage(VCSAndBuildController.java:145)
    at com.appiancorp.ps.automatedversioning.AutomatedVersioningManager.main(AutomatedVersioningManager.java:116)
  • 0
    A Score Level 1
    in reply to viishweshs
    Hi Bradc, please ignore my previous comment, we were able to manage find out the error as i was not mentioned file name which i wanted to created over there. Thanks you so much one more time for all your help from last few days.
  • 0
    A Score Level 1
    in reply to bradc
    Hi Bradc, hope you are doing well, i am getting error when using version-application.bat for commiting .sql files "Source file doesnt exist". in .properties file, i am keeping ddlPath=C:\\Users\\43987901\\Downloads\\241_sql.sql and ddlDs=java:/jdbc/Appian, like this and running verion.bat file. can you please suggest what changes do i need to make for commiting .sql in repository? I have also tried ddlPath with sigle balck slash (\) with no luck.
  • Hello - I have actually not used the DDL feature myself as we handle all scripts via post-deployment scripting in our Visual Studio solution rather than Appian.

    Have you tried formatting your syntax differently?  I would try:

    -ddl_path "C:\\Users\\43987901\\Downloads\\241_sql.sql" -ddl_ds "java:/jdbc/Appian"

  • 0
    A Score Level 1
    in reply to bradc
    Thank you for prompt reply bradc, I have just tried opposite of what you have suggested and removed double quitos(") from both locations -ddl_path and -ddl_ds and it works. Thank you agian for your timely help.