forked from alisw/ali-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge e71da4f into sapling-pr-archive-ktf
- Loading branch information
Showing
34 changed files
with
117 additions
and
825 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
# Laungh the CacheO2Package job in Jenkins. Useful for caching the build | ||
# results for CI, so there are minimal delays when merging critical packages | ||
name: Cache O2 Package | ||
|
||
'on': | ||
workflow_dispatch: | ||
inputs: | ||
package_name: | ||
type: string | ||
description: Name of the package to cache | ||
default: 'O2' | ||
alidist_slug: | ||
type: string | ||
description: Alidist version to use for the package (group/repo[@branch]) | ||
default: 'alisw/alidist@master' | ||
alibuild_slug: | ||
type: string | ||
description: Alibuild version to use for the package. If empty, the latest version from pypi is used. | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
cache-o2-package: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
ALIDIST_SLUG: ${{ inputs.alidist_slug }} | ||
ALIBUILD_SLUG: ${{ inputs.alibuild_slug }} | ||
PACKAGE_NAME: ${{ inputs.package_name }} | ||
JENKINS_URL: ${{ secrets.JENKINS_URL }} | ||
SSO_AUTH_URL: ${{ secrets.SSO_AUTH_URL }} | ||
CLIENT_ID: ${{ secrets.SSO_JENKINS_API_CLIENT_ID }} | ||
CLIENT_SECRET: ${{ secrets.SSO_JENKINS_API_CLIENT_SECRET }} | ||
TARGET_APP: ${{ secrets.SSO_JENKINS_API_TARGET_APP }} | ||
JOB_NAME: 'CacheO2Package' | ||
|
||
steps: | ||
- name: Launch the CacheO2Package job in Jenkins | ||
run: | | ||
# Login against SSO | ||
TOKEN="$(curl --location -X POST "$SSO_AUTH_URL" \ | ||
--header 'Content-Type: application/x-www-form-urlencoded' \ | ||
--data-urlencode 'grant_type=client_credentials' \ | ||
--data-urlencode "client_id=$CLIENT_ID" \ | ||
--data-urlencode "client_secret=$CLIENT_SECRET" \ | ||
--data-urlencode "audience=$TARGET_APP" | jq -r '.access_token')" | ||
# Trigger the Jenkins job | ||
curl "$JENKINS_URL/job/$JOB_NAME/buildWithParameters" \ | ||
-H "Authorization: Bearer $TOKEN" \ | ||
--data "PACKAGE_NAME=$PACKAGE_NAME" \ | ||
--data "ALIDIST_SLUG=$ALIDIST_SLUG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
# Create repositories with all O2 prerequisites plus aliBuild and push them | ||
# upstream (e.g. to S3). | ||
name: Build o2-full-deps repositories | ||
name: "Build o2-full-deps repositories" | ||
|
||
# Controls when the action will run. This workflow is triggered manually. | ||
"on": | ||
|
@@ -27,18 +27,18 @@ jobs: | |
include: | ||
- el_version: el7 | ||
container: centos:7 | ||
alibuild_tag: v1.17.10 | ||
alibuild_tag: v1.17.12 | ||
- el_version: el8 | ||
container: almalinux:8 | ||
alibuild_tag: v1.17.10 | ||
alibuild_tag: v1.17.12 | ||
- el_version: el9 | ||
container: almalinux:9 | ||
alibuild_tag: v1.17.7 | ||
alibuild_tag: v1.17.12 | ||
- el_version: fedora | ||
container: fedora:40 | ||
alibuild_tag: v1.17.7 | ||
alibuild_tag: v1.17.12 | ||
|
||
name: RPM (${{ matrix.el_version }}) | ||
name: "RPM (${{ matrix.el_version }})" | ||
container: ${{ matrix.container }} | ||
env: | ||
ALIBUILD_TAG: ${{ matrix.alibuild_tag }} | ||
|
@@ -47,8 +47,9 @@ jobs: | |
|
||
steps: | ||
# For rpms/*.spec | ||
- uses: actions/checkout@v3 | ||
- name: Install prerequisites | ||
- uses: actions/checkout@v4 | ||
|
||
- name: "Install prerequisites" | ||
run: | | ||
set -ex | ||
if [[ "$DISTRO" == "el7" ]]; then | ||
|
@@ -66,7 +67,7 @@ jobs: | |
${{ secrets.S3_RCLONE_CONFIG }} | ||
EOF | ||
- name: Build the ${{ matrix.el_version }} RPM and create a yum repo | ||
- name: "Build the ${{ matrix.el_version }} RPM and create a yum repo" | ||
run: | | ||
set -ex | ||
rpmbuild -ba "rpms/o2-prereq-$DISTRO.spec" | ||
|
@@ -95,7 +96,6 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
ubuntu_codename: | ||
- bionic # 18.04 | ||
- focal # 20.04 | ||
- jammy # 22.04 | ||
- mantic # 23.10 | ||
|
@@ -104,30 +104,31 @@ jobs: | |
name: DEB (${{ matrix.ubuntu_codename }}) | ||
container: ubuntu:${{ matrix.ubuntu_codename }} | ||
env: | ||
ALIBUILD_TAG: v1.17.7 | ||
ALIBUILD_TAG: v1.17.12 | ||
ALIBUILD_DISTRO: ${{ matrix.ubuntu_codename }} | ||
DEBIAN_FRONTEND: noninteractive | ||
|
||
steps: | ||
- name: Install prerequisites | ||
- name: "Install prerequisites" | ||
run: | | ||
apt update | ||
apt install -y vim git devscripts build-essential lintian debhelper dh-python python3-all python3-setuptools python3-setuptools-scm | ||
gpg --import - <<\EOF | ||
${{ secrets.LAUNCHPAD_PPA_GPG_KEY }} | ||
EOF | ||
mkdir -p ~/.gnupg | ||
chmod 700 ~/.gnupg | ||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | ||
echo -n "${{ secrets.LAUNCHPAD_PPA_GPG_KEY }}" | gpg --no-tty --batch --import | ||
- name: Build a DEB for Ubuntu and push it to the PPA | ||
- name: "Build a DEB for Ubuntu and push it to the PPA" | ||
run: | | ||
set -x | ||
git clone -b "$ALIBUILD_TAG" https://github.com/alisw/alibuild | ||
git clone https://github.com/alisw/alibuild | ||
cd alibuild | ||
rm -rf .git | ||
cat <<EOF > debian/changelog | ||
python3-alibuild (${ALIBUILD_TAG#v}+$ALIBUILD_DISTRO) $ALIBUILD_DISTRO; urgency=medium | ||
* Bump to $ALIBUILD_TAG | ||
-- Giulio Eulisse <[email protected]> $(date -R -u) | ||
EOF | ||
debuild --no-lintian -k48F330BAFFA564EF2383E2B472E9262B5C0D9DE5 -S | ||
debuild --no-lintian -kA3A177D7C6BAD5C044ACAC10F56D273E83B84A47 -S -p'gpg --no-tty --passphrase ${{ secrets.LAUNCHPAD_PPA_GPG_PASS }}' | ||
dput ppa:alisw/ppa "../python3-alibuild_${ALIBUILD_TAG#v}+${ALIBUILD_DISTRO}_source.changes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,6 @@ BUILD_SUFFIX=master | |
MAX_DIFF_SIZE=20000000 | ||
TIMEOUT=120 | ||
LONG_TIMEOUT=36000 | ||
DOCKER_EXTRA_ARGS='--tmpfs=/dev/shm:rw,size=8g,mode=1777' | ||
INSTALL_ALIBUILD='alisw/[email protected].10#egg=alibuild' | ||
DOCKER_EXTRA_ARGS='--tmpfs=/dev/shm:rw,size=10g,mode=1777' | ||
INSTALL_ALIBUILD='alisw/[email protected].12#egg=alibuild' | ||
INSTALL_ALIBOT='alisw/ali-bot@master#egg=ali-bot' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.