Commit 4c40929c authored by Fulcrand Guilhem's avatar Fulcrand Guilhem
Browse files

Merge branch 'latest' into '288-update-the-builder-to-add-default-stage-folder-and-pages-file'

# Conflicts:
#   tools/builder/builder.py
parents 59770e7e cab3cbb5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2,12 +2,14 @@ stages:
  - static_tests
  - project_setup
  - build
  - dynamic_tests
  - deploy

include:
  - remote: 'https://jobs.r2devops.io/links_checker.yml?scope=0.yml'
  - remote: 'https://jobs.r2devops.io/1.4.0/mkdocs.yml?scope=0.yml'
  - remote: 'https://jobs.r2devops.io/0.3.0/pages.yml?scope=0.yml'
  - remote: 'https://jobs.r2devops.io/lighthouse.yml?scope=0.yml'

ci_linter:
  stage: static_tests
+15 −3
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ from urllib.parse import quote, urlencode
import requests
from yaml import full_load, YAMLError
from jinja2 import Environment, FileSystemLoader, TemplateNotFound
import argparse

# Import the config module
from tools.utils.utils import Config
@@ -386,8 +387,6 @@ def add_placeholder():
                template = env.get_template(utils.TEMPLATE_PLACEHOLDER)
                file_handle.write(template.render())



def create_arrange_pages():
    """ Create arrange .pages for mkdocs to sort the list of stage in job page

@@ -411,6 +410,16 @@ def create_arrange_pages():
        logging.error(error)
        sys.exit(1)

def argparse_setup():
    """Setup argparse

    Return
    ------
    obj
        Python object with arguments parsed
    """
    parser = argparse.ArgumentParser()
    return parser.parse_args()

def main():
    """
@@ -421,6 +430,9 @@ def main():
    - Create jobs index
    """

    # Setup argparse
    args = argparse_setup()

    # logging
    logging.basicConfig(level=logging.INFO)

+2 −2
Original line number Diff line number Diff line
@@ -85,9 +85,9 @@
        {{ version.url }}
        ```
    {% for line in version.changelog %}
        {%- if line %}
        {% if line -%}
        {{ line }}
        {%- endif %}
        {% endif -%}
    {%- endfor %}
    {% endfor %}

+15 −2
Original line number Diff line number Diff line
@@ -8,13 +8,12 @@ import sys
from urllib.parse import quote, urlencode
from os import getenv, listdir
import requests
import argparse

# Import the config module
from tools.utils.utils import Config
utils = Config()



def get_labels(project_name, with_counts=False, include_ancestor_groups=True, search=""):
    """Get labels of the project, can also serach for a specific label with search filter

@@ -99,6 +98,17 @@ def delete_label(project_name, label_name):
    logging.info(f"Deleting a label {label_name} for the project {project_name}")
    return (requests.delete(url, headers=headers))

def argparse_setup():
    """Setup argparse

    Return
    ------
    obj
        Python object with arguments parsed
    """
    parser = argparse.ArgumentParser()
    return parser.parse_args()

if __name__ == "__main__":
    """Main function if used as a program
    Looping through all jobs to check if their scoped
@@ -109,6 +119,9 @@ if __name__ == "__main__":
    boolean
        0 if nothing is wrong, 1 otherwise
    """
    # Setup argparse
    args = argparse_setup()

    # Setup logging
    logging.basicConfig(
        encoding="utf-8",