From e3ea31527607475651bd95dd5364aa2cdd80494c Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 29 Dec 2023 23:49:42 +0100 Subject: [PATCH] [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. --- .drone.yml | 21 +++++++++++++++++++++ .gitignore | 1 + 2 files changed, 22 insertions(+) diff --git a/.drone.yml b/.drone.yml index 48d3a93eab..c03c0e52cb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -181,6 +181,8 @@ steps: - tests commands: + - export SKIPCI="$PWD/.skipci" + - rm -rf "$SKIPCI" - apk add --update --no-cache git # Backup the original git configuration before changing attributes @@ -210,6 +212,10 @@ steps: exit 0 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 - mkdir -p ~/.ssh - | @@ -261,6 +267,9 @@ steps: - build-ui commands: + - | + [ -f .skipci ] && exit 0 + - echo "-- Installing dependencies" - apk add --update --no-cache curl git openssh pacman sudo @@ -358,6 +367,9 @@ steps: - build-ui commands: + - | + [ -f .skipci ] && exit 0 + - echo "-- Installing dependencies" - apt update - apt install -y curl dpkg-dev gpg git python3 python3-pip @@ -454,6 +466,9 @@ steps: - build-ui commands: + - | + [ -f .skipci ] && exit 0 + - echo "-- Copying source directory" - mkdir -p "$WORKDIR" - export SRCDIR="$WORKDIR/src" @@ -553,6 +568,9 @@ steps: - update-debian-oldstable-packages commands: + - | + [ -f .skipci ] && exit 0 + - echo "-- Installing dependencies" - apt update - apt install -y dpkg-dev gpg @@ -759,6 +777,9 @@ steps: - build-ui commands: + - | + [ -f .skipci ] && exit 0 + - echo "-- Installing dependencies" - yum install -y createrepo rpm-build rpm-sign gpg wget yum-utils git python python-pip diff --git a/.gitignore b/.gitignore index 6cce0b4e25..84f22f2175 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ Session.vim /package.json /Dockerfile /docs/source/wiki +/.skipci