Exemplo n.º 1
0
    def __init__(self):
        self.url = "https://cfengine.com/release-data/enterprise/releases.json"
        self.data = get_json(self.url)
        self.supported_branches = []
        for branch in self.data["lts_branches"]:
            expires = branch["supported_until"]
            expires += "-25"
            # Branch expires 25th day of month
            # This is exact enough and avoids problems with leap years
            if not is_in_past(expires):
                self.supported_branches.append(branch["branch_name"])
            else:
                log.info("LTS branch {} expired on {}".format(branch["branch_name"], expires))

        self.releases = []
        for release in self.data["releases"]:
            rel = Release(release)
            if "status" in release and release["status"] == "unsupported":
                continue
            if "lts_branch" not in release and "latest_stable" not in release:
                continue
            if "lts_branch" in release and release["lts_branch"] not in self.supported_branches:
                continue
            if "latestLTS" in release and release["latestLTS"] == True:
                self.default = rel
                rel.default = True
            self.releases.append(rel)
Exemplo n.º 2
0
    def __init__(self):
        self.url = "https://cfengine.com/release-data/enterprise/releases.json"
        self.data = get_json(self.url)
        self.supported_branches = []
        for branch in self.data["lts_branches"]:
            expires = branch["supported_until"]
            expires += "-25"
            # Branch expires 25th day of month
            # This is exact enough and avoids problems with leap years
            if not is_in_past(expires):
                self.supported_branches.append(branch["branch_name"])
            else:
                log.info("LTS branch {} expired on {}".format(branch["branch_name"], expires))

        self.releases = []
        for release in self.data["releases"]:
            rel = Release(release)
            if "status" in release and release["status"] == "unsupported":
                continue
            if "lts_branch" not in release and "latest_stable" not in release:
                continue
            if "lts_branch" in release and release["lts_branch"] not in self.supported_branches:
                continue
            if "latestLTS" in release and release["latestLTS"] == True:
                self.default = rel
                rel.default = True
            self.releases.append(rel)
Exemplo n.º 3
0
 def init_download(self):
     self.extended_data = get_json(self.url)
     artifacts = self.extended_data["artifacts"]
     self.artifacts = []
     for header in artifacts:
         for blob in artifacts[header]:
             artifact = Artifact(blob)
             artifact.add_tag(header)
             self.artifacts.append(artifact)
Exemplo n.º 4
0
 def init_download(self):
     self.extended_data = get_json(self.url)
     artifacts = self.extended_data["artifacts"]
     self.artifacts = []
     for header in artifacts:
         for blob in artifacts[header]:
             artifact = Artifact(blob)
             artifact.add_tag(header)
             self.artifacts.append(artifact)