Skip to content

Commit fea53e0

Browse files
committed
Merge branch 'mr/boris/git-url' into 'master'
Use git indirections Closes eng/projects/issues#7 See merge request eng/das/cov/gnatcoverage!719 Fixes eng/projects/issues#7
2 parents c3ddce6 + 951f122 commit fea53e0

File tree

2 files changed

+11
-25
lines changed

2 files changed

+11
-25
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,19 @@ workflow:
66
variables:
77
PACKAGE_BASE_NAME: gnatcoverage.tar.gz
88
PACKAGE_ABSOLUTE_NAME: $CI_PROJECT_DIR/$PACKAGE_BASE_NAME
9-
GITLAB_REMOTE: "https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}:${CI_SERVER_PORT}/"
109

1110
include:
11+
- component: $CI_SERVER_FQDN/eng/gitlab-templates/pre-commit@~latest
12+
inputs:
13+
stage: test
1214
#TODO: workaround to allow dynamically setting the interruptible policy until https://gitlab.com/gitlab-org/gitlab/-/issues/194023 is implemented
1315
- local: utils/ci/interruptible.yml
1416
rules:
15-
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
17+
- if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH
1618
- project: eng/codepeer/ci-registry
1719
file: /gnatsas-on-gnatcov.yml
1820

1921
.basic_setup: &basic_setup
20-
- unset GITLAB_TOKEN
2122
- generic_anod_ci --add-dep eng/das/cov/gnatcoverage-extra
2223
- cat /tmp/ci_env.sh
2324
- . /tmp/ci_env.sh
@@ -205,20 +206,10 @@ test_spark:
205206

206207
<<: *artifacts
207208

208-
stylechecks:
209-
interruptible: true
210-
stage: test
211-
services:
212-
- image:pe-base
213-
- run_as_root:false
214-
needs: []
215-
script:
216-
- *basic_setup
217209

218-
- git config --global --add
219-
url."${GITLAB_REMOTE}".insteadOf "git@ssh.gitlab.adacore-it.com:"
220-
- git config --global --add
221-
url."${GITLAB_REMOTE}".insteadOf "ssh://git@ssh.gitlab.adacore-it.com/"
210+
pre-commit:
211+
before_script:
212+
- *basic_setup
222213

223214
# Install the clang-format executable and make it available
224215
- anod install libclang -Qstable
@@ -229,14 +220,9 @@ stylechecks:
229220
- . /tmp/venv/bin/activate
230221
- python -m pip install colorama pre-commit
231222

232-
- cd $CI_PROJECT_DIR
233-
234-
- pre-commit install
235-
- pre-commit install-hooks
236-
- pre-commit run -a --show-diff-on-failure
237-
238223
- python .check-formatting.py --force-colors
239224

225+
240226
#################
241227
# Optional jobs #
242228
#################

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
repos:
2-
- repo: git@ssh.gitlab.adacore-it.com:eng/shared/mirrors/pre-commit-clang-format
2+
- repo: https://github.com/doublify/pre-commit-clang-format
33
rev: 62302476d0da01515660132d76902359bed0f782
44
hooks:
55
- id: clang-format
@@ -18,7 +18,7 @@ repos:
1818
Maximum: -1
1919
}
2020
}"]
21-
- repo: git@ssh.gitlab.adacore-it.com:it/flake8.git
21+
- repo: https://github.com/pycqa/flake8
2222
rev: 7.1.1
2323
hooks:
2424
- id: flake8
@@ -28,7 +28,7 @@ repos:
2828
- flake8-comprehensions
2929
- pygments
3030
args: ["--config=.flake8"]
31-
- repo: git@ssh.gitlab.adacore-it.com:it/black.git
31+
- repo: https://github.com/psf/black
3232
rev: 24.10.0
3333
hooks:
3434
- id: black

0 commit comments

Comments
 (0)