diff --git a/pages/CHANGELOG.md b/docs/CHANGELOG.md similarity index 100% rename from pages/CHANGELOG.md rename to docs/CHANGELOG.md diff --git a/pages/articles/index.md b/docs/articles/index.md similarity index 100% rename from pages/articles/index.md rename to docs/articles/index.md diff --git a/pages/contact.md b/docs/contact.md similarity index 100% rename from pages/contact.md rename to docs/contact.md diff --git a/pages/index.md b/docs/index.md similarity index 100% rename from pages/index.md rename to docs/index.md diff --git a/pages/operations/index.md b/docs/operations/index.md similarity index 100% rename from pages/operations/index.md rename to docs/operations/index.md diff --git a/pages/projects/gitlab-ci/conventional_commits.md b/docs/projects/gitlab-ci/conventional_commits.md similarity index 94% rename from pages/projects/gitlab-ci/conventional_commits.md rename to docs/projects/gitlab-ci/conventional_commits.md index 04c61da..99db485 100644 --- a/pages/projects/gitlab-ci/conventional_commits.md +++ b/docs/projects/gitlab-ci/conventional_commits.md @@ -119,5 +119,16 @@ In addition to the required variables above, the commitizen config file `.cz.yam ### Artifacts + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "conventional_commits/.gitlab-ci.yml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/git_mirror.md b/docs/projects/gitlab-ci/git_mirror.md similarity index 90% rename from pages/projects/gitlab-ci/git_mirror.md rename to docs/projects/gitlab-ci/git_mirror.md index c65eb0a..7c21c65 100644 --- a/pages/projects/gitlab-ci/git_mirror.md +++ b/docs/projects/gitlab-ci/git_mirror.md @@ -73,5 +73,16 @@ This will cause the job to only run on the `development` branch. - None + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "git_push_mirror/.gitlab-ci.yml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/gitlab_release.md b/docs/projects/gitlab-ci/gitlab_release.md similarity index 96% rename from pages/projects/gitlab-ci/gitlab_release.md rename to docs/projects/gitlab-ci/gitlab_release.md index d28dcf8..8deec0f 100644 --- a/pages/projects/gitlab-ci/gitlab_release.md +++ b/docs/projects/gitlab-ci/gitlab_release.md @@ -140,5 +140,16 @@ This CI job's workflow is: - `Gitlab Release` > None + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "gitlab_release/.gitlab-ci.yml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/index.md b/docs/projects/gitlab-ci/index.md similarity index 100% rename from pages/projects/gitlab-ci/index.md rename to docs/projects/gitlab-ci/index.md diff --git a/pages/projects/gitlab-ci/markdown_lint.md b/docs/projects/gitlab-ci/markdown_lint.md similarity index 90% rename from pages/projects/gitlab-ci/markdown_lint.md rename to docs/projects/gitlab-ci/markdown_lint.md index 29c208f..71c49ef 100644 --- a/pages/projects/gitlab-ci/markdown_lint.md +++ b/docs/projects/gitlab-ci/markdown_lint.md @@ -59,5 +59,16 @@ Markdown Linting: - JUnit test report located at `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml` + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "lint/markdown.gitlab-ci.yaml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/mkdocs-build.md b/docs/projects/gitlab-ci/mkdocs-build.md similarity index 91% rename from pages/projects/gitlab-ci/mkdocs-build.md rename to docs/projects/gitlab-ci/mkdocs-build.md index 632758b..bb7e903 100644 --- a/pages/projects/gitlab-ci/mkdocs-build.md +++ b/docs/projects/gitlab-ci/mkdocs-build.md @@ -66,5 +66,16 @@ MKDocs build: - files in `"$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"` + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "mkdocs/.gitlab-ci.yml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/python.md b/docs/projects/gitlab-ci/python.md similarity index 93% rename from pages/projects/gitlab-ci/python.md rename to docs/projects/gitlab-ci/python.md index 05e2d04..6484c21 100644 --- a/pages/projects/gitlab-ci/python.md +++ b/docs/projects/gitlab-ci/python.md @@ -105,5 +105,16 @@ PyLint: - `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html` - html code quality report + +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "python/.gitlab-ci.yml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/gitlab-ci/templates/ansible_roles.md b/docs/projects/gitlab-ci/templates/ansible_roles.md similarity index 100% rename from pages/projects/gitlab-ci/templates/ansible_roles.md rename to docs/projects/gitlab-ci/templates/ansible_roles.md diff --git a/pages/projects/gitlab-ci/templates/docker_container.md b/docs/projects/gitlab-ci/templates/docker_container.md similarity index 100% rename from pages/projects/gitlab-ci/templates/docker_container.md rename to docs/projects/gitlab-ci/templates/docker_container.md diff --git a/pages/projects/gitlab-ci/templates/index.md b/docs/projects/gitlab-ci/templates/index.md similarity index 100% rename from pages/projects/gitlab-ci/templates/index.md rename to docs/projects/gitlab-ci/templates/index.md diff --git a/pages/projects/gitlab-ci/templates/website.md b/docs/projects/gitlab-ci/templates/website.md similarity index 100% rename from pages/projects/gitlab-ci/templates/website.md rename to docs/projects/gitlab-ci/templates/website.md diff --git a/pages/projects/gitlab-ci/yaml_lint.md b/docs/projects/gitlab-ci/yaml_lint.md similarity index 90% rename from pages/projects/gitlab-ci/yaml_lint.md rename to docs/projects/gitlab-ci/yaml_lint.md index 63d1b51..c4ca22a 100644 --- a/pages/projects/gitlab-ci/yaml_lint.md +++ b/docs/projects/gitlab-ci/yaml_lint.md @@ -65,5 +65,15 @@ Yaml Lint (python 3.6): - `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log` - Linter log +## Gitlab job Definition + +When you include this definition the following makes up the job definition + +``` yaml title=".gitlab-ci.yml" linenums="1" + +--8<-- "lint/yaml.gitlab-ci.yaml" + +``` + !!! Note Docs Still under development diff --git a/pages/projects/ansible-roles/index.md b/docs/projects/index.md similarity index 100% rename from pages/projects/ansible-roles/index.md rename to docs/projects/index.md diff --git a/pages/tags.md b/docs/tags.md similarity index 100% rename from pages/tags.md rename to docs/tags.md diff --git a/lint/markdown.gitlab-ci.yaml b/lint/markdown.gitlab-ci.yaml index fafed23..cf89674 100644 --- a/lint/markdown.gitlab-ci.yaml +++ b/lint/markdown.gitlab-ci.yaml @@ -36,13 +36,13 @@ - when: never -.Lint_Markdown_Pages: +.Lint_Markdown_Docs: variables: - MDLINT_PATHS: "pages/*.md pages/**/*.md pages/**/**/*.md pages/**/**/**/*.md pages/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template" + MDLINT_PATHS: "docs/*.md docs/**/*.md docs/**/**/*.md docs/**/**/**/*.md docs/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template" MD_LINT_CONFIG_PATH: "$CI_PROJECT_DIR/website-template" extends: .Lint_Markdown rules: - if: '$CI_COMMIT_BRANCH' exists: - - "pages/index.md" + - "docs/index.md" - when: never \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 9d8d95f..51182ea 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,8 +1,10 @@ INHERIT: website-template/mkdocs.yml +docs_dir: 'docs' + repo_name: Gitlab-CI repo_url: https://gitlab.com/nofusscomputing/projects/gitlab-ci -edit_uri: '/-/ide/project/nofusscomputing/projects/gitlab-ci/edit/development/-/pages/' +edit_uri: '/-/ide/project/nofusscomputing/projects/gitlab-ci/edit/development/-/docs/' nav: - Home: index.md diff --git a/mkdocs/.gitlab-ci.yml b/mkdocs/.gitlab-ci.yml index 3426de5..a961895 100644 --- a/mkdocs/.gitlab-ci.yml +++ b/mkdocs/.gitlab-ci.yml @@ -4,7 +4,7 @@ variables: GIT_DEPTH: 0 MKDOCS_BUILD_PATH: build - MKDOCS_SOURCE_PATH: pages + MKDOCS_SOURCE_PATH: docs DEFAULT_ROOT_DIR: './gitlab-ci' before_script: - mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME" @@ -12,6 +12,7 @@ - echo "[DEBUG] ROOT_DIR[$ROOT_DIR]" - if [ ! -f "requirements.txt" ]; then pip install --upgrade pip -r $ROOT_DIR/mkdocs/requirements.txt; fi - if [ -f "requirements.txt" ]; then pip install --upgrade pip -r $ROOT_DIR/mkdocs/requirements.txt; pip install -r requirements.txt; fi + - if [ -f "website-template/requirements.txt" ]; then pip install --upgrade pip -r $ROOT_DIR/mkdocs/requirements.txt; pip install -r website-template/requirements.txt; fi script: - mkdocs build --clean --strict - mv "$MKDOCS_BUILD_PATH" "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$MKDOCS_BUILD_PATH" diff --git a/pages/projects/index.md b/pages/projects/index.md deleted file mode 100644 index e69de29..0000000 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e15da8c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,15 @@ +# ToDo: Delete this file once the below has been added to the website-template repo +mkdocs-minify-plugin==0.5.0 +mkdocs-material-extensions==1.0.3 +wheel +mkdocs-material==8.1.7 +./website-template/custom-plugins/mkdocs-plugin-tags +mkdocs-git-revision-date-localized-plugin==0.11.1 +pymdown-extensions==9.5 +Jinja2==3.0.3 + +Pygments==2.13.0 + + +#mkdocs-macros-plugin==0.7.0 + diff --git a/template/website.gitlab-ci.yaml b/template/website.gitlab-ci.yaml index 2087439..acc8648 100644 --- a/template/website.gitlab-ci.yaml +++ b/template/website.gitlab-ci.yaml @@ -8,10 +8,12 @@ include: Website.Lint: - extends: .Lint_Markdown_Pages + extends: .Lint_Markdown_Docs Website.Build: + variables: + MKDOCS_SOURCE_PATH: docs extends: .MKDocs_Build needs: [ 'Website.Lint' ]