Skip to content

Commit

Permalink
Use GitHub Action for building RPM in Fedora Copr (#2428)
Browse files Browse the repository at this point in the history
* Use GitHub Actions for Fedora Copr RPM CI

Fixes: #2361

* packaging: sync rpm spec file with Fedora

Don't build-depend on system-stubs-jupiter for now, as it is not
packaged into Fedora.
  • Loading branch information
praiskup committed Jan 31, 2022
1 parent 5f98911 commit 858cb17
Show file tree
Hide file tree
Showing 13 changed files with 131 additions and 325 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/fedora-copr-build.yml
@@ -0,0 +1,24 @@
---
name: RPM build in Fedora Copr
on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
name: Submit a Copr build
runs-on: ubuntu-latest

steps:
- name: Check out proper version of sources
uses: actions/checkout@v1

- name: Submit the build
env:
COPR_PR_WEBHOOK: https://copr.fedorainfracloud.org/webhooks/custom/55296/cf449c12-03b4-4f5b-ae84-3f5aa1d2b462/postgresql-jdbc/
COPR_PUSH_WEBHOOK: ${{ secrets.COPR_PUSH_WEBHOOK }}
run: |
curl https://raw.githubusercontent.com/praiskup/copr-ci-tooling/main/copr-gh-actions-submit > submit
bash submit ${{ github.event.pull_request.number }}
5 changes: 0 additions & 5 deletions .travis.yml
Expand Up @@ -50,11 +50,6 @@ cache:
matrix:
fast_finish: true
include:
- env:
- FEDORA_CI=Y
services:
- docker
if: type != pull_request
- addons:
postgresql: "9.6"
env:
Expand Down
18 changes: 0 additions & 18 deletions .travis/travis_build.sh
@@ -1,24 +1,6 @@
#!/usr/bin/env bash
set -x -e

if [[ $FEDORA_CI == "Y" ]];
then
# Prepare "source release" archive
./gradlew :postgresql:sourceDistribution -Prelease

# Copy file to packaging directory, so rpm_ci would use it rather that downloading it from release URL
cp pgjdbc/build/distributions/postgresql-*-src.tar.gz packaging/rpm

# Try to prevent "stdout: write error"
# WA is taken from https://github.com/travis-ci/travis-ci/issues/4704#issuecomment-348435959
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'
export PROJECT_VERSION=$(grep pgjdbc.version gradle.properties | cut -d "=" -f2-)
# Removal of PARENT_VERSION requires rebuild of praiskup/copr-and-jdbc-ci Docker image
export PARENT_VERSION=unused_but_passed_to_make_script_inside_docker_happy

exec ./packaging/rpm_ci
fi

# Build project
# TODO: run SlowTests as well
GRADLE_ARGS="--no-daemon -PskipAutostyle -PskipCheckstyle build $MVN_CUSTOM_ARGS"
Expand Down
6 changes: 0 additions & 6 deletions packaging/rpm/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions packaging/rpm/.srpmconfig

This file was deleted.

Binary file removed packaging/rpm/copr-token.gpg
Binary file not shown.
19 changes: 0 additions & 19 deletions packaging/rpm/fedora-image/Dockerfile

This file was deleted.

81 changes: 0 additions & 81 deletions packaging/rpm/fedora-image/copr-ci-git

This file was deleted.

173 changes: 0 additions & 173 deletions packaging/rpm/postgres-testing.sh

This file was deleted.

0 comments on commit 858cb17

Please sign in to comment.