diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f101ca2f91..12fb5b9f6d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,26 +59,9 @@ variables: - NetworkManager-1*.tar.xz - NetworkManager-1*.src.rpm -################################################################# -# # -# prep stage # -# # -################################################################# - -# Re-generate the .gitlab-ci.yml file and make sure it's the one currently checked in -# If this job fails, re-generate the gitlab-ci.yml script and git commit it. -# -check-ci-script: - image: golang:alpine - stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates - script: - - ci-fairy generate-template - - git diff --exit-code && exit 0 || true - - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" - - exit 1 +.nm_artifacts_undo: + artifacts: + paths: [] ################################################################# # # @@ -778,16 +761,26 @@ t_centos:8.1.1911: # specific jobs # # # ################################################################# -checkpatch: + +check-patch: extends: - t_fedora:33 + - .nm_artifacts_undo + stage: test + script: + - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh + allow_failure: true + +check-tree: + extends: + - t_fedora:33 + - .nm_artifacts_undo stage: test script: - date '+%Y%m%d-%H%M%S'; black --check . examples/python/gi/nm-wg-set - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh - - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh - allow_failure: true + - date '+%Y%m%d-%H%M%S'; ci-fairy generate-template && git diff --exit-code pages: stage: deploy diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index eb8b67502e..e2291bf036 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -49,26 +49,9 @@ variables: - NetworkManager-1*.tar.xz - NetworkManager-1*.src.rpm -################################################################# -# # -# prep stage # -# # -################################################################# - -# Re-generate the .gitlab-ci.yml file and make sure it's the one currently checked in -# If this job fails, re-generate the gitlab-ci.yml script and git commit it. -# -check-ci-script: - image: golang:alpine - stage: prep - before_script: - - apk add python3 py-pip git - - pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates - script: - - ci-fairy generate-template - - git diff --exit-code && exit 0 || true - - echo "Committed gitlab-ci.yml differs from generated gitlab-ci.yml. Please verify" - - exit 1 +.nm_artifacts_undo: + artifacts: + paths: [] ################################################################# # # @@ -192,17 +175,26 @@ t_{{distro.name}}:{{version}}: # specific jobs # # # ################################################################# -checkpatch: + +check-patch: extends: - {# run checkpatch on the same image that generates pages because why not #} - t_{{pages_build.name}}:{{pages_build.version}} + - .nm_artifacts_undo + stage: test + script: + - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh + allow_failure: true + +check-tree: + extends: + - t_{{pages_build.name}}:{{pages_build.version}} + - .nm_artifacts_undo stage: test script: - date '+%Y%m%d-%H%M%S'; black --check . examples/python/gi/nm-wg-set - date '+%Y%m%d-%H%M%S'; git ls-files -z -- 'po/*.po' | xargs -0 -n1 msgfmt -vc - date '+%Y%m%d-%H%M%S'; contrib/scripts/nm-code-format.sh - - date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh - allow_failure: true + - date '+%Y%m%d-%H%M%S'; ci-fairy generate-template && git diff --exit-code pages: stage: deploy diff --git a/.gitlab-ci/fedora-install.sh b/.gitlab-ci/fedora-install.sh index d48fd397a6..6b4fce0e74 100755 --- a/.gitlab-ci/fedora-install.sh +++ b/.gitlab-ci/fedora-install.sh @@ -46,3 +46,8 @@ contrib/scripts/nm-ci-patch-gtkdoc.sh || true if [ -x /usr/bin/ninja ] && ! [ -x /usr/bin/ninja-build ]; then ln -s /usr/bin/ninja-build /usr/bin/ninja fi + +if [ $IS_FEDORA = 1 ]; then + dnf install -y python3-pip + pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates +fi