[CI/CD] Create a .skipci file on build-ui.

If new commits are pushed by the step then another pipeline will be
triggered. We shouldn't proceed with the following steps.
This commit is contained in:
Fabio Manganiello 2023-12-29 23:49:42 +01:00
parent 2575d6cbc5
commit e3ea315276
Signed by: blacklight
GPG key ID: D90FBA7F76362774
2 changed files with 22 additions and 0 deletions

View file

@ -181,6 +181,8 @@ steps:
- tests - tests
commands: commands:
- export SKIPCI="$PWD/.skipci"
- rm -rf "$SKIPCI"
- apk add --update --no-cache git - apk add --update --no-cache git
# Backup the original git configuration before changing attributes # Backup the original git configuration before changing attributes
@ -210,6 +212,10 @@ steps:
exit 0 exit 0
fi fi
# Create a .skipci file to mark the fact that the next steps should be skipped
# (we're going to do another push anyway, so another pipeline will be triggered)
- touch "$SKIPCI"
- apk add --update --no-cache bash gnupg openssh - apk add --update --no-cache bash gnupg openssh
- mkdir -p ~/.ssh - mkdir -p ~/.ssh
- | - |
@ -261,6 +267,9 @@ steps:
- build-ui - build-ui
commands: commands:
- |
[ -f .skipci ] && exit 0
- echo "-- Installing dependencies" - echo "-- Installing dependencies"
- apk add --update --no-cache curl git openssh pacman sudo - apk add --update --no-cache curl git openssh pacman sudo
@ -358,6 +367,9 @@ steps:
- build-ui - build-ui
commands: commands:
- |
[ -f .skipci ] && exit 0
- echo "-- Installing dependencies" - echo "-- Installing dependencies"
- apt update - apt update
- apt install -y curl dpkg-dev gpg git python3 python3-pip - apt install -y curl dpkg-dev gpg git python3 python3-pip
@ -454,6 +466,9 @@ steps:
- build-ui - build-ui
commands: commands:
- |
[ -f .skipci ] && exit 0
- echo "-- Copying source directory" - echo "-- Copying source directory"
- mkdir -p "$WORKDIR" - mkdir -p "$WORKDIR"
- export SRCDIR="$WORKDIR/src" - export SRCDIR="$WORKDIR/src"
@ -553,6 +568,9 @@ steps:
- update-debian-oldstable-packages - update-debian-oldstable-packages
commands: commands:
- |
[ -f .skipci ] && exit 0
- echo "-- Installing dependencies" - echo "-- Installing dependencies"
- apt update - apt update
- apt install -y dpkg-dev gpg - apt install -y dpkg-dev gpg
@ -759,6 +777,9 @@ steps:
- build-ui - build-ui
commands: commands:
- |
[ -f .skipci ] && exit 0
- echo "-- Installing dependencies" - echo "-- Installing dependencies"
- yum install -y createrepo rpm-build rpm-sign gpg wget yum-utils git python python-pip - yum install -y createrepo rpm-build rpm-sign gpg wget yum-utils git python python-pip

1
.gitignore vendored
View file

@ -26,3 +26,4 @@ Session.vim
/package.json /package.json
/Dockerfile /Dockerfile
/docs/source/wiki /docs/source/wiki
/.skipci