Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1012

Merged
Created Jul 09, 2021 by Lisa Casino@lisa.casinoContributor

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

  • Overview 15
  • Commits 1
  • 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
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: html5as-recipe-build
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7