Quantcast
Channel: Gunnar – MS Dynamics NAV Guru
Viewing all articles
Browse latest Browse all 23

Using AdvaniaGIT – FTP server for teams

$
0
0

So, you are not the only one in your company doing development, right?

Essential part of being able to develop C/AL is to have a starting point.  That starting point is usually where you left of last time you did some development.  If you are starting a task your starting point may just be the localized release from Microsoft.

A starting point in AdvaniaGIT is a database backup.  The database backup can contain data and it should.  Data to make sure that you as a developer can do some basic testing of the solution you are creating.

AdvaniaGIT has a dedicated folder (C:AdvaniaGITBackup) for the database backups.  That is where you should put your backups.

If you are working in teams, and even if not you might not want to flood your local drive with database backups.  That is why we configure an FTP server in C:AdvaniaGITDataGITSetting.json.

{
    "ftpServer":  "ftp://ftp02.hysing.is/",
    "ftpUser":  "ftp_sourcetree",
    "ftpPass":  "*****",
    "licenseFile":  "Advania.flf",
    "workFolder":  "C:NAVManagementWorkFolderWorkspace",
    "patchNoFunction":  "Display-PatchDayNo",
    "defaultDatabaseServer":  "localhost",
    "defaultDatabaseInstance":  "",
    "objectsNotToDelete":  "(14125500..14125600)",
    "sigToolExecutable":  "C:Program Files (x86)Windows Kits10binx64signtool.exe",
    "codeSigningCertificate":  "CodeSign_Certificate.pfx",
    "codeSigningCertificatePassword":  "****",
    "setupPath":  "setup.json",
    "objectsPath":  "Objects",
    "deltasPath":  "Deltas",
    "reverseDeltasPath":  "ReverseDeltas",
    "extensionPath":  "Extension1",
    "imagesPath":  "Images",
    "screenshotsPath":  "ScreenShots",
    "permissionSetsPath":  "PermissionSets",
    "addinsPath":  "Addins",
    "languagePath":  "Languages",
    "tableDataPath":  "TableDatas",
    "customReportLayoutsPath":  "CustomReportLayouts",
    "webServicesPath":  "WebServices",
    "binaryPath":  "Binaries",
    "testObjectsPath":  "TestObjects",
    "datetimeCulture":  "is-IS",
    "NewSyntaxPrefix":  "NewSyntax",
    "targetPlatform":  "DynamicsNAV",
    "VSCodePath":  "AL"
}

When we start an action to build NAV development environment the AdvaniaGIT tools searches for a database backup.

The search is both on C:AdvaniaGITBackup and also on the root of the FTP server.

Using the function Get-NAVBackupFilePath to locate the desired backup file it will search based on these patterns.

$FilePatterns = @(
        "$($SetupParameters.navRelease)-$($SetupParameters.projectName).bak",
        "$($SetupParameters.navRelease)/$($SetupParameters.navVersion)/$($SetupParameters.projectName).bak",
        "$($SetupParameters.navRelease)/$($SetupParameters.projectName).bak",
        "$($SetupParameters.navRelease)-$($SetupParameters.navSolution).bak"
        "$($SetupParameters.navRelease)/$($SetupParameters.navVersion)/$($SetupParameters.navSolution).bak",
        "$($SetupParameters.navRelease)/$($SetupParameters.navSolution).bak")

The navRelease is the year (2016,2017,…).  The navVersion is the build (9.0.46045.0,9.0.46290.0,10.0.17972.0,…)

The projectName and navSolution parameters are defined in Setup.json (settings file) in every GIT branch.

{
  "branchId": "3ba8870a-0274-4162-8ea2-66e314bb3e34",
  "navSolution":  "IS",
  "storeAllObjects":  "true",
  "navVersion":  "9.0.48992.0",
  "projectName": "ADIS",
  "baseBranch": "IS",
  "uidOffset": "10000200",  
  "objectProperties": "true",
  "datetimeCulture":  "is-IS"
}

Combining these values we can see that the search will be done with these patterns.

$FilePatterns = @(
        "2016-ADIS.bak",
        "2016/9.0.48992.0/ADIS.bak",
        "2016/ADIS.bak",
        "2016-IS.bak"
        "2016/9.0.48992.0/IS.bak",
        "2016/IS.bak")

And these file patterns are applied both to C:AdvaniaGITBackup and to the FTP server root folder.  Here are screenshots from our FTP server.

Looking into the 2017 folder

And into one of the build folders

My local backup folder is simpler

This should give you some idea on where to store your SQL backup files.

 

 


Viewing all articles
Browse latest Browse all 23

Trending Articles