Skip to content

canonical/snapcraft-poller-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snapcraft.io Snapcraft Poller Script

This script is executed regularly in our Kubernetes cluster to trigger builds for snaps that:

  • Parts dependencies defined in the snapcraft.yaml were changed (Only the ones that are GitHub repos)
  • The snap GitHub repo itself was changed since the last build.

This script is a Python version of the old javascript script.

How it works:

All the script does is:

  1. Get all the snaps created with the build.snapcraft.io user, and for each repo, it will:
  2. Verify the content in the repo:
    1. There is a snapcraft.yaml
    2. The snap name in the snapcraft.yaml is valid
  3. Get the date of the last built and skip if the snap was built in the previous 24h
  4. Trigger a build if any of the following condition happen:
    1. Repository of the snap has changed after the last built.
    2. Any of the GitHub repos from the parts defined in the snapcraft.yaml has changed since the last build.

About

This script is executed regularly to trigger builds for snaps that were updated - dependencies were changed (GitHub only), or the snap repo itself was changed.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published