Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • 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
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1012

html5as: from plone.recipe.command to slapos.recipe.build

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Lisa Casino requested to merge lisa.casino/slapos:html5as-recipe-build into master Jul 09, 2021
  • Overview 15
  • Commits 1
  • Pipelines 0
  • Changes 4

In the instance_html5as.cfg.in file, the downloader section has now the recipe slapos.recipe.build instead of plone.recipe.command.

The main goal is to stop using bash, and use python instead.

So, instead of using curl and tar like we did before:

command = 
  rm -rf ${html5as:docroot}/*; 
  URL = {{ parameter_dict['download_url'] }};
  if [ -n "$URL" ];
  then
    ${html5as:curl-binary} -Lks $URL | ${html5as:tar-binary} xzv -C ${html5as:docroot} --strip-components 1;
  else
    cp ${default_index_html:rendered} ${html5as:docroot}/;
  fi

we use fonctions such as download or extract and others that can be found in the slapos.recipe.build repository.

We can also remove rm -r and use the location option which indicates the path where the recipe stores any produced file. This directory will be automatically removed next time it runs if the recipe options change, so we don't have to use rm -rf anymore.

I've added some comments to help understand the code and answer your questions.

Edited Jul 12, 2021 by Lisa Casino
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: html5as-recipe-build
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7