141 Commits

Author SHA1 Message Date
9b57371358 build(version): bump version 0.6.1 → 0.7.0rc0 2024-02-02 08:22:51 +00:00
Jon
fc9f37617c feat(sub_module_update): wbsite-template
!44
2024-02-02 17:47:38 +09:30
Jon
3fa71fe91a fix(mkdocs): correct mkdocs image name
!73
2024-02-02 17:04:34 +09:30
Jon
6700cdbc90 Merge branch 'mkdocs-update' into 'development'
feat: Mkdocs update

Closes #43

See merge request nofusscomputing/projects/gitlab-ci!73
2024-02-02 07:28:55 +00:00
Jon
955ce37520 refactor(mkdocs): set env name to gitlab pages
!73 fixes #43
2024-02-02 16:57:20 +09:30
Jon
3fbd4317c0 feat(mkdocs): update requirements.txt to current versions
!73 nofusscomputing/infrastructure/website-template!13 nofusscomputing/infrastructure/website!44
2024-02-02 16:45:19 +09:30
Jon
c4087c7069 feat(mkdocs): update python to 3.11.2
!73 nofusscomputing/infrastructure/website-template!13 nofusscomputing/infrastructure/website!44
2024-02-02 16:19:44 +09:30
Jon
bd22ff566c Merge branch '44-fix-commit-footer-refs' into 'development'
fix(commit_footer_refs): enable automated jobs without MR to succeed.

Closes #44

See merge request nofusscomputing/projects/gitlab-ci!72
2023-11-18 06:42:22 +00:00
Jon
0f6e06c50f fix(commit_footer_refs): enable automated jobs without MR to succeed.
automated jobs use !not for MR

fixes #44 !72
2023-11-18 16:11:26 +09:30
Jon
67199ccc55 Merge branch '42-fix-commit-foot-refs' into 'development'
fix(commit_footer_refs): dont update git submodules

Closes #42

See merge request nofusscomputing/projects/gitlab-ci!71
2023-11-12 05:03:22 +00:00
Jon
b8199586b4 fix(commit_footer_refs): dont update git submodules
this ci job requires only the gitlab-ci submodule with other submodules being not applicable.

!71 fixes #42 nofusscomputing/infrastructure/configuration-management/project-production!2
2023-11-12 14:30:53 +09:30
265bafde54 build(version): bump version 0.6.1rc8 → 0.6.1 2023-11-06 08:15:59 +00:00
Jon
5036fc1ccc Merge branch 'minor-fixes' into 'development'
chore: minor fixes

Closes #40

See merge request nofusscomputing/projects/gitlab-ci!70
2023-11-06 08:11:00 +00:00
Jon
3918686e48 feat(conventional_commits): do not run on master branch
!70 fixes #40
2023-11-06 17:36:55 +09:30
Jon
52f4ebda54 Merge branch '39-feat-git-submodule' into 'development'
feat: git submodule custome git message type

Closes #39

See merge request nofusscomputing/projects/gitlab-ci!69
2023-10-28 05:09:49 +00:00
Jon
8eb57c5809 feat(sub_module_update): enable passing commit type and category
!69 closes #39 nofusscomputing/projects/ansible/git_configuration!122 nofusscomputing/projects/gitlab-ci#39 nofusscomputing/projects/ansible/ansible-roles!96 nofusscomputing/infrastructure/config!28
2023-10-28 13:56:43 +09:30
Jon
a5a9fa4437 Merge branch '37-fix-builds' into 'development'
fix: builds

Closes #37

See merge request nofusscomputing/projects/gitlab-ci!68
2023-09-02 06:01:17 +00:00
Jon
86a0292faf feat(deploy): add new nfc repos
!68
2023-09-02 15:28:43 +09:30
Jon
535d0b4293 docs: update docker tag build
!68 #37
2023-09-02 15:28:43 +09:30
Jon
282128410d chore: remove commented code
!68 closes #37
2023-09-02 15:28:43 +09:30
Jon
837311c022 feat(release): annotate git tag with changelog
!68
2023-09-02 15:28:43 +09:30
Jon
e8758c4cce feat(build): no docs/docker build on master push, only tag
as a push to master branch is to create a release, no building should occur.

!68
2023-09-02 15:00:11 +09:30
Jon
0d7974152c feat(docker): add debugging to publish
required to determin if #36 is still an issue

!68 #36 nofusscomputing/projects/ansible/execution_environment#11
2023-09-02 14:53:10 +09:30
Jon
359c664d97 fix(docker): always build on tag
!68 fixes #37
2023-09-02 14:45:39 +09:30
Jon
975de7aca2 Merge branch 'chores-to-mr-pipeline' into 'development'
refactor: Chores to mr pipeline

See merge request nofusscomputing/projects/gitlab-ci!67
2023-07-04 02:01:23 +00:00
Jon
1a168593eb feat(deploy): added ansible.docker.os repo
!67
2023-07-04 11:30:38 +09:30
Jon
d21692f788 refactor(ansible): move submodule/issue patch to mr pipeline
!67
2023-07-04 11:27:23 +09:30
Jon
ebc3d93304 Merge branch 'fix-image-pull-policy' into 'development'
fix(build): adjust to enforce

See merge request nofusscomputing/projects/gitlab-ci!66
2023-06-28 04:30:30 +00:00
Jon
799de6c98c fix(build): adjust to enforce
!66
2023-06-28 13:58:19 +09:30
Jon
6a3ef23c61 Merge branch '38-fix-docker-build' into 'development'
feat(docker_publish): on merge to dev always publish

See merge request nofusscomputing/projects/gitlab-ci!65
2023-06-28 03:50:30 +00:00
Jon
9489c99fe4 feat(docker_publish): on merge to dev always publish
!65
2023-06-28 13:18:23 +09:30
Jon
fd570fa3df Merge branch '38-fix-docker-build' into 'development'
fix: docker build

See merge request nofusscomputing/projects/gitlab-ci!64
2023-06-28 03:12:52 +00:00
Jon
4ea999cec9 fix(docker): ensure on any changes to directory path, build occurs
!64 #38 nofusscomputing/projects/ansible/execution_environment!76
2023-06-28 12:40:27 +09:30
Jon
2492fdb17f Merge branch 'gitlab-issue-patch-automation' into 'development'
ci(deploy): added docker management repo

See merge request nofusscomputing/projects/gitlab-ci!63
2023-06-28 02:09:59 +00:00
Jon
f35d99dc43 ci(deploy): added docker management repo
!63
2023-06-28 11:37:51 +09:30
Jon
de2ec6a736 Merge branch 'gitlab-issue-patch-automation' into 'development'
fix(template): issue comment patch remove setting role path

See merge request nofusscomputing/projects/gitlab-ci!62
2023-06-28 02:06:45 +00:00
Jon
4da44b77df fix(template): issue comment patch remove setting role path
!62
2023-06-28 11:34:38 +09:30
Jon
cf33e1faf1 Merge branch 'gitlab-issue-patch-automation' into 'development'
feat: autojob mr from git patch found in gitlab issues

See merge request nofusscomputing/projects/gitlab-ci!61
2023-06-28 01:48:11 +00:00
Jon
da40e02737 feat(template): added auto job mr from issue comment patch
!61
2023-06-28 11:14:52 +09:30
Jon
d91605e377 Merge branch 'docs' into 'development'
docs: working on

See merge request nofusscomputing/projects/gitlab-ci!59
2023-06-15 04:22:50 +00:00
Jon
d9b303edc1 docs: expand
!59
2023-06-11 10:48:24 +09:30
1a03324ecc build(version): bump version 0.6.1rc7 → 0.6.1rc8 2023-06-08 05:41:34 +00:00
Jon
869faedf57 Merge branch 'fix-immediate' into 'development'
docs: added notes

See merge request nofusscomputing/projects/gitlab-ci!58
2023-06-08 05:37:59 +00:00
Jon
469255f450 docs: added notes
!58
2023-06-08 15:06:24 +09:30
Jon
606b19151e Merge branch 'fix-immediate' into 'development'
fix(ci): correct dockerhub tag

See merge request nofusscomputing/projects/gitlab-ci!57
2023-06-08 05:03:58 +00:00
Jon
4462ec0426 fix(lint): all lint to immediatly start job
!57
2023-06-08 14:27:04 +09:30
Jon
9b00af996f fix(ci): correct dockerhub tag
!57
2023-06-08 14:24:27 +09:30
Jon
ae8b936c5d Merge branch 'fix-immediate' into 'development'
fix(ci): remove spaces from regex exists and changes

See merge request nofusscomputing/projects/gitlab-ci!56
2023-06-08 03:45:19 +00:00
Jon
6af454be4d fix(ci): remove spaces from regex exists and changes
!56
2023-06-08 13:13:50 +09:30
Jon
0054a21e19 Merge branch 'fix-immediate' into 'development'
fix: immediate

Closes #33

See merge request nofusscomputing/projects/gitlab-ci!55
2023-06-08 02:37:25 +00:00
Jon
46d85bcf49 fix(ansible_lint): enable first level dir paths
!55
2023-06-08 12:04:19 +09:30
Jon
0ec520f023 feat(ci): add resource groups
!55 fixes #33
2023-06-07 16:50:45 +09:30
Jon
e75464c7c4 feat(sync): immediatee git sync
!55
2023-06-07 15:40:24 +09:30
Jon
755fcac06e feat(latest_artifacts): ensure artifats for jobs are always avail on branches
if the job is not available on the branches last run pipeline, any job
that tries to download the latest artifact by name will not find any
artifacts.

!54 See nofusscomputing/projects/gitlab-ci#34 gitlab-org/gitlab#331232
2023-06-07 13:37:51 +09:30
Jon
11b6209992 fix(docker_build): on success push container to docker hub
!53
2023-06-07 13:37:51 +09:30
Jon
0b5680deac Merge branch 'fix-immediate' into 'development'
fix(docker_build) init submodule submodules

See merge request nofusscomputing/projects/gitlab-ci!53
2023-06-07 03:47:37 +00:00
Jon
e90b938bba fix(docker_build): init submodule submodules
due to commit e2852ebe292bc838d95048515a8dca0d93ccbc24 the submodules submodules are not being initialized, which prevents that repos files from being used.

!53
2023-06-07 13:15:00 +09:30
Jon
f5bd9acebc Merge branch '34-workaround-job-not-available' into 'development'
refactor: latest job artifacts as specified by name are not available

See merge request nofusscomputing/projects/gitlab-ci!52
2023-06-07 03:23:47 +00:00
Jon
22dd4985be feat(latest_artifacts): ensure artifats for jobs are always avail on branches
if the job is not available on the branches last run pipeline, any job
that tries to download the latest artifact by name will not find any
artifacts.

!52 See nofusscomputing/projects/gitlab-ci#34 gitlab-org/gitlab#331232
2023-06-07 12:50:58 +09:30
928d625469 build(version): bump version 0.6.1rc6 → 0.6.1rc7 2023-06-05 19:08:10 +00:00
Jon
e57f7f0908 Merge branch 'fix-non-urgent' into 'development'
fix(mkdocs): adjust rules to match lint

See merge request nofusscomputing/projects/gitlab-ci!51
2023-06-05 18:57:56 +00:00
Jon
5ffc68d724 fix(mkdocs): adjust rules to match lint
!51
2023-06-06 04:26:28 +09:30
Jon
1e21ff2709 Merge branch 'fix-non-urgent' into 'development'
fix: non urgent

See merge request nofusscomputing/projects/gitlab-ci!50
2023-06-05 02:33:04 +00:00
Jon
6a149f6ed6 feat(ansible_lint): added inventory & playbooks directories
!50 nofusscomputing/infrastructure/config#22 nofusscomputing/infrastructure/config!27
2023-06-04 13:05:34 +09:30
Jon
1dcb3ed521 feat(ci): dont git submodule recurse
!50
2023-06-03 15:19:12 +09:30
Jon
f3256c5858 feat(commit_footer_refs): only run on changes
!50
2023-06-03 14:22:13 +09:30
Jon
097725c1be fix(docker): detect canges in include path corrected
!50
2023-06-03 13:20:23 +09:30
Jon
6201afaf7e Merge branch 'fix-pipeline-submodule' into 'development'
fix(ci): typo in docker build

See merge request nofusscomputing/projects/gitlab-ci!49
2023-06-03 02:05:12 +00:00
Jon
9e098245d7 fix(ci): typo in docker build
!49 nofusscomputing/projects/ansible/execution_environment!20
2023-06-03 11:33:24 +09:30
Jon
5b780df6fa Merge branch 'fix-pipeline-submodule' into 'development'
fix: pipeline submodule

See merge request nofusscomputing/projects/gitlab-ci!48
2023-06-03 01:36:14 +00:00
Jon
d8a6d5f7ec feat(ci): git gubmodule update trigger moved to api call via curl
this was done so that the environment keyword could be used and
then shown in the MR

!48 nofusscomputing/projects/ansible/git_configuration!62
2023-06-03 10:46:25 +09:30
Jon
35cfa92cd9 feat(ci): git submodule job moved to own definition
!48 nofusscomputing/projects/ansible/git_configuration!62
2023-06-03 10:46:07 +09:30
Jon
a86d17eff2 feat(ansible_playbook): rules set to never 'ONLY'
this was done as the configured rules were specifically for git
submodule scheduled jobs. that job will be moved to it's own definition.

!48 nofusscomputing/projects/ansible/git_configuration!62
2023-06-03 10:42:13 +09:30
Jon
fc6db1bdd9 Merge branch 'preperation-32-when-anchors' into 'development'
fix(ansible_playbook): No4 enable parent pipelines

See merge request nofusscomputing/projects/gitlab-ci!47
2023-06-02 07:28:07 +00:00
Jon
13ee3bf535 fix(ansible_playbook): No4 enable parent pipelines
!47
2023-06-02 16:57:07 +09:30
Jon
8ae6f35df1 Merge branch 'preperation-32-when-anchors' into 'development'
fix(ansible_playbook): No3 enable parent pipelines

See merge request nofusscomputing/projects/gitlab-ci!46
2023-06-02 07:18:55 +00:00
Jon
3c0543f7ad fix(ansible_playbook): No3 enable parent pipelines
!45
2023-06-02 16:47:24 +09:30
Jon
476eec71bc Merge branch 'preperation-32-when-anchors' into 'development'
fix(ansible_playbook): enable parent pipelines

See merge request nofusscomputing/projects/gitlab-ci!45
2023-06-02 07:09:04 +00:00
Jon
f3fa9c5a41 fix(ansible_playbook): enable parent pipelines
!45
2023-06-02 16:37:18 +09:30
Jon
41e68d0944 Merge branch 'preperation-32-when-anchors' into 'development'
fix(ansible_playbook): enable parent pipelines

See merge request nofusscomputing/projects/gitlab-ci!44
2023-06-02 06:52:36 +00:00
Jon
3ee48daa10 fix(ansible_playbook): enable parent pipelines
!44
2023-06-02 16:21:07 +09:30
a08bc7abc4 build(version): bump version 0.6.1rc5 → 0.6.1rc6 2023-06-02 06:42:05 +00:00
Jon
de45dc26ed Merge branch 'preperation-32-when-anchors' into 'development'
fix(md_lint): lint on git tag

See merge request nofusscomputing/projects/gitlab-ci!43
2023-06-02 06:39:39 +00:00
Jon
ba43bb9c8d fix(md_lint): lint on git tag
job required for build

!43
2023-06-02 16:08:08 +09:30
8c7de45d84 build(version): bump version 0.6.1rc4 → 0.6.1rc5 2023-06-02 06:36:01 +00:00
Jon
5fe9c7c06e Merge branch 'preperation-32-when-anchors' into 'development'
fix(commit_footer_check): run on non master/dev branches only

See merge request nofusscomputing/projects/gitlab-ci!42
2023-06-02 06:29:02 +00:00
Jon
efa6271057 fix(gitlab_yaml_lint): adjust logic to detect changes
!42
2023-06-02 15:57:33 +09:30
Jon
6accd8633c fix(commit_footer_check): run on non master/dev branches only
!42
2023-06-02 15:50:42 +09:30
Jon
41790dc1e6 Merge branch 'preperation-32-when-anchors' into 'development'
feat: define yaml when anchors

See merge request nofusscomputing/projects/gitlab-ci!41
2023-06-02 06:17:07 +00:00
Jon
86b0533885 feat(submodule_update_trigger): only update own submodule
now the trigger job passes the name of the repo, which should match the
module name. this then updates that submodule only.

!41 nofusscomputing/projects/ansible/git_configuration#16 nofusscomputing/projects/ansible/git_configuration!60
2023-06-02 15:43:18 +09:30
Jon
ff8c43c1ea feat(mkdocs_build): always build on git tag
this allows the built files to always be available under the
latest tag job for downloading by the parent site.

!41
2023-06-02 15:40:50 +09:30
Jon
04e7e928e0 feat(ci_rules): add exists and changes for rules
now defined jobs check for existance of file and for changes
to launch a job

!41 #32
2023-06-02 15:26:35 +09:30
Jon
862176f9dc feat(yaml_anchors): initial conditional checks
currently this wont be implemented due to issues with gitlab
ci not importing the anchor file

!41 #32
2023-06-02 14:52:59 +09:30
Jon
6a2266177b Merge branch 'ansible-roles-restructure-ops-74' into 'development'
refactor: ansible-roles

See merge request nofusscomputing/projects/gitlab-ci!40
2023-06-01 05:18:58 +00:00
Jon
9d767282ff refactor(ci): update ansible-role repo path
!40 nofusscomputing/ops#74
2023-06-01 14:47:13 +09:30
Jon
b3c8483677 Merge branch 'feat-trigger-submodule' into 'development'
feat: trigger submodule

See merge request nofusscomputing/projects/gitlab-ci!39
2023-06-01 02:59:23 +00:00
Jon
6f810f8084 feat(ci): add more repos to update
!39
2023-06-01 12:20:32 +09:30
2b57d0b160 build(version): bump version 0.6.1rc3 → 0.6.1rc4 2023-05-31 05:33:21 +00:00
Jon
e9713b31c8 Merge branch 'feat-trigger-submodule' into 'development'
feat: trigger submodule updates

See merge request nofusscomputing/projects/gitlab-ci!38
2023-05-31 05:16:24 +00:00
Jon
7018440dcb feat(ci): on push to dev, update git sub modules on specified
!38
2023-05-31 14:44:40 +09:30
Jon
8e0ca2352d Merge branch 'feat-trigger-submodule' into 'development'
fix: image not pulling

See merge request nofusscomputing/projects/gitlab-ci!37
2023-05-31 04:31:01 +00:00
Jon
73ea66e60d fix(ansible_playbook): always pull image
!37
2023-05-31 13:59:23 +09:30
Jon
3e068f98c5 Merge branch 'website-10-lint-jobs-fix' into 'development'
refactor: work as part of other projects

See merge request nofusscomputing/projects/gitlab-ci!36
2023-05-31 02:18:02 +00:00
Jon
5e4912857a feat(mkdocs_build_docs): keyword needs does not belong in definition
!36
2023-05-31 11:42:34 +09:30
Jon
c47be42184 fix(mkdocs_build): ensure config file exists when run on branch
!36
2023-05-31 11:41:54 +09:30
Jon
9ebd0a27f6 feat(lint_markdown_docs): ensure also detects website
!36
2023-05-31 11:40:34 +09:30
Jon
f375a1298f Merge branch '31-fix-ansible-playbook-trigger' into 'development'
fix: ansible playbook trigger

Closes #31

See merge request nofusscomputing/projects/gitlab-ci!35
2023-05-29 04:30:42 +00:00
Jon
8ced1720e0 fix(automagic): fix git submodule so it runs on schedule
removed variables from job definition as these are for the end
user to specify.

!35 fixes #31
2023-05-29 13:59:04 +09:30
Jon
3383d5a086 Merge branch 'big-fixes' into 'development'
chore: general fixes and dev

Closes #30, #27, and #26

See merge request nofusscomputing/projects/gitlab-ci!34
2023-05-29 02:31:48 +00:00
Jon
871654508c docs: refine
!34
2023-05-29 11:44:24 +09:30
Jon
95bc6a5b03 docs(automagic): added initial autmagic docs
!34
2023-05-29 11:32:47 +09:30
Jon
e79b554550 refactor: rename website to documentation
!34
2023-05-29 11:28:17 +09:30
Jon
d7be011370 revert: "refactor(ci): update deploy job name"
This reverts commit 681b8f1a02.

job must be named pages so that it deploys to gitlab pages

!34
2023-05-29 11:17:04 +09:30
Jon
398815055e docs(ansible_playbook): document ci job definition
!34 closes #26 closes #27
2023-05-29 11:05:36 +09:30
Jon
681b8f1a02 refactor(ci): update deploy job name
!34
2023-05-29 10:42:24 +09:30
Jon
b68f6cb4b4 fix(docs_environment): don't define empty env path
this empty variable was preventing the upstream var from being used.

!34
2023-05-29 10:41:04 +09:30
Jon
91ac4476fb fix(doc_pages): use updated job name
!34 #30
2023-05-29 10:40:14 +09:30
Jon
0598e813d4 chore: remove jobs duplicated by automagic template
!34
2023-05-29 10:39:22 +09:30
Jon
75968b140c fix(ansible_lint): only run if tasks/main.yaml exists
should only lint an ansible role

!34
2023-05-29 10:28:08 +09:30
Jon
440765537d feat(ci): use automagic ci template
!34
2023-05-29 10:15:54 +09:30
Jon
0bc7255453 fix(mkdocs_build_website): renamed and normalized
renamed from website to docs and normalized the rules.
this template is for building docs for our website, so it's name should
reflect this

!34 fixes #30
2023-05-29 10:08:26 +09:30
Jon
18bc18c29b feat(automagic): add ansible template
!34
2023-05-28 16:24:32 +09:30
Jon
203a99903c fix(sub_folder_changelog): dont create changelog for docs
!34
2023-05-28 16:24:12 +09:30
Jon
e32db8dcfd Merge branch 'concurrent-work' into 'development'
feat: work as part of other projects

See merge request nofusscomputing/projects/gitlab-ci!33
2023-05-28 05:38:34 +00:00
Jon
a010f7bab1 fix(jobs): jobs that occur on push should also run on 'trigger'
!33 #26
2023-05-28 13:23:34 +09:30
Jon
fff7d31498 feat(ansible_play): force output colour in job logs
!33
2023-05-28 12:30:43 +09:30
Jon
29f68ee1f7 Merge branch '28-fix-automagic-job-docker' into 'development'
fix(docker_publish): job only run on dockerfile exists

See merge request nofusscomputing/projects/gitlab-ci!32
2023-05-28 01:24:40 +00:00
Jon
79855cdb99 fix(docker_publish): job only run on dockerfile exists
!32 #28
2023-05-28 10:53:03 +09:30
Jon
32324c841d Merge branch '28-fix-automagic-job-docker' into 'development'
fix(docker): job only run on dockerfile exists

Closes #28

See merge request nofusscomputing/projects/gitlab-ci!31
2023-05-28 01:17:24 +00:00
Jon
7b4b01bdab refactor(docker_hub): move needs to template
needs should not exists in definition as it is dynamic.
moved dockerhub publish to docker template

!31
2023-05-28 10:45:41 +09:30
Jon
502f12c216 fix(docker): job only run on dockerfile exists
!31 fixes #28
2023-05-28 10:44:23 +09:30
1c4258d645 build(version): bump version 0.6.1rc2 → 0.6.1rc3 2023-05-28 01:07:50 +00:00
Jon
040a56cd6b Merge branch 'restructure' into 'development'
fix: ensure scheduled pipeline only triggers schedulable jobs

Closes #29

See merge request nofusscomputing/projects/gitlab-ci!30
2023-05-28 01:05:02 +00:00
Jon
bade89c533 fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
!30 fixes #29
2023-05-28 10:31:26 +09:30
Jon
573f47ba7c Merge branch 'restructure' into 'development'
feat(automation): job to run ansible playbooks

Closes #25

See merge request nofusscomputing/projects/gitlab-ci!29
2023-05-27 05:57:13 +00:00
Jon
19dde28526 chore: fix linting error
!29 #26
2023-05-27 15:24:21 +09:30
Jon
c5d27e832e feat(auto_jobs): created initial template to auto-create jobs
!29 #26
2023-05-27 15:21:27 +09:30
Jon
f9af921e6b refactor(ansible_playbook): final logic adjustment for job
these will be used for pipeline running

!29 #25
2023-05-27 15:20:40 +09:30
Jon
158cc94d1a feat(variables): added pipeline trigger and schedule
these will be used for pipeline running

!29 #26
2023-05-27 15:18:51 +09:30
Jon
1f6ee9ea27 refactor(automation): final logic changes
!29 closes #25
2023-05-27 14:04:10 +09:30
Jon
0d3eaa6ac2 feat(automation): job to run ansible playbooks
!29 nofusscomputing/projects/ansible/execution_environment!8 nofusscomputing/projects/ansible-roles!25 nofusscomputing/projects/ansible/git_configuration#5
2023-05-26 16:29:23 +09:30
45 changed files with 1712 additions and 321 deletions

View File

@ -4,4 +4,4 @@ commitizen:
name: cz_conventional_commits
tag_format: $major.$minor.$patch$prerelease
update_changelog_on_bump: true
version: 0.6.1rc2
version: 0.7.0rc0

View File

@ -1,5 +1,6 @@
stages:
- chores
- validation
- build
- prepare
@ -11,7 +12,7 @@ stages:
include:
- local: $JOB_ROOT_DIR/lint/yaml.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/website.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/automagic.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/conventional_commits/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/git_push_mirror/.gitlab-ci.yml
@ -25,7 +26,7 @@ include:
variables:
JOB_ROOT_DIR: '.'
SECURE_LOG_LEVEL: debug
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_STRATEGY: normal
GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/gitlab-ci.git"
MY_PROJECT_ID: "28543717"
LICENSE_FINDER_CLI_OPTS: '--recursive'
@ -67,7 +68,8 @@ gemnasium-python-dependency_scanning:
- if: $CI_COMMIT_BRANCH &&
$GITLAB_FEATURES =~ /\bdependency_scanning\b/ &&
$DS_DEFAULT_ANALYZERS =~ /gemnasium-python/ &&
$PIP_REQUIREMENTS_FILE
$PIP_REQUIREMENTS_FILE &&
( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")
Ansible Dependencies:
extends: .gemnasium-python-dependency_scanning
@ -112,21 +114,84 @@ PyLint:
gilab-ci.yml Lint (python 3.11):
variables:
YAML_LINT_PATH: ".gitlab-ci* ./**/*gitlab-ci*"
YAML_LINT_EXTRA_ARGS: "{ extends: lint/.yamllint.yaml, ignore: [website-template/*] }"
extends:
- .yaml_lint_defaults
- .Gitlab_CI.Lint.YAML
image: python:3.11-slim
Gitlab Release:
Ansible_docker_os.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
MY_COMMAND: ./sub-folder_changlog.sh
extends:
- .gitlab_release
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible_docker_os
Github (Push --mirror):
extends:
- .git_push_mirror
Ansible_playbooks.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible_playbooks
Ansible-roles.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/ansible-roles
config.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/infrastructure/config
Docker_Mail.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-mail
docker-buildx-qemu.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-buildx-qemu
docker-glpi.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-glpi
docker_management.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/docker_management
execution_environment.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/execution_environment
git_configuration.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/ansible/git_configuration
nodered_ldap_self_service.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/nodered_ldap_self_service
Ops.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/ops
Website.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/infrastructure/website

View File

@ -1,9 +1,11 @@
variables:
JOB_ROOT_DIR: 'gitlab-ci'
GIT_SUBMODULE_STRATEGY: recursive
GIT_SUBMODULE_STRATEGY: normal
#PIPELINE_RUN_TRIGGER: 'false'
PIPELINE_RUN_SCHEDULE: 'true'
stages:
- chores
- validation
- build
- prepare

View File

@ -1,3 +1,177 @@
## 0.7.0rc0 (2024-02-02)
### Bug Fixes
- **mkdocs**: [3fa71fe9](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/3fa71fe91ad1e874b76fab7323e02496ac757f5d) - correct mkdocs image name [ [!73](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/73) ]
- **commit_footer_refs**: [0f6e06c5](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0f6e06c50f7cae602cdc2ca00bbce7fe1fd72c32) - enable automated jobs without MR to succeed. [ [#44](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/44) [!72](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/72) ]
- **commit_footer_refs**: [b8199586](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/b8199586b4fe4c9f93efe68a908eaa8582f064c3) - dont update git submodules [ [!71](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/71) [#42](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/42) [!2](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/2) ]
### Code Refactor
- **mkdocs**: [955ce375](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/955ce3752050e78085c2037fe66714db41114c9e) - set env name to gitlab pages [ [!73](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/73) [#43](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/43) ]
### Features
- **sub_module_update**: [fc9f3761](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/fc9f37617cd26b3e44326161ba10183eb13444dd) - wbsite-template [ [!44](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/44) ]
- **mkdocs**: [3fbd4317](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/3fbd4317c0388fb8e406eb78614e3943375496ed) - update requirements.txt to current versions [ [!73](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/73) [!13](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/13) [!44](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/44) ]
- **mkdocs**: [c4087c70](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/c4087c7069524df573a43db29c399940600ddba7) - update python to 3.11.2 [ [!73](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/73) [!13](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/13) [!44](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/44) ]
## 0.6.1 (2023-11-06)
### Bug Fixes
- **docker**: [359c664d](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/359c664d97c516bd3b35fb46961288c74f6bd940) - always build on tag [ [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) [#37](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/37) ]
- **build**: [799de6c9](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/799de6c98c0925ef4a85cf246512041fc89534db) - adjust to enforce [ [!66](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/66) ]
- **docker**: [4ea999ce](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/4ea999cec96824c2670c5d448dff8c06b1582adc) - ensure on any changes to directory path, build occurs [ [!64](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/64) [#38](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/38) [!76](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/76) ]
- **template**: [4da44b77](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/4da44b77dfbc015d28fda34fcfe54d70a6542943) - issue comment patch remove setting role path [ [!62](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/62) ]
### Code Refactor
- **ansible**: [d21692f7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/d21692f7886986db1808befb00b045c1a9a65a8f) - move submodule/issue patch to mr pipeline [ [!67](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/67) ]
### Continious Integration
- **deploy**: [f35d99dc](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f35d99dc436d1e9ab200a8b94052de2fa23608fc) - added docker management repo [ [!63](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/63) ]
### Documentaton / Guides
- [535d0b42](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/535d0b42938fc66f94fd57018dd81e2111ad3abe) - update docker tag build [ [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) [#37](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/37) ]
- [d9b303ed](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/d9b303edc1f61f1d7a4785b5b5396625cc98a179) - expand [ [!59](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/59) ]
### Features
- **conventional_commits**: [3918686e](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/3918686e483f6fabb6c487be6f2d7105da08d11a) - do not run on master branch [ [!70](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/70) [#40](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/40) ]
- **sub_module_update**: [8eb57c58](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/8eb57c580973fa49bd3ffb12553cc24e39c5afac) - enable passing commit type and category [ [!69](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/69) [#39](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/39) [!122](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/122) [#39](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/39) [!96](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/96) [!28](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/28) ]
- **deploy**: [86a0292f](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/86a0292fafa0fb139f068106dacfa2ee6917f4d4) - add new nfc repos [ [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) ]
- **release**: [837311c0](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/837311c0221820b93072e9bfcba2191a8b96b9ea) - annotate git tag with changelog [ [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) ]
- **build**: [e8758c4c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/e8758c4ccecdbf0c22a5e67bf086762c68c6b915) - no docs/docker build on master push, only tag [ [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) ]
- **docker**: [0d797415](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0d7974152c26200c8beaa3a1ddecf504f4406ee3) - add debugging to publish [ [#36](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/36) [!68](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/68) [#36](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/36) [#11](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/11) ]
- **deploy**: [1a168593](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/1a168593eb0fd234885982a16bc216804e76d293) - added ansible.docker.os repo [ [!67](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/67) ]
- **docker_publish**: [9489c99f](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/9489c99fe489c9b9b9e29fc2013d5ff6a990094a) - on merge to dev always publish [ [!65](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/65) ]
- **template**: [da40e027](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/da40e027376c163ca4915f3edcf322b6e0b0c278) - added auto job mr from issue comment patch [ [!61](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/61) ]
## 0.6.1rc8 (2023-06-08)
### Bug Fixes
- **lint**: [4462ec04](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/4462ec04268c5b967f0672828d1cd7b3995894d9) - all lint to immediatly start job [ [!57](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/57) ]
- **ci**: [9b00af99](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/9b00af996ff96f58a26b83066004e5a9e94ac155) - correct dockerhub tag [ [!57](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/57) ]
- **ci**: [6af454be](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/6af454be4d2b658e0c362392ff502b3fb3da2cbf) - remove spaces from regex exists and changes [ [!56](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/56) ]
- **ansible_lint**: [46d85bcf](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/46d85bcf49ea73545a5af4324c28af51a17acd3c) - enable first level dir paths [ [!55](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/55) ]
- **docker_build**: [11b62099](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/11b6209992294e45a051e26963d772d75014e516) - on success push container to docker hub [ [!53](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/53) ]
- **docker_build**: [e90b938b](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/e90b938bba092bdaecbc1a43758218da0058427b) - init submodule submodules [ [!53](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/53) ]
### Documentaton / Guides
- [469255f4](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/469255f450e946a712d379415e45a74eb8c07995) - added notes [ [!58](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/58) ]
### Features
- **ci**: [0ec520f0](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0ec520f02328b69642f929a19e8517c7d475a988) - add resource groups [ [!55](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/55) [#33](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/33) ]
- **sync**: [e75464c7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/e75464c7c409fd17864624d48c9fec8e6e3544e9) - immediatee git sync [ [!55](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/55) ]
- **latest_artifacts**: [755fcac0](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/755fcac06e9f265789b02a88eb90df35ab1dbf07) - ensure artifats for jobs are always avail on branches [ [!54](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/54) [#34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/34) [#331232](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/331232) ]
- **latest_artifacts**: [22dd4985](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/22dd4985be315be95be55b2b4edff5ae4ba1eeb4) - ensure artifats for jobs are always avail on branches [ [!52](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/52) [#34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/34) [#331232](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/331232) ]
## 0.6.1rc7 (2023-06-05)
### Bug Fixes
- **mkdocs**: [5ffc68d7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/5ffc68d7241bb0c729a990b4a5b060bd6488ea8c) - adjust rules to match lint [ [!51](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/51) ]
- **docker**: [097725c1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/097725c1be5d155cebada0cf2cbb17ddbd041e6e) - detect canges in include path corrected [ [!50](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/50) ]
- **ci**: [9e098245](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/9e098245d7a6272fd51aee0a479af3a233fdb30e) - typo in docker build [ [!49](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/49) [!20](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/20) ]
- **ansible_playbook**: [13ee3bf5](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/13ee3bf535dadf7cada645ddec74e2e29872ac2c) - No4 enable parent pipelines [ [!47](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/47) ]
- **ansible_playbook**: [3c0543f7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/3c0543f7ad0673bcb6600e6ff20693be5f784f23) - No3 enable parent pipelines [ [!45](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/45) ]
- **ansible_playbook**: [f3fa9c5a](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f3fa9c5a416295cb2a0362a31f05995336ea9155) - enable parent pipelines [ [!45](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/45) ]
- **ansible_playbook**: [3ee48daa](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/3ee48daa10eee6dd80b79ed076c4ad4d1ff9bb57) - enable parent pipelines [ [!44](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/44) ]
### Features
- **ansible_lint**: [6a149f6e](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/6a149f6ed6d514c42d67b6b04cea114aa32067b8) - added inventory & playbooks directories [ [!50](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/50) [#22](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/22) [!27](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/27) ]
- **ci**: [1dcb3ed5](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/1dcb3ed521538de47745ed00148bb4123708d90d) - dont git submodule recurse [ [!50](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/50) ]
- **commit_footer_refs**: [f3256c58](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f3256c5858e1b5b2b6444f9d8ae63f556f4acb30) - only run on changes [ [!50](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/50) ]
- **ci**: [d8a6d5f7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/d8a6d5f7ec1f73d5ae506301666383aac843708d) - git gubmodule update trigger moved to api call via curl [ [!48](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/48) [!62](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/62) ]
- **ci**: [35cfa92c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/35cfa92cd900e7ed7008695bf0b65aaf147bb0ec) - git submodule job moved to own definition [ [!48](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/48) [!62](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/62) ]
- **ansible_playbook**: [a86d17ef](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a86d17eff267750c3713968852d5013ef00ee226) - rules set to never 'ONLY' [ [!48](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/48) [!62](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/62) ]
## 0.6.1rc6 (2023-06-02)
### Bug Fixes
- **md_lint**: [ba43bb9c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/ba43bb9c8de87d723abcd0b4b7519c88d8c3b162) - lint on git tag [ [!43](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/43) ]
## 0.6.1rc5 (2023-06-02)
### Bug Fixes
- **gitlab_yaml_lint**: [efa62710](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/efa62710571e48872d700a8a8802a526fb86b1f6) - adjust logic to detect changes [ [!42](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/42) ]
- **commit_footer_check**: [6accd863](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/6accd8633ca0579de084d9762f610711ae1e5715) - run on non master/dev branches only [ [!42](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/42) ]
### Code Refactor
- **ci**: [9d767282](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/9d767282ffa86c48077bd08b605cf50be76a9b07) - update ansible-role repo path [ [!40](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/40) [#74](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/74) ]
### Features
- **submodule_update_trigger**: [86b05338](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/86b05338854f94997cb5cf09fad0561c09f86461) - only update own submodule [ [!41](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/41) [#16](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/16) [!60](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/60) ]
- **mkdocs_build**: [ff8c43c1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/ff8c43c1ea2126cabf0ad2f400a784a9f90ec1ac) - always build on git tag [ [!41](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/41) ]
- **ci_rules**: [04e7e928](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/04e7e928e0f4f2212078fd08fd87b2e024dd5257) - add exists and changes for rules [ [!41](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/41) [#32](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/32) ]
- **yaml_anchors**: [862176f9](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/862176f9dca8cf8ee998456db0cc12f7084f7fc0) - initial conditional checks [ [!41](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/41) [#32](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/32) ]
- **ci**: [6f810f80](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/6f810f8084e54f0afc9ebb47bfcc855536046a08) - add more repos to update [ [!39](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/39) ]
## 0.6.1rc4 (2023-05-31)
### Bug Fixes
- **ansible_playbook**: [73ea66e6](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/73ea66e60d9cdb235aebda839e0a734212c997bc) - always pull image [ [!37](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/37) ]
- **mkdocs_build**: [c47be421](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/c47be42184c96855f0702c0258931da9730df517) - ensure config file exists when run on branch [ [!36](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/36) ]
- **automagic**: [8ced1720](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/8ced1720e00f984e75c51bf8985e45d07aac8c09) - fix git submodule so it runs on schedule [ [!35](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/35) [#31](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/31) ]
- **docs_environment**: [b68f6cb4](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/b68f6cb4b4a571dee52cb765ddb6a5a70c78b364) - don't define empty env path [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **doc_pages**: [91ac4476](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/91ac4476fbefd2476d1c147c1681a1a53cc40201) - use updated job name [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) [#30](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/30) ]
- **ansible_lint**: [75968b14](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/75968b140ca0b2734d6af14e78e7c598b6221600) - only run if tasks/main.yaml exists [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **mkdocs_build_website**: [0bc72554](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0bc72554534488d147356d148d635d490b8a1007) - renamed and normalized [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) [#30](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/30) ]
- **sub_folder_changelog**: [203a9990](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/203a99903c28201f74304ca8689fae25a7a28aa0) - dont create changelog for docs [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **jobs**: [a010f7ba](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a010f7bab19fc89f71c8bc5a81a3d1944f4bdc05) - jobs that occur on push should also run on 'trigger' [ [!33](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/33) [#26](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/26) ]
- **docker_publish**: [79855cdb](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/79855cdb99762fd444bedddb6be59cb4ba41fe50) - job only run on dockerfile exists [ [!32](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/32) [#28](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/28) ]
- **docker**: [502f12c2](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/502f12c21689f86675a000e51ca415019fcad184) - job only run on dockerfile exists [ [!31](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/31) [#28](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/28) ]
### Code Refactor
- [e79b5545](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/e79b554550dbabe5df429d6c57fe15cb2b144432) - rename website to documentation [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **ci**: [681b8f1a](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/681b8f1a0293986a0b67ba13c72bf8dd92ca692a) - update deploy job name [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **docker_hub**: [7b4b01bd](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7b4b01bdab2c4299e892071ef3c19b324bf3768c) - move needs to template [ [!31](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/31) ]
### Documentaton / Guides
- [87165450](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/871654508cd183afc1240c9c5de16e9f762c89ee) - refine [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **automagic**: [95bc6a5b](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/95bc6a5b036d809ef4bce8af6f70568c595785eb) - added initial autmagic docs [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **ansible_playbook**: [39881505](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/398815055e013059afc6c4d99fa97bdeeb003909) - document ci job definition [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) [#26](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/26) [#27](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/27) ]
### Features
- **ci**: [7018440d](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7018440dcbd09c2eb406817eab7df3e24e19687d) - on push to dev, update git sub modules on specified [ [!38](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/38) ]
- **mkdocs_build_docs**: [5e491285](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/5e4912857aea43678b2ef61230df3817f193d684) - keyword needs does not belong in definition [ [!36](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/36) ]
- **lint_markdown_docs**: [9ebd0a27](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/9ebd0a27f65b36b289b3e7c0647e839b5f7a2798) - ensure also detects website [ [!36](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/36) ]
- **ci**: [44076553](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/440765537dcc4370d6558ec5d41fe7f87a5f7f4d) - use automagic ci template [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **automagic**: [18bc18c2](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/18bc18c29b4ae08963d4c744e9479622b2cd921c) - add ansible template [ [!34](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/34) ]
- **ansible_play**: [fff7d314](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/fff7d31498d486b1c39f1672df9b283ad02c21d8) - force output colour in job logs [ [!33](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/33) ]
## 0.6.1rc3 (2023-05-28)
### Bug Fixes
- **scheduled_pipelines**: [bade89c5](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - if scheduled pipeline only run schedualable jobs [ [!30](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/30) [#29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/29) ]
### Code Refactor
- **ansible_playbook**: [f9af921e](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f9af921e6b6ec10f9f77ec6a016c6cbb9559d1bf) - final logic adjustment for job [ [!29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/29) [#25](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/25) ]
- **automation**: [1f6ee9ea](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/1f6ee9ea27824df1c82bf85e1e239f57f2145bdf) - final logic changes [ [!29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/29) [#25](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/25) ]
### Features
- **auto_jobs**: [c5d27e83](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/c5d27e832e100156cb99c5ca580fd5a8eb600e0f) - created initial template to auto-create jobs [ [!29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/29) [#26](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/26) ]
- **variables**: [158cc94d](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/158cc94d1a817f89b6603e9bac7678196b21d1d5) - added pipeline trigger and schedule [ [!29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/29) [#26](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/26) ]
- **automation**: [0d3eaa6a](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0d3eaa6ac2dc448505b18c6aecd4a72e28ffde83) - job to run ansible playbooks [ [!29](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/29) [!8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/8) [!25](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/merge_requests/25) [#5](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/issues/5) ]
## 0.6.1rc2 (2023-05-24)
### Bug Fixes

70
anchors/conditions.yaml Normal file
View File

@ -0,0 +1,70 @@
---
.condition_dev_branch_push: &condition_dev_branch_push # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
.condition_master_branch_push: &condition_master_branch_push # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
.condition_not_master_or_dev_push: &condition_not_master_and_dev_push # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
.condition_master_or_dev_push: &condition_master_or_dev_push # condition_master_or_dev_push
(
$CI_COMMIT_BRANCH == "master" ||
$CI_COMMIT_BRANCH == "development"
)&&
$CI_PIPELINE_SOURCE == "push"
.condition_git_tag: &condition_git_tag # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
.condition_any_branch_push: &condition_any_branch_push # condition_any_branch_push
$CI_COMMIT_BRANCH != null &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE == "push"
.rules_commit_develop_branch: &when_commit_develop_branch
- if: # on dev branch
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
changes:
paths:
<<: *repository_change_files
compare_to: 'master'
exists:
<<: *repository_exists_files
when: always
- if: # not on master or dev
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
changes:
paths:
<<: *repository_change_files
compare_to: 'development'
exists:
- dockerfile
- dockerfile.j2
when: always
- if: # tagged pipeline
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- dockerfile
- dockerfile.j2
when: on_success

View File

@ -0,0 +1,174 @@
---
# This yaml is intended to run ansible jobs using nfc's ansible-ee image
include:
- local: $JOB_ROOT_DIR/.gitlab-ci_common.yaml
.ansible_playbook:
image:
name: nofusscomputing/ansible-ee:dev
pull_policy: always
stage: chores
variables:
ansible_inventory: ''
ansible_playbook: ''
ansible_tags: ''
ANSIBLE_FORCE_COLOR: 'true'
script:
- if [ "0$ansible_inventory" != '0' ]; then ansible_inventory=-i $ansible_inventory; fi
- if [ "0$ansible_tags" != '0' ]; then ansible_tags=$(echo -n "--tags $ansible_tags"); fi
- echo "[DEBUG] ansible_inventory=$ansible_inventory"
- echo "[DEBUG] ansible_playbook=$ansible_playbook"
- echo "[DEBUG] ansible_tags=$ansible_tags"
- ansible-playbook $ansible_inventory $ANSIBLE_PLAYBOOK_DIR/$ansible_playbook $ansible_tags -vvv
rules:
# ToDo: at some stage redefine these rules so that the job can run if specified.
# - if: '$NFC_AUTO_JOBS == "false"'
# when: never
# - if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_RUN_SCHEDULE == "true"'
# exists:
# - ".nfc_automation.yaml"
# when: always
# - if:
# (
# $CI_PIPELINE_SOURCE == "api"
# ||
# $CI_PIPELINE_SOURCE == "pipeline"
# ||
# $CI_PIPELINE_SOURCE == "trigger"
# ||
# $CI_PIPELINE_SOURCE == "parent_pipeline"
# ) &&
# $PIPELINE_RUN_TRIGGER == "true"
# exists:
# - ".nfc_automation.yaml"
# when: always
# - if: # condition_dev_branch_push
# $CI_COMMIT_BRANCH == "development" &&
# $CI_PIPELINE_SOURCE == "push"
# exists:
# - ".nfc_automation.yaml"
# when: always
# # this if for testing only
# # - if: '$CI_PIPELINE_SOURCE == "push"'
# # when: always
# # exists:
# # - ".nfc_automation.yaml"
- when: never
.ansible_playbook_git_submodule:
extends: .ansible_playbook
variables:
ansible_playbook: 'git_configuration.yaml'
ansible_tags: 'submodule'
rules:
- if: '$NFC_AUTO_JOBS == "false"'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule" && $PIPELINE_RUN_SCHEDULE == "true"'
exists:
- ".nfc_automation.yaml"
when: always
- if:
(
$CI_PIPELINE_SOURCE == "api"
||
$CI_PIPELINE_SOURCE == "pipeline"
||
$CI_PIPELINE_SOURCE == "trigger"
||
$CI_PIPELINE_SOURCE == "parent_pipeline"
) &&
$PIPELINE_RUN_TRIGGER == "true"
exists:
- ".nfc_automation.yaml"
when: always
- if: # condition_dev_branch_push
$CI_COMMIT_TAG == null &&
$CI_COMMIT_BRANCH == "development" &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "development" &&
$CI_PIPELINE_SOURCE != "push"
exists:
- ".nfc_automation.yaml"
when: always
# this if for testing only
# - if: '$CI_PIPELINE_SOURCE == "push"'
# when: always
# exists:
# - ".nfc_automation.yaml"
- when: never
.submodule_update_trigger:
stage: publish
# trigger:
# project: $SUBMODULE_UPDATE_TRIGGER_PROJECT
# branch: development
# inherit:
# variables: false
script:
# use script to trigger pipeline instead of trigger keyword.
# this is due to trigger keyword not allowing environment keyword.
- export TRIGGER_PROJECT_PATH=$(python3 -c "import urllib.parse, sys; print('$SUBMODULE_UPDATE_TRIGGER_PROJECT'.replace('/', '%2F'))")
- echo "[DEBUG] TRIGGER_PROJECT_PATH=$TRIGGER_PROJECT_PATH"
- |
curl \
--request POST \
--form "token=$CI_JOB_TOKEN" \
--form ref=development \
--form "variables[GIT_CONFIG_SUBMODULE_NAME]=$GIT_CONFIG_SUBMODULE_NAME" \
--form "variables[PIPELINE_RUN_TRIGGER]=$PIPELINE_RUN_TRIGGER" \
--form "variables[GIT_COMMIT_TYPE]=$GIT_COMMIT_TYPE" \
--form "variables[GIT_COMMIT_TYPE_CATEGORY]=$GIT_COMMIT_TYPE_CATEGORY" \
"https://gitlab.com/api/v4/projects/$TRIGGER_PROJECT_PATH/trigger/pipeline"
environment:
name: $SUBMODULE_UPDATE_TRIGGER_PROJECT
url: https://gitlab.com/$SUBMODULE_UPDATE_TRIGGER_PROJECT
variables:
PIPELINE_RUN_TRIGGER: 'true'
GIT_CONFIG_SUBMODULE_NAME: $CI_PROJECT_NAME
rules:
- if: # condition_master_or_dev_push
(
$CI_COMMIT_BRANCH == "master" ||
$CI_COMMIT_BRANCH == "development"
) &&
$CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
when: on_success
- when: never
.ansible_playbook_mr_from_issue_comment_patch:
extends: .ansible_playbook
variables:
ansible_playbook: 'git_configuration.yaml'
ansible_tags: 'gitlab_issue_patches'
PIPELINE_RUN_TRIGGER: 'false'
PIPELINE_RUN_SCHEDULE: 'false'
needs: []
rules:
- if: '$NFC_AUTO_JOBS == "false"'
when: never
- if:
$CI_COMMIT_TAG == null &&
$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "development" &&
$CI_PIPELINE_SOURCE != "push" &&
$CI_COMMIT_BRANCH != 'master' &&
$CI_COMMIT_BRANCH != 'automated-tasks' &&
$CI_COMMIT_BRANCH == 'development'
exists:
- ".nfc_automation.yaml"
when: always
- when: never

5
automation/CHANGELOG.md Normal file
View File

@ -0,0 +1,5 @@
# Changelog
2023-05-27 15:20:40 +0930 [f9af921](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f9af921e6b6ec10f9f77ec6a016c6cbb9559d1bf) - refactor(ansible_playbook): final logic adjustment for job
2023-05-27 14:04:10 +0930 [1f6ee9e](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/1f6ee9ea27824df1c82bf85e1e239f57f2145bdf) - refactor(automation): final logic changes
2023-05-26 16:29:23 +0930 [0d3eaa6](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0d3eaa6ac2dc448505b18c6aecd4a72e28ffde83) - feat(automation): job to run ansible playbooks

View File

@ -46,20 +46,16 @@
rules:
- if: '$JOB_STOP_CONVENTIONAL_COMMITS'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG'
when: never
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
when: never
- if: '$CI_COMMIT_BRANCH == "master"'
exists:
- .cz.yaml
when: always
- if: '$CI_COMMIT_BRANCH'
- if: # condition_any_branch_push
$CI_COMMIT_BRANCH != null &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_BRANCH != 'master'
exists:
- .cz.yaml
when: always
- when: never

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-21 01:48:53 +0930 [088c9fb](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/088c9fb04c80961f4de8d2b129955ae8cd0b9529) - feat(conventional_commits): ensure .cz.yaml exists
2023-05-15 00:18:38 +0000 [a3fdca8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a3fdca83bf7acb58d47792a66d1cd0728747361c) - build(version): bump version 0.6.1rc0 → 0.6.1rc1
2023-05-15 09:32:15 +0930 [93931cb](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/93931cb9076e0db238f4e297abe3d8f37bd71b80) - feat(conventional): job not to run when bot pushes change

View File

@ -1,4 +1,6 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-21 01:47:15 +0930 [f604c6e](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/f604c6e27d2e7704491f4c78979db40cf89764c0) - fix(docker): ensure qemu binfmt is loaded
2023-05-17 15:41:09 +0930 [a90ccb8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a90ccb81772e295cebe89d7a9c32ab700e19884d) - refactor(docker): move docker jobs to their own file

View File

@ -18,7 +18,9 @@ variables:
.build_docker_container:
stage: build
image: nofusscomputing/docker-buildx-qemu:dev
image:
name: nofusscomputing/docker-buildx-qemu:dev
pull_policy: always
services:
- name: docker:23-dind
entrypoint: ["env", "-u", "DOCKER_HOST"]
@ -30,6 +32,7 @@ variables:
# See https://github.com/docker-library/docker/pull/166
DOCKER_TLS_CERTDIR: ""
before_script:
- git submodule foreach git submodule update --init
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=gitlab-ci; else ROOT_DIR=$JOB_ROOT_DIR ; fi
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
- docker info
@ -96,13 +99,35 @@ variables:
fi
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: $CI_COMMIT_TAG
when: on_success
- if: '$CI_COMMIT_BRANCH == "development"'
when: on_success
- if: '$CI_COMMIT_BRANCH != "master"'
when: always
- when: never
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- '{dockerfile,dockerfile.j2}'
when: on_success
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{dockerfile,dockerfile.j2}'
changes:
paths:
- '{dockerfile,dockerfile.j2,includes/**/*}'
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{dockerfile,dockerfile.j2}'
changes:
paths:
- '{dockerfile,dockerfile.j2,includes/**/*}'
compare_to: 'development'
when: always
- when: never

View File

@ -46,20 +46,26 @@
- |
DOCKER_HUB_TAG=dev
echo "[DEBUG] default: DOCKER_HUB_TAG=$DOCKER_HUB_TAG";
if [ "0$CI_COMMIT_TAG" != "0" ]; then
DOCKER_HUB_TAG=latest
if [ "0$CI_COMMIT_TAG" == *"rc"* ]; then
echo "[DEBUG] stable: DOCKER_HUB_TAG=$DOCKER_HUB_TAG";
if [[ "0$CI_COMMIT_TAG" == *"rc"* ]]; then
DOCKER_HUB_TAG=dev
echo "[DEBUG] dev: DOCKER_HUB_TAG=$DOCKER_HUB_TAG";
fi
fi
echo "[DEBUG] DOCKER_IMAGE_PUBLISH_NAME=$DOCKER_IMAGE_PUBLISH_NAME";
echo "[DEBUG] DOCKER_HUB_TAG=$DOCKER_HUB_TAG";
echo "[DEBUG] final: DOCKER_HUB_TAG=$DOCKER_HUB_TAG";
if [ "0$DOCKER_IMAGE_BUILD_TARGET_PLATFORMS" != "0" ]; then
@ -90,18 +96,35 @@
fi
- docker logout docker.io
needs: [ "Docker Container" ]
environment:
name: DockerHub
url: $DOCKER_IMAGE_PUBLISH_URL
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: $CI_COMMIT_TAG
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- '{dockerfile,dockerfile.j2}'
when: on_success
- if: '$CI_COMMIT_BRANCH == "development"'
when: on_success
- if: '$CI_COMMIT_BRANCH != "master"'
# - if: # condition_master_branch_push
# $CI_COMMIT_BRANCH == "master" &&
# $CI_PIPELINE_SOURCE == "push"
# exists:
# - '{dockerfile,dockerfile.j2}'
# when: on_success
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{dockerfile,dockerfile.j2}'
changes:
paths:
- '{dockerfile,dockerfile.j2,includes/**/*}'
compare_to: 'master'
allow_failure: true
when: manual
when: on_success
- when: never

View File

@ -1,8 +0,0 @@
# Changelog
2023-05-23 12:42:16 +0930 [bcb8035](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bcb80358d9adb6b3a89fab1003f4434fb2949bdc) - ci(pages): add pages slug
2023-05-23 10:00:27 +0930 [28c04fb](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/28c04fb2e854521167367161d13b09650829d17d) - docs: add job definitions to page
2023-05-23 09:46:43 +0930 [7a9aca3](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7a9aca3a54b1faacb7e286bade84aff0ff4fd2e5) - fix(mkdocs): default to docs directory as root
2023-05-23 09:33:21 +0930 [657df7a](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/657df7a5ceb59798c7bb072aed5bf7ef82aef9b6) - docs: add job definition to page
2023-05-23 09:22:18 +0930 [bb2cddf](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bb2cddf70bd883636f117453df640e91f1662c39) - chore: remove unneeded fils from docs
2023-05-23 09:10:19 +0930 [7c385b7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7c385b7552945699eb87ec3ec43169df0cb77297) - refactor(docs): pages dir renamed to docs

View File

@ -0,0 +1,171 @@
---
title: Ansible Playbook
description: How to use No Fuss Computings gitlab-ci job for running Ansible Playbooks
date: 2023-05-29
template: project.html
about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
---
This job enables you to run an Ansible playbook within the Gitlab CI/CD environment.
There is also an additional job defined that enables you to specify a project to run an automated update of it's git submodules. This is useful if the project you create the job in, is used as a git submodule in another project. On pushing to the development branch, this job triggers the `Git.Submodules.Update.Chores` job that updates the specified projects git submodules.
## your .gitlab-ci.yml changes
- **Mandatory** In addition to the previous dependency, this requirement is for the project specified in the trigger job. The following must be added to the `.gitlab-ci.yml` file in that project.
``` yaml
include:
- project: nofusscomputing/projects/gitlab-ci
ref: master
file:
- .gitlab-ci_common.yaml
- automation/template/automagic.gitlab-ci.yaml
```
To use the ansible playbook job add the following to your `.gitlab-ci.yml` file.
``` yaml
stages:
- chores
include:
- project: nofusscomputing/projects/gitlab-ci
ref: master
file:
- automation/.gitlab-ci-ansible.yaml
Ansible Job:
extends: .ansible_playbook
variables:
ansible_playbook: 'git_configuration.yaml'
ansible_tags: 'submodule'
PIPELINE_RUN_TRIGGER: 'false'
PIPELINE_RUN_SCHEDULE: 'false'
```
To run the trigger job to update another projects git submodules. add the following to your `.gitlab-ci.yml` file
``` yaml
stages:
- publish
include:
- project: nofusscomputing/projects/gitlab-ci
ref: master
file:
- automation/.gitlab-ci-ansible.yaml
Docker_Mail.Submodule.Deploy:
extends: .submodule_update_trigger
variables:
SUBMODULE_UPDATE_TRIGGER_PROJECT: nofusscomputing/projects/docker-mail
```
!!! Tip
In addition to the variables below, you can also specify any additional Environment variables for use by Ansible within the container. Refer to the [Ansible configuration documentation](https://docs.ansible.com/ansible/latest/reference_appendices/config.html#common-options) for further details
## Job: `.ansible_playbook`
This job runs an Ansible playbook using the `nofusscomputing/ansible-ee:dev` Docker image.
### Stage: Chores
This job is responsible for executing an Ansible playbook. It can be customized by setting the following variables:
#### Variables
- `ansible_inventory`: The Ansible inventory file.
- `ansible_playbook`: The name of the Ansible playbook file.
- `ansible_tags`: The tags to be applied during playbook execution.
### Rules
- Rule 1: If the `NFC_AUTO_JOBS` variable is set to `"false"`, the job will never run.
- Rule 2: If the pipeline is triggered by a schedule and `PIPELINE_RUN_SCHEDULE` is set to `"true"`, the job will run only if the `.nfc_automation.yaml` file exists.
- Rule 3: If the pipeline is triggered by an API call, another pipeline, a trigger, or a parent pipeline, and `PIPELINE_RUN_TRIGGER` is set to `"true"`, the job will run only if the `.nfc_automation.yaml` file exists.
- Rule 4: If the pipeline is triggered by a push to the `development` branch, the job will run only if the `.nfc_automation.yaml` file exists. see [Documentation](../git_configuration/submodule/) for file details.
- Rule 5: This rule prevents the job from running under any circumstances.
## Job: `.ansible_playbook_git_submodule`
This job extends the `.ansible_playbook` job and is specifically used for running the `git_configuration.yaml` playbook with the `submodule` tags.
### Stage: Chores
This job is responsible for executing the `git_configuration.yaml` playbook with the `submodule` tags.
#### Variables
- `ansible_playbook`: The name of the Ansible playbook file (`git_configuration.yaml`).
- `ansible_tags`: The tags to be applied during playbook execution (`submodule`).
### Rules
- Rule 1: If the `NFC_AUTO_JOBS` variable is set to `"false"`, the job will never run.
- Rule 2: If the pipeline is triggered by a schedule and `PIPELINE_RUN_SCHEDULE` is set to `"true"`, the job will run only if the `.nfc_automation.yaml` file exists.
- Rule 3: If the pipeline is triggered by an API call, another pipeline, a trigger, or a parent pipeline, and `PIPELINE_RUN_TRIGGER` is set to `"true"`, the job will run only if the `.nfc_automation.yaml` file exists. see [Documentation](../git_configuration/submodule/) for file details.
- Rule 4: If the pipeline is triggered by a push to the `development` branch, the job will run only if the `.nfc_automation.yaml` file exists.
- Rule 5: This rule prevents the job from running under any circumstances.
## Job: `.submodule_update_trigger`
This job triggers a pipeline in another project.
### Stage: Publish
This job is responsible for triggering a pipeline in another project.
#### Variables
- `PIPELINE_RUN_TRIGGER`: The flag to indicate if the triggered pipeline should run (`true`).
### Rules
- Rule 1: If the pipeline is triggered by a push to the `master` or `development` branch, and there is no associated tag, the job will run on successful completion.
- Rule 2: This rule prevents the job from running under any other circumstances.
## Artifacts
- None
## gitlab-ci.yml definition
``` yaml title=".gitlab-ci.yml" linenums="1"
--8<-- "automation/.gitlab-ci-ansible.yaml"
```

View File

@ -47,7 +47,7 @@ Run these commands once you have the information above.
``` bash
git format-patch {original_commit}..HEAD -o diff-patches
git format-patch {original_commit}..HEAD -o ../diff-patches
git reset {source_commit} --hard
@ -57,7 +57,7 @@ Now, navigate to the `diff-patches` folder, open up the offending patch (commit)
``` bash
git am diff-patches/*.patch
git am ../diff-patches/*.patch
```
@ -72,18 +72,9 @@ Now push your changes upstream.
| *Ensure that all of your commits were exported prior to reseting the branch and when re-applying, that all of your commits were applied correctly* |
## Conventional Commits Admin Manual Manual
## GitLab CI Template - `.conventional_commit`
This job checks commit messages on a branch and the merge request title for validity against the [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/)
This job provides the following badge:
- None
### Dependencies
- None
This GitLab CI template, named `.conventional_commit`, is designed to validate conventional commits within a GitLab CI/CD pipeline. It follows predefined rules to ensure that commit message conventions are met.
### your .gitlab-ci.yml changes
@ -105,20 +96,55 @@ include:
```
## CI/CD Variables required
### Job Description
| var name | Description |
|:----:|:----|
| MR_ACCESS_TOKEN | *only required if you are accessing a private repository.* <br>This token is a user access token that as a minimum requires read-only access to the api to fetch the projects merg requests. |
In addition to the required variables above, the commitizen config file `.cz.yaml` must exist for the job to run.
The `.conventional_commit` job performs various tasks related to validating conventional commits. It runs in the `validation` stage of the pipeline and uses the `python:3.6-slim` Docker image.
### Job Workflow
### Variables
- `DEFAULT_ROOT_DIR`: The default root directory is set as `./gitlab-ci`.
- `MR_ACCESS_TOKEN`: The access token for the merge request. If not defined, it falls back to `CI_JOB_TOKEN`.
- `JOB_ROOT_DIR`: The root directory for the job. If not defined, it falls back to `DEFAULT_ROOT_DIR`.
- `MY_PROJECT_ID`: The custom project ID. If not defined, it falls back to `CI_PROJECT_ID`.
### Stages
- `validation`: The job is assigned to the `validation` stage.
### Script
The script section contains the actions performed during the job execution. These actions include creating directories, setting up variables, preparing the Python environment, and executing commands related to validating conventional commits.
The complete script can be found in the GitLab CI template file.
### Artifacts
The job generates artifacts that are stored for a period of 3 days. The artifacts include the following paths:
- `$CI_PROJECT_DIR/artifacts/*`
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml`
### Rules
The job follows certain rules to determine when it should be executed:
- If the variable `$JOB_STOP_CONVENTIONAL_COMMITS` is true, the job will not run.
- If the branch is pushed and a commit is made, and there is no tag associated with the commit, and the pipeline source is "push", the job will run if `.cz.yaml` file exists.
- In all other cases, the job will not run.
This GitLab CI template provides a convenient way to validate conventional commits and enforce commit message conventions within your CI/CD pipelines.
## Gitlab job Definition
@ -129,6 +155,3 @@ When you include this definition the following makes up the job definition
--8<-- "conventional_commits/.gitlab-ci.yml"
```
!!! Note
Docs Still under development

View File

@ -0,0 +1,56 @@
---
title: docker build Gitlab CI/CD jobs Template
description: How to use No Fuss Computings gitlab-ci template for auto creation of CI/CD joobs.
date: 2023-06-10
template: project.html
about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
---
This documentation provides an overview and explanation of the GitLab CI/CD YAML template. The template defines a job named `.build_docker_container` that builds a Docker container using the specified configuration.
### Stage: build
This job builds a Docker container using the `nofusscomputing/docker-buildx-qemu:dev` image and the `docker:23-dind` service.
#### Variables
- `DOCKER_IMAGE_BUILD_NAME`: The name of the Docker image to be built (`$CI_PROJECT_NAME`).
- `DOCKER_IMAGE_BUILD_REGISTRY`: The registry where the Docker image will be pushed (`$CI_REGISTRY_IMAGE`).
- `DOCKER_IMAGE_BUILD_TAG`: The tag to be applied to the Docker image (`$CI_COMMIT_SHA`).
#### Rules
- Rule 1: The job runs if the pipeline is triggered by a git tag and a `dockerfile` or `dockerfile.j2` file exists.
- Rule 2: The job runs if the pipeline is triggered by a push to the `development` branch and a `dockerfile` or `dockerfile.j2` file exists. It also checks for changes in the `dockerfile`, `dockerfile.j2`, or `includes/` directory compared to the `master` branch.
- Rule 3: The job runs if the pipeline is triggered by a push to a branch other than `master` or `development` and a `dockerfile` or `dockerfile.j2` file exists. It also checks for changes in the `dockerfile`, `dockerfile.j2`, or `includes/` directory compared to the `development` branch.
- Rule 4: The job never runs.
#### Script
The script performs the following steps:
1. Updates the binary formats and enables execution of other binary formats in the kernel.
2. Creates a Docker buildx builder and sets it as the active builder.
3. Builds a multi-arch Docker image if the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is specified. It applies labels to the image and pushes it to the specified registry. It also inspects the image and performs cleanup by removing additional unknown images from the container registry.
4. Builds a Docker image if the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is not specified. It applies labels to the image and pushes it to the specified registry.
## gitlab-ci.yml definition
``` yaml title=".gitlab-ci.yml" linenums="1"
--8<-- "docker/build.gitlab-ci.yaml"
```

View File

@ -0,0 +1,102 @@
---
title: docker publish Gitlab CI/CD jobs Template
description: How to use No Fuss Computings gitlab-ci job template to publish a docker image to docker hub.
date: 2023-06-10
template: project.html
about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
---
This GitLab CI template is designed to publish Docker images to Docker Hub. It contains a job called "Publish Docker Image to Docker Hub" that handles the image publishing process.
## Stage
- `publish`
## Variables
The following variables are used in the job:
- `DOCKER_IMAGE_BUILD_NAME`: The name of the Docker image to build. By default, it uses the GitLab CI project name.
- `DOCKER_IMAGE_BUILD_REGISTRY`: The registry for the Docker image build. By default, it uses the GitLab CI registry image.
- `DOCKER_IMAGE_BUILD_TAG`: The tag for the Docker image build. By default, it uses the GitLab CI commit SHA.
- `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS`: A comma-separated list of available platforms for the Docker image build. Supported platforms include: `linux/amd64`, `linux/amd64/v2`, `linux/amd64/v3`, `linux/arm64`, `linux/riscv64`, `linux/ppc64`, `linux/ppc64le`, `linux/s390x`, `linux/386`, `linux/mips64le`, `linux/mips64`, `linux/arm/v7`, `linux/arm/v6`.
- `CI_REGISTRY_USER`: The username for logging in to the GitLab CI registry.
- `CI_REGISTRY_PASSWORD`: The password for logging in to the GitLab CI registry.
- `NFC_DOCKERHUB_USERNAME`: The username for logging in to Docker Hub.
- `NFC_DOCKERHUB_TOKEN`: The access token or password for logging in to Docker Hub.
- `DOCKER_IMAGE_PUBLISH_REGISTRY`: The registry for publishing the Docker image to Docker Hub.
- `DOCKER_IMAGE_PUBLISH_NAME`: The name of the Docker image for publishing to Docker Hub.
- `DOCKER_IMAGE_PUBLISH_URL`: The URL to access the published Docker image on Docker Hub.
## Services
- `docker:23-dind`: Runs Docker in Docker (DinD) service with version 23.
## Script
The job executes the following steps in the `script` section:
1. Logs in to the GitLab CI registry using the provided credentials (`CI_REGISTRY_USER` and `CI_REGISTRY_PASSWORD`).
2. If the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is specified, it iterates over the platforms and inspects the Docker image using `docker buildx imagetools inspect`.
3. If the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is not specified, it pulls the Docker image from the specified registry.
4. Logs in to Docker Hub using the provided credentials (`NFC_DOCKERHUB_USERNAME` and `NFC_DOCKERHUB_TOKEN`).
5. Lists the Docker images using `docker image ls`.
6. Determines the appropriate tag for the Docker image based on the pipeline source and commit tag.
7. If the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is specified, it creates multi-arch images using `docker buildx imagetools create` and tags them with the appropriate tag.
8. If the `DOCKER_IMAGE_BUILD_TARGET_PLATFORMS` variable is not specified, it tags the Docker image with the appropriate tag based on the pipeline source and commit tag.
9. Pushes the Docker image to Docker Hub.
10. Logs out of Docker Hub.
## Environment
The job sets the following environment variables:
- **Name**: DockerHub
- **URL**: The URL to access the published Docker image on Docker Hub.
## Rules
The job is controlled by the following rules:
- Runs when the pipeline is triggered by a Git tag and there is no associated branch.
- Runs when the pipeline is triggered by a push to the `master` branch and there is a Dockerfile present.
- Runs when the pipeline is triggered by a push to the `development` branch, there are changes in the Dockerfile or the `includes/` directory compared to the `master` branch, and it allows failure.
- Never runs explicitly.
## gitlab-ci.yml definition
``` yaml title=".gitlab-ci.yml" linenums="1"
--8<-- "docker/build.gitlab-ci.yaml"
```

View File

@ -12,7 +12,7 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
All commit messages must be in [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/) and have a footer with a gitlab reference. The reference **must** be either a merge request or a gitlab issue. (format i.e. `!1` or `#2` *using the correct reference number*).
### fixing commit messages (suggestion)
### fixing commit messages
If only the last commit is the commit with an error just use `git commit --amend` and edit your commit message to be in the correct format and save. now push your changes.
@ -27,7 +27,7 @@ Run these commands once you have the information above.
``` bash
git format-patch {original_commit}..HEAD -o diff-patches
git format-patch {original_commit}..HEAD -o ../diff-patches
git reset {source_commit} --hard
@ -37,7 +37,7 @@ Now, navigate to the `diff-patches` folder, open up the offending patch (commit)
``` bash
git am diff-patches/*.patch
git am ../diff-patches/*.patch
```
@ -52,31 +52,65 @@ Now push your changes upstream.
| *Ensure that all of your commits were exported prior to reseting the branch and when re-applying, that all of your commits were applied correctly* |
## Gitlab Release - Developer Manual
## GitLab CI Template - Developer Manual
## Job: gitlab_release
This job bumps the version, updates the changelog, creates a git tag and creates a gitlab release. The git tag and release title use [semantic versioning](https://semver.org/). for this job to function correctly a `.cz.yaml` is required in the root of the repository. this file contains the [commitizen](https://github.com/commitizen-tools/commitizen) config and the version details.
This job has the following workflow:
- `master` Branch
> Automatically increment the version
- `development` Branch
> Manual CI job made available to increment the version. (release-candidate increment only)
| :octagonal_sign: Danger |
|:----|
| *If prior to merging to the master branch you do a version increment, and there are no commits prior to merging. the job will not increment the version and the job will fail. it is recommended that you only do a version increment on the `development` branch if you are going to commit further changes to the `development` branch* |
!!! Alert
*If prior to merging to the master branch you do a version increment, and there are no commits prior to merging. the job will not increment the version and the job will fail. it is recommended that you only do a version increment on the `development` branch if you are going to commit further changes to the `development` branch*
This job provides the following badge:
### Stage
- None
`release`
### Dependencies
### Image
- None
The job uses the `registry.gitlab.com/gitlab-org/release-cli:latest` image.
### Variables
The job does not use any additional variables.
### Explanation
The `gitlab_release` job is responsible for creating releases and tags for the GitLab repository. It follows a specific release workflow and utilizes the `release-cli` tool to automate the release process.
### Steps
1. Set ROOT_DIR variable: Sets the `ROOT_DIR` variable based on the value of `JOB_ROOT_DIR`.
2. Create necessary directories: Creates necessary directories for storing artifacts and tests.
3. Install dependencies: Updates the package manager and installs Git and Python 3. Sets up the Python environment by installing required packages.
4. Clone repository: Clones the repository using the provided authentication token and checks out the `development` branch.
5. Configure Git: Configures Git settings for the release process.
6. Perform release steps: Executes release-related steps, such as running a custom command (`$MY_COMMAND`), generating the release changelog, and tagging the release.
7. Push changes: Pushes the changes to the GitLab repository.
8. Cleanup: Removes the cloned repository.
### Rules
- The job is never triggered when `$JOB_STOP_GITLAB_RELEASE` is true.
- The job is never triggered when the commit author is `nfc_bot <helpdesk@nofusscomputing.com>`.
- If the commit is pushed to the `master` branch, the job is only triggered on successful pipeline execution and failure is not allowed.
- If the commit is pushed to the `development` branch, the job is triggered manually and failure is allowed.
### your .gitlab-ci.yml changes
@ -105,40 +139,70 @@ Gitlab Release:
> if you wish to run any commands you can add them to variable `MY_COMMAND`. The custom command will run under shell `/bin/sh`. This command is set to run before the version bump commit is conducted so any changes you wish to add as part of the version bump, you can do here as long as you `git add {changed file name}`.
### CI/CD Variables required
| var name | Description |
|:----:|:----|
| GIT_COMMIT_TOKEN | *this must be a personal token that has write access to the repository* |
| CHANGELOG_FOOTER_REFERENCES | ***Optional** If set to `False` the changelog will not output gitlab references for each entry of the changelog. If this variable is set globally, it will also prevent the creation of the CI job to validate a users commits as having gitlab references.* |
## Job: commit_footer_refs
### Job Workflow
### Stage
This CI job's workflow is:
1. updates the changelog from the commits
1. commit the changelog to git
1. adds a `git tag` to the changelog commit.
1. pushes the change back to the repo
1. creates a git release from the `git tag`
| :octagonal_sign: **NOTE** |
|:----|
| *If the user has forked the branch, they must keep the development brnach synced with the main repo. If they **don't** the CI job 'commit footer refs' will fail as it will not be able to fetch the parent (`development`) hash of the branch.* |
`validation`
### Artifacts
### Image
- `ci commit footer`
> $CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$CI_JOB_NAME.junit.xml
The job uses the `python:3.6-slim` image.
- `Gitlab Release`
> None
### Variables
- `DEFAULT_ROOT_DIR`: The default root directory path.
### Explanation
The `commit_footer_refs` job validates the commit footer references in the GitLab repository. It checks if the commit messages adhere to the conventional commit format and generates a JUnit XML report.
### Conventional Commits
Conventional commits follow a specific format for commit messages, consisting of a type, optional scope, and a message. The format is as follows:
```
<type>(<scope>): <message>
```
- The `<type>` represents the nature of the changes, such as `feat` for a new feature, `fix` for a bug fix, `docs` for documentation changes, and so on.
- The `<scope>` (optional) provides additional context for the commit, indicating the module, component, or area of code being modified.
- The `<message>` contains a concise and descriptive summary of the changes.
The commit footer can contain additional information, such as references to issues, feature requests, or pull requests.
### Steps
1. Create necessary directories: Creates necessary directories for storing artifacts and test results.
2. Set ROOT_DIR variable: Sets the `ROOT_DIR` variable based on the value of `JOB_ROOT_DIR`.
3. Install dependencies: Updates the package manager and installs Git and the required Python packages for the commit footer validation.
4. Clone repository: Clones the repository and checks out the specified branch.
5. Run commit_footer script: Executes the `commit_footer` script to validate the commit footer references.
6. Generate artifacts: Generates a JUnit XML report for the test results.
### Rules
- The job is never triggered when `$JOB_STOP_CONVENTIONAL_COMMITS` is true.
- The job is never triggered when `CHANGELOG_FOOTER_REFERENCES` is false.
- The job is always triggered when the commit is not pushed to the master or development branch, and a .cz.yaml file is present, indicating the usage of conventional commits.
- The job is never triggered otherwise.
## Gitlab job Definition
@ -150,6 +214,3 @@ When you include this definition the following makes up the job definition
--8<-- "gitlab_release/.gitlab-ci.yml"
```
!!! Note
Docs Still under development

View File

@ -16,11 +16,15 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
- other sub folders are for `` which **DO NOT** automagically create jobs, but are pure definitions only.
- notate how each of the stages run and under what circumstance. *i.e. gitlab-ci.yml rules.exist/rules.changes*
## CI Stages
The CI stages for these jobs are as follows, and in the order expected by the jobs:
- chores
> automated tasks
- validation
> validation of files, commits, Merge Request titles, code quality, license checks.

View File

@ -0,0 +1,28 @@
---
title: Automatic Gitlab CI/CD jobs Template
description: How to use No Fuss Computings gitlab-ci template for auto creation of CI/CD joobs.
date: 2023-05-22
template: project.html
about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
---
This template is designed to autodetect which jobs should be created. By including it within your project, the jobs will be automagically created for the pipeline.
## Docs ToDo
- document variables `PIPELINE_RUN_TRIGGER: 'false'` and `PIPELINE_RUN_SCHEDULE: 'false'` as being used as a gate to enable the jobs to run by the specified source.
!!! Note
Docs Still under development
## gitlab-ci.yml definition
``` yaml title=".gitlab-ci.yml" linenums="1"
--8<-- "template/automagic.gitlab-ci.yaml"
```

View File

@ -13,6 +13,8 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
- notate available platforms can be viewed in the job
- notate that resource groups are used. also mention that the resource group allows the git tag pipeline as forced to wait for the previous pipeline, tag push to build the image first
``` yaml
# Available platforms: linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/arm64, linux/riscv64, linux/ppc64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6

View File

@ -1,6 +1,6 @@
---
title: Website Gitlab CI/CD Template
description: How to use No Fuss Computings gitlab-ci template for website jobs
title: mkdocs documentation Gitlab CI/CD Template
description: How to use No Fuss Computings gitlab-ci template for building docs with mkdocs
date: 2023-05-22
template: project.html
about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
@ -13,10 +13,21 @@ This template creates the jobs applicable to publishing pages to a website. The
- notate that var `PAGES_ENVIRONMENT_PATH:` can be set to the slug of the page to show and is used for launching the environment to the url that contains the docs index page.
- notate that resource groups are used.
## Dependencies
- **Mandatory** file `docs/index.md` this is the index page of your dcoumentation.
!!! Note
This template is specifically designed for deployment to https://nofusscomputing.com. However you _may_ be able to override the job definition to use it for your website.
!!! Note
Docs Still under development
## gitlab-ci.yml definition
``` yaml title=".gitlab-ci.yml" linenums="1"
--8<-- "template/mkdocs-documentation.gitlab-ci.yaml"
```

View File

@ -17,9 +17,16 @@
rules:
- if: '$JOB_STOP_GIT_PUSH_MIRROR'
when: never
- if: '$CI_COMMIT_TAG && $GIT_SYNC_URL != null'
when: always
- if: '$CI_COMMIT_BRANCH == "master" && $GIT_SYNC_URL != null'
- if: '$CI_COMMIT_BRANCH == "development" && $GIT_SYNC_URL != null'
- if: $GIT_SYNC_URL == null
when: never
- if: # condition_master_or_dev_push
(
$CI_COMMIT_BRANCH == "master" ||
$CI_COMMIT_BRANCH == "development"
) &&
$CI_PIPELINE_SOURCE == "push"
when: always
- when: never

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-15 00:18:38 +0000 [a3fdca8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a3fdca83bf7acb58d47792a66d1cd0728747361c) - build(version): bump version 0.6.1rc0 → 0.6.1rc1
2023-05-14 11:41:18 +0930 [1db2209](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/1db2209dfb36fbdda28d68388aec9f62f85b57bc) - feat(git_push_mirror): always sync git tag
2023-05-13 15:35:28 +0930 [408e4ea](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/408e4eab9e1f61004f1e38af6d1531747b7da99b) - refactor: move docs as part of restructure

View File

@ -36,7 +36,7 @@
- if [ "0$RELEASE_VERSION_CURRENT" == "0$RELEASE_VERSION_NEW" ]; then echo "[DEBUG] No tag to delete, version was not bumped"; else git tag -d $RELEASE_TAG; fi
- if [ "0$RELEASE_VERSION_CURRENT" == "0$RELEASE_VERSION_NEW" ]; then echo "[DEBUG] No push will be conducted, version was not bumped"; else git push; fi
- if [ "0$RELEASE_VERSION_CURRENT" == "0$RELEASE_VERSION_NEW" ]; then echo "[DEBUG] No release will be created, version was not bumped"; else release-cli create --name "Release $RELEASE_TAG" --tag-name "$RELEASE_TAG" --ref "$RELEASE_TAG_SHA1" --description "$RELEASE_CHANGELOG"; fi
- if [ "0$RELEASE_VERSION_CURRENT" == "0$RELEASE_VERSION_NEW" ]; then echo "[DEBUG] No release will be created, version was not bumped"; else release-cli create --name "Release $RELEASE_TAG" --tag-name "$RELEASE_TAG" --tag-message "$RELEASE_CHANGELOG" --ref "$RELEASE_TAG_SHA1" --description "$RELEASE_CHANGELOG"; fi
- if [ "$CI_COMMIT_BRANCH" == "master" ] ; then git checkout master; fi
- if [ "$CI_COMMIT_BRANCH" == "master" ] ; then git push --set-upstream origin master; fi
- if [ "$CI_COMMIT_BRANCH" == "master" ] ; then git merge --no-ff development; fi
@ -46,18 +46,22 @@
rules:
- if: '$JOB_STOP_GITLAB_RELEASE'
when: never
- if: '$CI_COMMIT_TAG'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: "$CI_COMMIT_AUTHOR =='nfc_bot <helpdesk@nofusscomputing.com>'"
when: never
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- if: # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
allow_failure: false
- if: '$CI_COMMIT_BRANCH == "development"'
when: on_success
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
when: manual
allow_failure: true
# for testing
# - if: '$CI_COMMIT_BRANCH != "master"'
# when: always
@ -84,7 +88,6 @@ commit footer refs:
- git remote add origin $CI_REPOSITORY_URL
- git fetch --all
- git checkout --track origin/$CI_COMMIT_BRANCH
- git submodule update --init
script:
- commit_footer > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$CI_JOB_NAME.junit.xml"
artifacts:
@ -98,11 +101,24 @@ commit footer refs:
rules:
- if: '$JOB_STOP_CONVENTIONAL_COMMITS'
when: never
- if: '$CI_COMMIT_BRANCH == "development" || $CI_COMMIT_BRANCH == "master"'
- if: $CHANGELOG_FOOTER_REFERENCES == "False"
when: never
- if: '$CI_COMMIT_BRANCH && $CHANGELOG_FOOTER_REFERENCES != "False"'
# - if: '$CI_COMMIT_BRANCH == "development" || $CI_COMMIT_BRANCH == "master"'
# when: never
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push" &&
$CI_COMMIT_TAG == null
exists:
- .cz.yaml
changes:
paths:
- "**/**"
compare_to: development
when: always
- when: never
- when: never

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-21 01:48:53 +0930 [088c9fb](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/088c9fb04c80961f4de8d2b129955ae8cd0b9529) - feat(conventional_commits): ensure .cz.yaml exists
2023-05-15 10:25:48 +0930 [18a2808](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/18a280878799fe077efa0ed5b11bceedd53eb5c8) - fix(gitlab_release): allow skip on dev branch
2023-05-15 10:19:49 +0930 [d89941d](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/d89941df05bfed4b0ad1277e715b224d232e7949) - feat(gitlab_release): dont automagic run on dev

View File

@ -57,7 +57,7 @@ class Commits:
footer_line = git_message.split("\n")
footer_line = footer_line[(len(footer_line)-1)]
commit_footer = re.findall(r"([\!|\#][0-9]+)", str(git_message))
commit_footer = re.findall(r"([\!|\#][\d|not]+)", str(git_message))
if len(commit_footer) > 0:
footer = commit_footer

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-23 13:40:13 +0930 [e26f590](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/e26f590ebcf284be949be4e1d337e1f587755446) - fix(md_linting): must lint on git tag
2023-05-23 09:10:19 +0930 [7c385b7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7c385b7552945699eb87ec3ec43169df0cb77297) - refactor(docs): pages dir renamed to docs
2023-05-22 13:43:28 +0930 [065bcbf](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/065bcbf51717e6a29205ced8859a053a2915acd7) - chore(lint): correct lint errors

View File

@ -33,15 +33,38 @@
junit:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
rules:
- if: '$JOB_STOP_ANSIBLE_LINT'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_BRANCH == "master"'
when: always
- if: '$CI_COMMIT_TAG'
when: always
- if: '$CI_COMMIT_BRANCH'
when: always
- when: never
- if: # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}"
when: always
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}"
changes:
paths:
- "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}"
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}"
changes:
paths:
- "{defaults/**,handlers/**,inventory/**,meta/**,playbooks/**,tasks/**}/*.{yaml,yml}"
compare_to: 'development'
when: always
- when: never

View File

@ -29,10 +29,18 @@
junit:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/lint_markdown/*.junit.xml"
rules:
- if: '$CI_COMMIT_BRANCH'
- if: '$JOB_STOP_LINT_MARKDOWN'
when: never
- if: # condition_any_branch_push
$CI_COMMIT_BRANCH != null &&
$CI_COMMIT_TAG == null &&
$CI_PIPELINE_SOURCE == "push"
exists:
- "**.md"
- "**/**.md"
# - "**.md"
# - "**/**.md"
- '{!docs/**,!pages/**,!gitlab-ci/**,!website-template/**,**}/*.md'
when: always
- when: never
@ -42,14 +50,53 @@
MD_LINT_CONFIG_PATH: "$CI_PROJECT_DIR/website-template"
extends: .Lint_Markdown
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: '$JOB_STOP_LINT_MARKDOWN_DOCS'
when: never
- if: '$CI_COMMIT_TAG'
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- "docs/index.md"
- '{docs/**,pages/**}/*.md'
when: always
- if: '$CI_COMMIT_BRANCH'
- if: # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- "docs/index.md"
- '{docs/**,pages/**}/*.md'
when: always
- when: never
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
(
$CI_PIPELINE_SOURCE == "pipeline"
||
$CI_PIPELINE_SOURCE == "push"
||
$CI_PIPELINE_SOURCE == "schedule"
)
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
exists:
- '{docs/**,pages/**}/*.md'
# No changes check # See nofusscomputing/projects/gitlab-ci#34
# changes:
# paths:
# - '{docs/**,pages/**}/*.md'
# compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md' # works
changes:
paths:
#- '{docs/*,pages/*}*.md'
- '{docs/**,pages/**}/*.md'
compare_to: 'development'
when: always
- when: never

View File

@ -1,47 +1,97 @@
.yaml_lint_defaults:
variables:
YAML_LINT_PATH: "."
YAML_LINT_EXTRA_ARGS: "{ extends: $ROOT_DIR/lint/.yamllint.yaml, ignore: [gitlab-ci/*] }"
stage: validation
before_script:
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=gitlab-ci; else ROOT_DIR=$JOB_ROOT_DIR ; fi
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
- export PYTHON_VERSION=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'`
- apt update
- apt install --no-install-recommends -y git
- python3 -m venv env
- . env/bin/activate
- pip install --upgrade pip
- pip install -r $ROOT_DIR/lint/requirements.txt
- mkdir $PYTHON_VERSION
script:
- echo "[DEBUG] YAML_LINT_PATH[$YAML_LINT_PATH]"
- echo "[DEBUG] YAML_LINT_CONFIG[$YAML_LINT_CONFIG]"
- yamllint $YAML_LINT_PATH -f parsable -d "$(echo $YAML_LINT_EXTRA_ARGS)" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log" 1>&1 || YAML_LINT=$?
- cat "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log" | ansible-lint-to-junit-xml > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-yaml-lint.junit.xml"
- if [ $YAML_LINT > 0 ]; then echo "YAML lint failed with $YAML_LINT"; exit $YAML_LINT; fi
after_script:
- echo deactivate
artifacts:
expire_in: 3 days
when: always
variables:
YAML_LINT_PATH: "."
YAML_LINT_EXTRA_ARGS: "{ extends: $ROOT_DIR/lint/.yamllint.yaml, ignore: [gitlab-ci/*, website-template/*] }"
stage: validation
before_script:
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=gitlab-ci; else ROOT_DIR=$JOB_ROOT_DIR ; fi
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
- export PYTHON_VERSION=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'`
- apt update
- apt install --no-install-recommends -y git
- python3 -m venv env
- . env/bin/activate
- pip install --upgrade pip
- pip install -r $ROOT_DIR/lint/requirements.txt
- mkdir $PYTHON_VERSION
script:
- echo "[DEBUG] YAML_LINT_PATH[$YAML_LINT_PATH]"
- echo "[DEBUG] YAML_LINT_CONFIG[$YAML_LINT_CONFIG]"
- yamllint $YAML_LINT_PATH -f parsable -d "$(echo $YAML_LINT_EXTRA_ARGS)" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log" 1>&1 || YAML_LINT=$?
- cat "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log" | ansible-lint-to-junit-xml > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-yaml-lint.junit.xml"
- if [ $YAML_LINT > 0 ]; then echo "YAML lint failed with $YAML_LINT"; exit $YAML_LINT; fi
after_script:
- echo deactivate
artifacts:
expire_in: 3 days
when: always
paths:
- "artifacts/*"
reports:
junit:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
rules:
- if: '$JOB_STOP_YAML_LINT'
when: never
- if: '$CI_COMMIT_BRANCH == "master" &&
( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")'
when: always
- if: '$CI_COMMIT_BRANCH &&
( $CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "pipeline")'
exists:
- '{!gitlab-ci/**/*,!website-template/**/*,!.gitlab-ci,!*gitlab-ci*,**/*,**}.{yml,yaml}'
# - ".gitlab-ci*"
# - "**/*gitlab-ci*"
changes:
paths:
- "artifacts/*"
reports:
junit:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml"
rules:
- if: '$JOB_STOP_YAML_LINT'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_TAG'
when: always
- if: '$CI_COMMIT_BRANCH == "master"'
when: always
- if: '$CI_COMMIT_BRANCH'
when: always
- when: never
- '{!gitlab-ci/**/*,!website-template/**/*,!.gitlab-ci,!*gitlab-ci*,**/*,**}.{yml,yaml}'
compare_to: 'master'
when: always
- when: never
.Gitlab_CI.Lint.YAML:
variables:
YAML_LINT_PATH: ".gitlab-ci* ./**/*gitlab-ci*"
YAML_LINT_EXTRA_ARGS: "{ extends: lint/.yamllint.yaml,ignore: [gitlab-ci/*,website-template/*] }"
extends:
- .yaml_lint_defaults
rules:
- if: # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{*,**/**,**}/*gitlab-ci*'
when: always
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{*,**/**,**}/*gitlab-ci*'
changes:
paths:
- '{*,**/**,**}/*gitlab-ci*'
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{*,**/**,**}/*gitlab-ci*'
changes:
paths:
- '{*,**/**,**}/*gitlab-ci*'
compare_to: 'development'
when: always
- when: never

View File

@ -20,24 +20,36 @@ nav:
- Gitlab CI:
- Build:
- projects/gitlab-ci/docker_build.md
- projects/gitlab-ci/mkdocs-build.md
- Chores:
- projects/gitlab-ci/ansible_playbook.md
- Linting:
- projects/gitlab-ci/markdown_lint.md
- projects/gitlab-ci/yaml_lint.md
- Publish:
- projects/gitlab-ci/docker_publish.md
- Templates:
- projects/gitlab-ci/templates/index.md
- projects/gitlab-ci/templates/ansible_roles.md
- projects/gitlab-ci/templates/automagic.md
- projects/gitlab-ci/templates/docker_container.md
- projects/gitlab-ci/templates/website.md
- projects/gitlab-ci/templates/documentation_mkdocs.md
- Validation:

View File

@ -1,5 +1,5 @@
.MKDocs_Build:
image: python:3.7.5-buster
image: python:3.11.2-bullseye
stage: build
variables:
GIT_DEPTH: 0
@ -23,16 +23,112 @@
paths:
- "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
rules:
- if: '$JOB_STOP_MKDOCS_BUILD'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: $CI_COMMIT_TAG
when: on_success
- if: '$CI_COMMIT_BRANCH'
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- "mkdocs.yaml"
- "mkdocs.yml"
- 'mkdocs.{yaml,yml}'
when: always
# - if: # condition_master_branch_push
# $CI_COMMIT_BRANCH == "master" &&
# $CI_PIPELINE_SOURCE == "push"
# exists:
# - 'mkdocs.{yaml,yml}'
# when: always
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
(
$CI_PIPELINE_SOURCE == "pipeline"
||
$CI_PIPELINE_SOURCE == "push"
||
$CI_PIPELINE_SOURCE == "schedule"
)
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
exists:
- 'mkdocs.{yaml,yml}'
# No changes check # See nofusscomputing/projects/gitlab-ci#34
# changes:
# paths:
# - '{docs/**,pages/**}/*.md'
# compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- 'mkdocs.{yaml,yml}'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'development'
when: always
- when: never
.MKDocs_Build_Docs:
extends: .MKDocs_Build
variables:
MKDOCS_SOURCE_PATH: docs
rules:
- if: '$JOB_STOP_MKDOCS_BUILD'
when: never
# Build docs on tag so they can be downloaded from the tag job and are always available.
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- '{docs/**,pages/**}/*.md'
when: always
# - if: # condition_master_branch_push
# $CI_COMMIT_BRANCH == "master" &&
# $CI_PIPELINE_SOURCE == "push"
# exists:
# - '{docs/**,pages/**}/*.md'
# when: always
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
(
$CI_PIPELINE_SOURCE == "pipeline"
||
$CI_PIPELINE_SOURCE == "push"
||
$CI_PIPELINE_SOURCE == "schedule"
)
# See nofusscomputing/projects/gitlab-ci#34 for extra $CI_PIPELINE_SOURCE
exists:
- 'mkdocs.{yaml,yml}'
# No changes check # See nofusscomputing/projects/gitlab-ci#34
# changes:
# paths:
# - '{docs/**,pages/**}/*.md'
# compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'development'
when: always
- when: never

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-23 09:46:43 +0930 [7a9aca3](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7a9aca3a54b1faacb7e286bade84aff0ff4fd2e5) - fix(mkdocs): default to docs directory as root
2023-05-22 18:05:24 +0930 [71a335c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/71a335c2667505c199bd67446327cd8794de5f52) - feat(mkdocs): install website-template requirements
2023-05-22 13:20:27 +0930 [a0b6d05](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a0b6d05a0f3f0fa84c825007f6ec9f28c945f3ef) - feat(mkdocs_build): always build

View File

@ -1,9 +1,9 @@
mkdocs==1.2.3
mkdocs-minify-plugin==0.5.0
mkdocs-material-extensions==1.0.3
mkdocs==1.5.3
mkdocs-minify-plugin==0.8.0
mkdocs-material-extensions==1.3.1
wheel
mkdocs-material==8.1.7
mkdocs-material==9.5.6
./website-template/custom-plugins/mkdocs-plugin-tags
mkdocs-git-revision-date-localized-plugin==0.11.1
pymdown-extensions==9.1
Jinja2==3.0.3
mkdocs-git-revision-date-localized-plugin==1.2.2
pymdown-extensions==10.7
Jinja2==3.1.3

View File

@ -5,48 +5,81 @@
}" > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/badge_pylint.json"
.PyLint:
variables:
PYLINT_PATH: "/*/python-module/*/*.py"
PYLINT_RC_PATH: "/python/.pylintrc"
stage: validation
before_script:
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=gitlab-ci; else ROOT_DIR=$JOB_ROOT_DIR ; fi
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
- export PYTHON_VERSION=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'`
- apt update
- apt install --no-install-recommends -y git
- python3 -m venv env
- . env/bin/activate
- pip install --upgrade pip
- pip install -r $ROOT_DIR/python/requirements.txt
- mkdir $PYTHON_VERSION
script:
- PYLINT_PATH=$ROOT_DIR$PYLINT_PATH
- echo "[DEBUG] PYLINT_PATH[$PYLINT_PATH]"
- PYLINT_RC_PATH=$ROOT_DIR$PYLINT_RC_PATH
- echo "[DEBUG] PYLINT_RC_PATH[$PYLINT_RC_PATH]"
- python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $PYLINT_PATH > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json"
variables:
PYLINT_PATH: "/*/python-module/*/*.py"
PYLINT_RC_PATH: "/python/.pylintrc"
stage: validation
before_script:
- if [ "0$JOB_ROOT_DIR" == "0" ]; then ROOT_DIR=gitlab-ci; else ROOT_DIR=$JOB_ROOT_DIR ; fi
- echo "[DEBUG] ROOT_DIR[$ROOT_DIR]"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"
- mkdir -p "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests"
- export PYTHON_VERSION=`python -c 'import sys; version=sys.version_info[:3]; print("{0}.{1}.{2}".format(*version))'`
- apt update
- apt install --no-install-recommends -y git
- python3 -m venv env
- . env/bin/activate
- pip install --upgrade pip
- pip install -r $ROOT_DIR/python/requirements.txt
- mkdir $PYTHON_VERSION
script:
- PYLINT_PATH=$ROOT_DIR$PYLINT_PATH
- echo "[DEBUG] PYLINT_PATH[$PYLINT_PATH]"
- PYLINT_RC_PATH=$ROOT_DIR$PYLINT_RC_PATH
- echo "[DEBUG] PYLINT_RC_PATH[$PYLINT_RC_PATH]"
- python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter $PYLINT_PATH > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json"
- python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter $PYLINT_PATH > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html"
- python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter $PYLINT_PATH > "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html"
- PyPIScore=$(python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero $PYLINT_PATH | sed -n 's/^Your code has been rated at \([-0-9./]*\).*/\1/p')
- PyPIScore=$(python3 -m pylint --rcfile $PYLINT_RC_PATH --exit-zero $PYLINT_PATH | sed -n 's/^Your code has been rated at \([-0-9./]*\).*/\1/p')
- *pylint_badge
- *pylint_badge
after_script:
- echo deactivate
artifacts:
expire_in: 1 days
when: always
paths:
- "artifacts/*"
reports:
codequality: "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json"
rules:
- if: # condition_master_branch_push
$CI_COMMIT_BRANCH == "master" &&
$CI_PIPELINE_SOURCE == "push"
exists:
#- '{**/,*,!gitlab-ci/**,!website-template/**}*.py'
- '{**/,*}*.py'
when: always
after_script:
- echo deactivate
artifacts:
expire_in: 1 days
when: always
- if: # condition_development_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
#- '{**/,*,!gitlab-ci/**,!website-template/**}*.py'
- '{**/,*}*.py'
changes:
paths:
- "artifacts/*"
reports:
codequality: "$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json"
rules:
- if: '$CI_COMMIT_BRANCH'
when: always
- when: never
#- '{**/,*,!gitlab-ci/**,!website-template/**}*.py'
- '{**/,*}*.py'
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
#- '{**/,*,!gitlab-ci/**,!website-template/**}*.py'
- '{**/,*}*.py'
changes:
paths:
#- '{**/,*,!gitlab-ci/**,!website-template/**}*.py'
- '{**/,*}*.py'
compare_to: 'development'
when: always
- when: never

View File

@ -1,5 +1,7 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-15 00:18:38 +0000 [a3fdca8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/a3fdca83bf7acb58d47792a66d1cd0728747361c) - build(version): bump version 0.6.1rc0 → 0.6.1rc1
2023-05-13 15:35:28 +0930 [408e4ea](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/408e4eab9e1f61004f1e38af6d1531747b7da99b) - refactor: move docs as part of restructure
2022-01-25 00:08:05 +0000 [ce1cc01](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/ce1cc017e26ff7f6cee586cc7d98e4d292275672) - build(version): bump version 0.6.0 → 0.6.1rc0

View File

@ -3,7 +3,7 @@
for D in *; do
if [ -d "${D}" ]; then
if [ "0${D}" != "0website-template" ]; then
if [ "0${D}" != "0website-template" ] && [ "0${D}" != "0docs" ]; then
echo "[DEBUG] Creating changelog for sub-folder: ${D}"
CHANGELOG_DATA=$(git log --pretty="format:%ci [%h](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/%H) - %s " --follow -- "${D}")

View File

@ -1,5 +1,9 @@
# Changelog
2023-05-28 10:31:26 +0930 [bade89c](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bade89c5333ca853844e224f46a2d3dafab7179d) - fix(scheduled_pipelines): if scheduled pipeline only run schedualable jobs
2023-05-27 15:24:21 +0930 [19dde28](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/19dde28526d5e3f7694da3246505537aa2e19c10) - chore: fix linting error
2023-05-27 15:21:27 +0930 [c5d27e8](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/c5d27e832e100156cb99c5ca580fd5a8eb600e0f) - feat(auto_jobs): created initial template to auto-create jobs
2023-05-24 04:40:52 +0000 [0a17fe1](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0a17fe1aa320c658c05d7a693ff76af4a54e6130) - build(version): bump version 0.6.1rc1 → 0.6.1rc2
2023-05-23 12:37:40 +0930 [bef7684](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/bef76847ec686fcff92229d7b9be0bcfc7b267da) - feat(template_website): enable specifying the url slug
2023-05-23 09:10:19 +0930 [7c385b7](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/7c385b7552945699eb87ec3ec43169df0cb77297) - refactor(docs): pages dir renamed to docs
2023-05-22 13:45:03 +0930 [0b9e737](https://gitlab.com/nofusscomputing/projects/gitlab-ci/-/commit/0b9e7375c911d65e06b0d801755449ab31cb45ea) - fix(template): use correct path for build artifact

View File

@ -15,6 +15,8 @@ Ansible Lint (python 3.11):
extends:
- .ansible_linter_defaults
image: python:3.11-slim
resource_group: build
needs: []
Gitlab Release:

View File

@ -0,0 +1,52 @@
# This gitlab-ci file is used for the autocreation of ci jobs.
# by including this file, the jobs will be autocreated if they are detected as required.
variables:
NFC_AUTO_JOBS: 'true'
include:
- local: $JOB_ROOT_DIR/.gitlab-ci_common.yaml
# Chore
- local: $JOB_ROOT_DIR/automation/.gitlab-ci-ansible.yaml
# Validation
- local: $JOB_ROOT_DIR/lint/ansible.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/conventional_commits/.gitlab-ci.yml
# sync
- local: $JOB_ROOT_DIR/git_push_mirror/.gitlab-ci.yml
# release
- local: $JOB_ROOT_DIR/gitlab_release/.gitlab-ci.yml
# templates
- local: $JOB_ROOT_DIR/template/ansible-role.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/docker-image.gitlab-ci.yaml
- local: $JOB_ROOT_DIR/template/mkdocs-documentation.gitlab-ci.yaml
#
# Chores
#
Update Git Submodules:
extends: .ansible_playbook_git_submodule
Search Issues for git patches:
extends: .ansible_playbook_mr_from_issue_comment_patch
#
# Release
#
Gitlab Release:
extends:
- .gitlab_release
#
# Sync
#
Github (Push --mirror):
extends:
- .git_push_mirror
needs: []

View File

@ -28,10 +28,51 @@ variables:
Docker Container:
extends: .build_docker_container
resource_group: build
needs: []
Docker Hub:
Docker.Hub.Branch.Publish:
extends: .publish-docker-hub
needs: [ "Docker Container" ]
resource_group: build
rules: # rules manually synced from docker/publish.gitlab-ci.yaml removing git tag
# - if: # condition_master_branch_push
# $CI_COMMIT_BRANCH == "master" &&
# $CI_PIPELINE_SOURCE == "push"
# exists:
# - '{dockerfile,dockerfile.j2}'
# when: always
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{dockerfile,dockerfile.j2}'
changes:
paths:
- '{dockerfile,dockerfile.j2,includes/**/*}'
compare_to: 'master'
allow_failure: true
when: on_success
- when: never
Docker.Hub.Tag.Publish:
extends: .publish-docker-hub
resource_group: build
rules: # rules manually synced from docker/publish.gitlab-ci.yaml only keeping git tag
- if: # condition_git_tag
$CI_COMMIT_TAG != null &&
$CI_COMMIT_BRANCH == null
exists:
- '{dockerfile,dockerfile.j2}'
when: always
- when: never
Gitlab Release:

View File

@ -0,0 +1,63 @@
# This gitlab-ci file is used for creating building pages directories for nofusscomputing.com.
# by including this file, the jobs will be autocreated and only for pages jobs.
include:
- local: $JOB_ROOT_DIR/.gitlab-ci_common.yaml
- local: $JOB_ROOT_DIR/mkdocs/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/lint/markdown.gitlab-ci.yaml
Documentation.Lint:
extends: .Lint_Markdown_Docs
needs: []
Documentation.Build:
extends: .MKDocs_Build_Docs
needs: [ 'Documentation.Lint' ]
resource_group: Documentation
# this name must always be called 'pages' so that gitlab pages work
pages:
stage: deploy
resource_group: Documentation
variables:
GIT_STRATEGY: none
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Documentation.Build/build" public
needs: [ 'Documentation.Build' ]
environment:
name: Gitlab Pages
url: $CI_PAGES_URL/$PAGES_ENVIRONMENT_PATH
artifacts:
paths:
- public
rules:
- if: '$JOB_STOP_GITLAB_PAGES'
when: never
- if: # condition_dev_branch_push
$CI_COMMIT_BRANCH == "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'master'
when: always
- if: # condition_not_master_or_dev_push
$CI_COMMIT_BRANCH != "master" &&
$CI_COMMIT_BRANCH != "development" &&
$CI_PIPELINE_SOURCE == "push"
exists:
- '{docs/**,pages/**}/*.md'
changes:
paths:
- '{docs/**,pages/**}/*.md'
compare_to: 'development'
allow_failure: true
when: manual
- when: never

View File

@ -1,53 +0,0 @@
# This gitlab-ci file is used for creating building pages directories for nofusscomputing.com.
# by including this file, the jobs will be autocreated and only for pages jobs.
include:
- local: $JOB_ROOT_DIR/.gitlab-ci_common.yaml
- local: $JOB_ROOT_DIR/mkdocs/.gitlab-ci.yml
- local: $JOB_ROOT_DIR/lint/markdown.gitlab-ci.yaml
Website.Lint:
extends: .Lint_Markdown_Docs
Website.Build:
variables:
MKDOCS_SOURCE_PATH: docs
extends: .MKDocs_Build
needs: [ 'Website.Lint' ]
pages:
stage: deploy
variables:
GIT_STRATEGY: none
PAGES_ENVIRONMENT_PATH: ''
script:
- mv "$CI_PROJECT_DIR/artifacts/build/Website.Build/build" public
needs: [ 'Website.Build' ]
environment:
name: staging
url: $CI_PAGES_URL/$PAGES_ENVIRONMENT_PATH
artifacts:
paths:
- public
rules:
- if: '$JOB_STOP_GITLAB_PAGES'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: $CI_COMMIT_TAG
when: never
- if: '$CI_COMMIT_BRANCH == "development"'
exists:
- "mkdocs.yaml"
- "mkdocs.yml"
when: always
- if: '$CI_COMMIT_BRANCH && $CI_COMMIT_BRANCH != "master"'
exists:
- "mkdocs.yaml"
- "mkdocs.yml"
when: manual
allow_failure: true
- when: never