From a2a54c85e74d360205049340a1f05d1187bf37e9 Mon Sep 17 00:00:00 2001 From: Duncan Dam Date: Thu, 11 Apr 2024 15:57:34 +0700 Subject: [PATCH 1/3] gitlab integration --- .chglog/CHANGELOG.tpl.md | 49 +++++++++++++++++++++++++ .chglog/config.yml | 18 +++++++++ .gitlab-ci.yml | 12 ++++++ charts/firehose-antelope/.gitlab-ci.yml | 6 +++ 4 files changed, 85 insertions(+) create mode 100644 .chglog/CHANGELOG.tpl.md create mode 100644 .chglog/config.yml create mode 100644 .gitlab-ci.yml create mode 100644 charts/firehose-antelope/.gitlab-ci.yml diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100644 index 0000000..389e978 --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,49 @@ +{{ if .Versions -}} + +## [Unreleased] + +{{ if .Unreleased.CommitGroups -}} +{{ range .Unreleased.CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]{{ else }}{{ .Tag.Name }}{{ end }} - {{ datetime "2006-01-02" .Tag.Date }} +{{ range .CommitGroups -}} +### {{ .Title }} +{{ range .Commits -}} +- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .RevertCommits -}} +### Reverts +{{ range .RevertCommits -}} +- {{ .Revert.Header }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} + +{{- if .Versions }} +[Unreleased]: {{ .Info.RepositoryURL }}/compare/{{ $latest := index .Versions 0 }}{{ $latest.Tag.Name }}...HEAD +{{ range .Versions -}} +{{ if .Tag.Previous -}} +[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }} +{{ end -}} +{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100644 index 0000000..f986743 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,18 @@ +style: gitlab +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://gitlab.com/ultraio/devops/dfuse +options: + commits: + commit_groups: + header: + pattern: "^(\\[UI-\\d{4,}\\] )?(build|ci|chore|docs|feat|fix|perf|refactor|style|test|release)(\\(.*\\))?:\\s(.+)$" + pattern_maps: + - None + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..51c5d53 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +stages: + - lint + - test + - release + +workflow: + rules: + - if: $CI_PIPELINE_SOURCE == "external_pull_request_event" + - if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + +include: + - charts/firehose-antelope/.gitlab-ci.yml \ No newline at end of file diff --git a/charts/firehose-antelope/.gitlab-ci.yml b/charts/firehose-antelope/.gitlab-ci.yml new file mode 100644 index 0000000..13ae421 --- /dev/null +++ b/charts/firehose-antelope/.gitlab-ci.yml @@ -0,0 +1,6 @@ +include: + - project: ultraio/devops/helm-charts + file: .gitlab/ci-templates/chart.yaml + inputs: + chart: operator-v1 + location: "" # Workaround because '.' is not evaluated correctly with rules:changes \ No newline at end of file From 19c266c9d1d984645953106296777991011f9e12 Mon Sep 17 00:00:00 2001 From: Duncan Dam Date: Thu, 11 Apr 2024 16:01:53 +0700 Subject: [PATCH 2/3] small fix --- .chglog/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.chglog/config.yml b/.chglog/config.yml index f986743..f37724a 100644 --- a/.chglog/config.yml +++ b/.chglog/config.yml @@ -2,7 +2,7 @@ style: gitlab template: CHANGELOG.tpl.md info: title: CHANGELOG - repository_url: https://gitlab.com/ultraio/devops/dfuse + repository_url: https://gitlab.com/ultraio/blockchain/substreams-charts options: commits: commit_groups: From f7daed44f30a8e107e275823ddd129ea3002f04a Mon Sep 17 00:00:00 2001 From: Duncan Dam Date: Thu, 11 Apr 2024 16:03:24 +0700 Subject: [PATCH 3/3] update --- charts/firehose-antelope/.gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/firehose-antelope/.gitlab-ci.yml b/charts/firehose-antelope/.gitlab-ci.yml index 13ae421..2c7402b 100644 --- a/charts/firehose-antelope/.gitlab-ci.yml +++ b/charts/firehose-antelope/.gitlab-ci.yml @@ -2,5 +2,5 @@ include: - project: ultraio/devops/helm-charts file: .gitlab/ci-templates/chart.yaml inputs: - chart: operator-v1 + chart: firehose-antelope location: "" # Workaround because '.' is not evaluated correctly with rules:changes \ No newline at end of file