> For the complete documentation index, see [llms.txt](https://jadelab.gitbook.io/jadegit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jadelab.gitbook.io/jadegit/0.18.0/admin/database-images/example/fresh.md).

# Fresh

The `fresh.yml` template builds a fresh database image for a given platform version by downloading the platform components, registering the database using licence details from the `Jade.Admin` variable group, and publishing the resulting empty image to the catalog. A dev image is then created from it using the `dev.yml` template.

```yaml
parameters:
- name: version
  type: string

- name: charset
  type: string

- name: preview
  type: boolean
  default: false

jobs:
- job: Fresh
  steps:
  - checkout: none

  - powershell: |
      (New-Object System.Net.WebClient).DownloadFile("https://secure.jadeworld.com/JADETech/latest/${{ parameters.version }}-"+ "${{ parameters.charset }}"[0] + "/JADE-${{ parameters.version }}-x64-${{ parameters.charset }}-binaries.zip", "$pwd\binaries.x64.zip")
      Expand-Archive -Path "binaries.x64.zip" -DestinationPath $(Build.StagingDirectory)\bin -Force
    workingDirectory: $(Agent.TempDirectory)
    displayName: "Download Binaries (x64)"

  - powershell: |
      (New-Object System.Net.WebClient).DownloadFile("https://secure.jadeworld.com/JADETech/latest/${{ parameters.version }}-"+ "${{ parameters.charset }}"[0] + "/JADE-${{ parameters.version }}-x86-${{ parameters.charset }}-binaries.zip", "$pwd\binaries.x86.zip")
      Expand-Archive -Path "binaries.x86.zip" -DestinationPath $(Build.StagingDirectory)\i686-msoft-win32-ansi\base\bin -Force
    workingDirectory: $(Agent.TempDirectory)
    displayName: "Download Binaries (x86)"

  - powershell: |
      (New-Object System.Net.WebClient).DownloadFile("https://secure.jadeworld.com/JADETech/latest/${{ parameters.version }}-"+ "${{ parameters.charset }}"[0] + "/JADE-${{ parameters.version }}-x64-${{ parameters.charset }}-sysfiles.zip", "$pwd\sysfiles.zip")
      Expand-Archive -Path "sysfiles.zip" -DestinationPath $(Build.StagingDirectory)\bin -Force
    workingDirectory: $(Agent.TempDirectory)
    displayName: "Download System Files"

  - powershell: |
      (New-Object System.Net.WebClient).DownloadFile("https://secure.jadeworld.com/JADETech/latest/${{ parameters.version }}-"+ "${{ parameters.charset }}"[0] + "/JADE-${{ parameters.version }}-${{ parameters.charset }}-db.zip", "$pwd\db.zip")
      Expand-Archive -Path "db.zip" -DestinationPath $(Build.StagingDirectory)\system -Force
    workingDirectory: $(Agent.TempDirectory)
    displayName: "Download Database"

  - powershell: |
      Out-File -FilePath "jade.ini"
      & bin\jadregb path=system ini=".\jade.ini" name= "$(jade.licence.name)" key=$(jade.licence.key)
    displayName: Register Database
    workingDirectory: $(Build.StagingDirectory)

  - template: publish.yml
    parameters:
      path: $(Build.StagingDirectory)
      database: fresh
      type: empty
      version: ${{ parameters.version }}
      charset: ${{ parameters.charset }}

- template: dev.yml
  parameters:
    database: fresh
    dependsOn:
      - Fresh
    version: ${{ parameters.version }}
    charset: ${{ parameters.charset }}
    preview: ${{ parameters.preview }}
```
