Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1057

Open
Created Oct 05, 2021 by Xavier Thompson@xavier_thompsonOwner
  • Report abuse
Report abuse

html5as-tutorial: Add a custom promise demo

  • Overview 9
  • Commits 1
  • Changes 5

Add a custom promise demo to the hml5as tutorial to show how to write plugin promises.

The custom promise merely checks if a file exists, and is used in the tutorial to check that the index.html file that will be served by the instance exists.

We use the new options added in the slapos.cookbook:promise.plugin recipe by https://lab.nexedi.com/nexedi/slapos/merge_requests/1058 to make creating a custom promise as simple as writing a file and downloading it.

In more details:

  • Add a custom promise directly in the SR in promise/check_index_exists.py
  • Download this promise.py file
  • Add the promise in the instance using the new file option of slapos.cookbook:promise.plugin recipe
Edited Oct 22, 2021 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: html5as-tutorial
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7