bootc/.gitlab-ci.yml
gursewak1997 f8bd4576cf Add automated release pipeline for CentOS Stream
Implements weekly upstream rebase cadence automation:
- GitLab CI scheduled pipeline (every 6 hours)
- Automatic GitHub release detection
- JIRA ticket creation via API
- Spec file updates with changelog
- Automated MR creation with OSCI Bot integration
- TEST_MODE support for safe testing

Scripts:
- check-upstream-release.sh: Poll GitHub API for new releases
- create-release-mr.sh: Main automation orchestrator
- update-spec.py: Safe spec file updater
- create-jira.sh: JIRA API client
- test-workflow.sh: Local testing utility

Documentation:
- scripts/README.md: Technical documentation
- AUTOMATION-SETUP.md: Step-by-step setup guide
2026-07-06 16:42:32 -07:00

54 lines
1.3 KiB
YAML

---
# GitLab CI pipeline for automated bootc releases to CentOS Stream
# Runs every 6 hours to check for new upstream releases
workflow:
rules:
- when: always
stages:
- check
- release
# Check if there's a new upstream release
check_new_release:
stage: check
image: quay.io/centos/centos:stream10
before_script:
- dnf install -y git curl jq rpmdevtools
script:
- ./scripts/check-upstream-release.sh
artifacts:
reports:
dotenv: release.env
paths:
- release.env
expire_in: 1 hour
# Create MR if new release detected
create_release_mr:
stage: release
image: quay.io/centos/centos:stream10
before_script:
- dnf install -y git curl jq python3 rpmdevtools centpkg
# Configure git for bot
- git config --global user.name "bootc-release-bot"
- git config --global user.email "${BOT_EMAIL:-bootc-release-bot@redhat.com}"
# Set up SSH for centpkg (skip if TEST_MODE)
- |
if [[ "${TEST_MODE:-false}" != "true" ]]; then
mkdir -p ~/.ssh
echo "$CENTOS_SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
fi
script:
- ./scripts/create-release-mr.sh
rules:
- if: $TEST_MODE == "true"
- if: $NEW_RELEASE == "true"
needs:
- check_new_release
dependencies:
- check_new_release