From 7592ce8ab045f304d70d08dd74f4465f80bd3202 Mon Sep 17 00:00:00 2001 From: Benjamin Graham Date: Tue, 2 Jun 2020 15:51:05 -0400 Subject: [PATCH] Adding a semaphore workflow to run CI --- .semaphore/semaphore.yml | 36 ++++++++++++++++++++++++++++++++++++ Dockerfile | 17 +++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .semaphore/semaphore.yml create mode 100644 Dockerfile diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml new file mode 100644 index 0000000..a269fc6 --- /dev/null +++ b/.semaphore/semaphore.yml @@ -0,0 +1,36 @@ +version: v1.0 +name: Cockpit Session Recording +agent: + machine: + type: e1-standard-2 + os_image: ubuntu1804 + +blocks: + - name: "Run checks" + task: + prologue: + commands: + - checkout + - sudo apt install -y python3-libvirt + - docker build -t rpmbuilder . + - id=$(docker create rpmbuilder) + - docker cp $id:/cockpit-session-recording/ . + - cd cockpit-session-recording + - make test/common + - make bots + jobs: + - name: Check fedora-32 + commands: + - export TEST_OS=fedora-32 + - bots/image-customize -v -i cockpit-ws -i `pwd`/cockpit-session-recording*.noarch.rpm -s `pwd`/test/vm.install $TEST_OS + - bots/image-customize -v -r "usermod -u 981 tlog || true" $TEST_OS + - bots/image-customize -v -u ./test/files/1.journal:/var/log/journal/1.journal $TEST_OS + - test/check-application -v + + - name: Check centos-8 + commands: + - export TEST_OS=centos-8-stream + - bots/image-customize -v -i cockpit-ws -i `pwd`/cockpit-session-recording*.noarch.rpm -s `pwd`/test/vm.install $TEST_OS + - bots/image-customize -v -r "usermod -u 981 tlog || true" $TEST_OS + - bots/image-customize -v -u ./test/files/1.journal:/var/log/journal/1.journal $TEST_OS + - test/check-application -v diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..40a949c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM fedora:32 + +COPY . cockpit-session-recording + +RUN sudo dnf -y install \ + git \ + gnupg \ + intltool \ + libappstream-glib \ + make \ + npm \ + rpm-build \ + rpmdevtools \ + rsync \ + tar + +RUN cd cockpit-session-recording && make rpm