Commit 9978742e authored by Ruben ten Hove's avatar Ruben ten Hove
Browse files

Merge branch 'rhtenhove-main-patch-22757' into 'main'

fix: dasel pin version + manage settings here

See merge request just-ci/templates!178
parents 205a78fa d870a6ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@
include:
  - local: project-automation/workflow.yml
  - local: project-automation/find-next-release.yml
  - local: project-automation/gitlab-recommended.yml
  - local: project-automation/gitlab/recommended.yml
  - local: project-automation/semantic-release.yml
  - local: project-automation/generic.yaml
  - local: python/tbump.yml
+36 −0
Original line number Diff line number Diff line
---
# This file contains recommended settings for a GitLab project.
# Based on values given by the GitLab API.

merge_requests_enabled:
  recommended: true
  hint: Enable merge requests.
merge_method:
  recommended: merge
  hint:
    To ensure a full history of what happened with your code, never use fast
    forward. Set 'Merge method' to 'Merge commit'
only_allow_merge_if_pipeline_succeeds:
  recommended: true
  hint:
    Only allow merging when the pipeline succeeds, to ensure no broken code can
    be merged.
only_allow_merge_if_all_discussions_are_resolved:
  recommended: true
  hint:
    Ensure all discussions are resolved before merging. Tedious perhaps, but
    reduces mistakes.
allow_merge_on_skipped_pipeline:
  recommended: false
  hint: Do not allow merging on skipped pipelines.
remove_source_branch_after_merge:
  recommended: true
  hint:
    To keep your repo clean, remove source branches when merge requests are
    merged.
# approvals_before_merge:
#   recommended: higher than
#   hint: ToDo. Needs different checking logic
autoclose_referenced_issues:
  recommended: true
  hint: Set auto close referenced issues.
+4 −4
Original line number Diff line number Diff line
@@ -11,14 +11,14 @@ include:
gitlab:recommended:
  stage: test
  image:
    name: docker.io/alpine:latest
    name: ghcr.io/tomwright/dasel:v1.27.3-alpine
    entrypoint: [""]
  variables:
    GIT_STRATEGY: none
  script:
    - apk add curl "dasel<2"
    - wget https://gitlab.com/just-ci/utils/-/raw/main/gitlab/best-practices.yml
      -qO .settings.yml
    - apk add curl
    - wget -qO .settings.yml
      https://gitlab.com/just-ci/templates/-/raw/v6.24.1/project-automation/gitlab/recommended-settings.yml
    - FILE=project_${CI_PROJECT_ID}_details
    - |
      curl -sSLf -H "PRIVATE-TOKEN: ${GL_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}" -o ${FILE}.json
+3 −0
Original line number Diff line number Diff line
@@ -13,3 +13,6 @@ tag_template = "v{new_version}"
src = "README.md"
[[file]]
src = "container/readme.md"
[[file]]
src = "project-automation/gitlab/recommended-settings.yml"
search = '-/raw/v{current_version}/project-automation'