From 990202d856f217dbad01dbc5b2dc3f4093b05f75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Tue, 27 Dec 2022 23:26:32 +0100 Subject: [PATCH 1/7] Added Xenial support in packages --- pkg/deb/debian/changelog | 2 +- pkg/deb/debian/control | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/deb/debian/changelog b/pkg/deb/debian/changelog index 8daea5c..1a6c50f 100644 --- a/pkg/deb/debian/changelog +++ b/pkg/deb/debian/changelog @@ -1,4 +1,4 @@ -fim (0.4.3-1) bionic; urgency=medium +fim (0.4.3-1) xenial; urgency=medium * More info: https://github.com/Achiefs/fim/releases/tag/v0.4.3 diff --git a/pkg/deb/debian/control b/pkg/deb/debian/control index 6b9df90..44fb6a8 100644 --- a/pkg/deb/debian/control +++ b/pkg/deb/debian/control @@ -2,7 +2,7 @@ Source: fim Section: admin Priority: optional Maintainer: Jose Fernandez -Build-Depends: debhelper (>=10), dh-systemd +Build-Depends: debhelper (>=9), dh-systemd Standards-Version: 4.0.0 Homepage: https://github.com/Achiefs/fim From 944ff3fd5820b9ae10386ad1578d688d2ba53406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 01:16:01 +0100 Subject: [PATCH 2/7] Added Ubuntu 16 package building workflow test --- .github/workflows/pkg-build-workflow.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pkg-build-workflow.yml b/.github/workflows/pkg-build-workflow.yml index e562584..e9ce478 100644 --- a/.github/workflows/pkg-build-workflow.yml +++ b/.github/workflows/pkg-build-workflow.yml @@ -29,4 +29,14 @@ jobs: run: Invoke-Expression "& `"C:\Program Files (x86)\WiX Toolset v3.11\bin\candle.exe`" pkg\msi\fim.wxs -o pkg\msi\fim.wixobj" - name: Building package run: Invoke-Expression "& `"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe`" -ext WixUIExtension pkg\msi\fim.wixobj -b pkg\msi" - - run: echo "Job's status is ${{ job.status }}." \ No newline at end of file + - run: echo "Job's status is ${{ job.status }}." + + + + Pkg-build-ubuntu16: + runs-on: [self-hosted, ubuntu18] + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Ubuntu 16.04 - package build + run: docker run -it okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file From e549bbc7c789e00af656bf34672b5fe597b5ceec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 01:29:28 +0100 Subject: [PATCH 3/7] Changed docker command --- .github/workflows/pkg-build-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/pkg-build-workflow.yml b/.github/workflows/pkg-build-workflow.yml index e9ce478..0c2e500 100644 --- a/.github/workflows/pkg-build-workflow.yml +++ b/.github/workflows/pkg-build-workflow.yml @@ -31,12 +31,10 @@ jobs: run: Invoke-Expression "& `"C:\Program Files (x86)\WiX Toolset v3.11\bin\light.exe`" -ext WixUIExtension pkg\msi\fim.wixobj -b pkg\msi" - run: echo "Job's status is ${{ job.status }}." - - Pkg-build-ubuntu16: runs-on: [self-hosted, ubuntu18] steps: - name: Check out code uses: actions/checkout@v2 - name: Ubuntu 16.04 - package build - run: docker run -it okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file + run: docker run okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file From 6a481fb0a8c2ddec31a34bc8984287f3fc44a58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 01:38:02 +0100 Subject: [PATCH 4/7] Added sudo to docker command --- .github/workflows/pkg-build-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkg-build-workflow.yml b/.github/workflows/pkg-build-workflow.yml index 0c2e500..d07586e 100644 --- a/.github/workflows/pkg-build-workflow.yml +++ b/.github/workflows/pkg-build-workflow.yml @@ -37,4 +37,4 @@ jobs: - name: Check out code uses: actions/checkout@v2 - name: Ubuntu 16.04 - package build - run: docker run okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file + run: sudo docker run okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file From ab47da76806b2b0aea01cba24b44153153549e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 01:40:54 +0100 Subject: [PATCH 5/7] Changed ref to ref_name variable --- .github/workflows/pkg-build-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pkg-build-workflow.yml b/.github/workflows/pkg-build-workflow.yml index d07586e..1fc0908 100644 --- a/.github/workflows/pkg-build-workflow.yml +++ b/.github/workflows/pkg-build-workflow.yml @@ -37,4 +37,4 @@ jobs: - name: Check out code uses: actions/checkout@v2 - name: Ubuntu 16.04 - package build - run: sudo docker run okynos/fim-builder:xenial ${{ github.ref }} \ No newline at end of file + run: sudo docker run okynos/fim-builder:xenial ${{ github.ref_name }} \ No newline at end of file From 68b497c9455459586d4a31eafa842600814ee95f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 02:03:21 +0100 Subject: [PATCH 6/7] Added building dockers to push at docker hub --- pkg/deb/docker/Dockerfile | 10 ++++++++++ pkg/deb/docker/entrypoint.sh | 12 ++++++++++++ pkg/rpm/docker/Dockerfile | 8 ++++++++ pkg/rpm/docker/entrypoint.sh | 12 ++++++++++++ 4 files changed, 42 insertions(+) create mode 100644 pkg/deb/docker/Dockerfile create mode 100644 pkg/deb/docker/entrypoint.sh create mode 100644 pkg/rpm/docker/Dockerfile create mode 100644 pkg/rpm/docker/entrypoint.sh diff --git a/pkg/deb/docker/Dockerfile b/pkg/deb/docker/Dockerfile new file mode 100644 index 0000000..55ca7da --- /dev/null +++ b/pkg/deb/docker/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:xenial + +RUN echo 'Acquire::Retries "3";' > /etc/apt/apt.conf.d/80-retries && \ + sed -i 's|deb http://security|#deb http://security|g' /etc/apt/sources.list && \ + apt update && \ + apt install -y curl devscripts equivs tar gcc gzip pkg-config git + +ADD entrypoint.sh /usr/local/bin/entrypoint.sh + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] \ No newline at end of file diff --git a/pkg/deb/docker/entrypoint.sh b/pkg/deb/docker/entrypoint.sh new file mode 100644 index 0000000..b992b90 --- /dev/null +++ b/pkg/deb/docker/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +ref=$1 + +mkdir -p /tmp/output +mkdir -p /tmp/repo +cd /tmp/repo +git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1 +cd fim/pkg/deb +./builder.sh +cp fim_*.deb /tmp/output/ +chown 1000:1000 /tmp/output/* diff --git a/pkg/rpm/docker/Dockerfile b/pkg/rpm/docker/Dockerfile new file mode 100644 index 0000000..ab0a28e --- /dev/null +++ b/pkg/rpm/docker/Dockerfile @@ -0,0 +1,8 @@ +FROM centos:7 + +RUN yum update -y && \ + yum install -y rpm-build tar gcc git + +ADD entrypoint.sh /usr/local/bin/entrypoint.sh + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] \ No newline at end of file diff --git a/pkg/rpm/docker/entrypoint.sh b/pkg/rpm/docker/entrypoint.sh new file mode 100644 index 0000000..2c56834 --- /dev/null +++ b/pkg/rpm/docker/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +ref=$1 + +mkdir -p /tmp/output +mkdir -p /tmp/repo +cd /tmp/repo +git clone https://github.com/Achiefs/fim.git -b ${ref} --depth=1 +cd fim/pkg/rpm +./builder.sh +cp fim-*.rpm /tmp/output/ +chown 1000:1000 /tmp/output/* From ee30b76fc6a034e338ed0b5e4bebfe44e07e65c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Fern=C3=A1ndez?= Date: Wed, 28 Dec 2022 15:25:15 +0100 Subject: [PATCH 7/7] Added CentOS 7 package building workflow --- .github/workflows/pkg-build-workflow.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pkg-build-workflow.yml b/.github/workflows/pkg-build-workflow.yml index 1fc0908..a3ced03 100644 --- a/.github/workflows/pkg-build-workflow.yml +++ b/.github/workflows/pkg-build-workflow.yml @@ -1,7 +1,7 @@ name: Pkg build on: [push] jobs: - Pkg-build-ubuntu: + Pkg-build-ubuntu20: runs-on: ubuntu-20.04 steps: - name: Check out repository code, branch='${{ github.ref }}' @@ -37,4 +37,12 @@ jobs: - name: Check out code uses: actions/checkout@v2 - name: Ubuntu 16.04 - package build - run: sudo docker run okynos/fim-builder:xenial ${{ github.ref_name }} \ No newline at end of file + run: sudo docker run okynos/fim-builder:xenial ${{ github.ref_name }} + + Pkg-build-centos7: + runs-on: [self-hosted, ubuntu18] + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: CentOS 7 - package build + run: sudo docker run okynos/fim-builder:centos7 ${{ github.ref_name }} \ No newline at end of file