Files
pipglr/.gitlab-ci.yml
Lester Amoin Espiritu 87a3bb5cb7 Update file .gitlab-ci.yml
2024-12-31 20:54:44 +00:00

55 lines
1.3 KiB
YAML

---
default:
image: quay.io/buildah/stable:v1.32
tags:
- saas-linux-small-amd64
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_BRANCH
- if: $CI_COMMIT_TAG
include:
- component: gitlab.com/blue42u/ci.pre-commit/lite@0.2.0
inputs:
job_stage: test
envars:
stage: test
script: |
echo "Select CI env. vars.:";
printenv | egrep '^CI_' | sort
commit_check:
stage: test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- when: never
variables:
BADRX: "^(squash!)|(fixup!)"
script: |
dnf install -y git
shortlogtmp=$(mktemp -p '' commit_check_tmp_XXXX)
git log --oneline --no-show-signature "${CI_MERGE_REQUEST_DIFF_BASE_SHA}..HEAD" > "$shortlogtmp"
if egrep -q "$BADRX" "$shortlogtmp"; then
egrep "$BADRX" "$shortlogtmp"
die "Found the above commits matching '$BADRX'"
fi
build:
tags:
- saas-linux-medium-amd64
stage: deploy
variables:
FF_GITLAB_REGISTRY_HELPER_IMAGE: 0
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
STORAGE_DRIVER: vfs
before_script:
- echo "$CI_REGISTRY_PASSWORD" | buildah login -u "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY
script:
- scripts/build.sh