Skip to content

Commit

Permalink
Merge pull request #10 from picodata/publish_deb
Browse files Browse the repository at this point in the history
Publish deb
  • Loading branch information
DmitryTravyan authored Jun 1, 2022
2 parents b98c681 + 6e3e726 commit 76045d6
Show file tree
Hide file tree
Showing 5 changed files with 509 additions and 21 deletions.
64 changes: 58 additions & 6 deletions .github/workflows/Build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
env:
VERSION: 0.3.0
YUM_REGISTRY: https://binary.picodata.io/repository/yum
DEB_REGISTRY: https://binary.picodata.io/repository/ubuntu
RAW_REGISTRY: https://binary.picodata.io/repository/raw
jobs:
build:
Expand All @@ -19,8 +20,6 @@ jobs:
app_version: ${{ steps.get_last_tag.outputs.app_version }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get version from tag
id: get_last_tag
run: |
Expand Down Expand Up @@ -54,19 +53,41 @@ jobs:
needs: build
runs-on: [self-hosted, genin]
container:
image: docker.binary.picodata.io/rust-builder-nightly:latest
image: docker.binary.picodata.io/rockylinux:8
env:
VERSION: ${{ needs.build.outputs.app_version }}
steps:
- name: Download builded binary
uses: actions/download-artifact@v3
with:
name: x86_64-unknown-linux-musl.zip
path: .
- run: ls -la
- name: Upload archive with binary
run: |
tar -czvf genin-${{ env.VERSION }}-x86_64-musl.tar.gz genin
curl -v -f -H "Authorization: Basic ${{ secrets.RAW_AUTH_RW }}" --upload-file genin-${{ env.VERSION }}-x86_64-musl.tar.gz ${{ env.RAW_REGISTRY }}/genin/genin-${{ env.VERSION }}-x86_64-musl.tar.gz
curl -v -f -H "Authorization: Basic ${{ secrets.RAW_AUTH_RW }}" --upload-file genin-${{ env.VERSION }}-x86_64-musl.tar.gz ${{ env.RAW_REGISTRY }}/genin/bin/genin-${{ env.VERSION }}-x86_64-musl.tar.gz
apple:
name: Upload MacOSX binary
needs: build
runs-on: [self-hosted, genin]
container:
image: docker.binary.picodata.io/rockylinux:8
env:
VERSION: ${{ needs.build.outputs.app_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download builded binary
uses: actions/download-artifact@v3
with:
name: x86_64-apple-darwin.zip
path: .
- name: Build rpm
run: |
tar -czvf genin-${{ env.VERSION }}-x86_64-macosx.tar.gz genin
curl -v -f -H "Authorization: Basic ${{ secrets.RAW_AUTH_RW }}" --upload-file genin-${{ env.VERSION }}-x86_64-macosx.tar.gz ${{ env.RAW_REGISTRY }}/genin/osx/genin-${{ env.VERSION }}-x86_64-macosx.tar.gz
centos7:
name: Build centos 7 rpm
Expand Down Expand Up @@ -116,9 +137,33 @@ jobs:
rpmbuild -bb build/el8/genin.x86_64.spec
curl -v -f -H "Authorization: Basic ${{ secrets.YUM_AUTH_RW }}" --upload-file /github/home/rpmbuild/RPMS/x86_64/genin-${{ env.VERSION }}-1.el8.x86_64.rpm ${{ env.YUM_REGISTRY }}/el/8/x86_64/os/genin-${{ env.VERSION }}-1.el8.x86_64.rpm
debian:
name: Build deb package
needs: build
runs-on: [self-hosted, genin]
container:
image: docker.binary.picodata.io/debian:11
env:
VERSION: ${{ needs.build.outputs.app_version }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download builded binary
uses: actions/download-artifact@v3
with:
name: x86_64-unknown-linux-musl.zip
path: ./genin-${{ env.VERSION }}.amd64/usr/bin/
- name: Build deb
run: |
apt update ; apt install -y curl
mkdir -p genin-${{ env.VERSION }}.amd64/DEBIAN
sed -ie "s/\${VERSION}/${{ env.VERSION }}/g" build/control
cp build/control genin-${{ env.VERSION }}.amd64/DEBIAN/ ; dpkg-deb --build --root-owner-group genin-${{ env.VERSION }}.amd64
curl -v -f -H "Authorization: Basic ${{ secrets.RAW_AUTH_RW }}" --upload-file genin-${{ env.VERSION }}.amd64.deb ${{ env.RAW_REGISTRY }}/genin/deb/genin-${{ env.VERSION }}.amd64.deb
release:
name: Create new release
needs: [build, centos7, centos8]
needs: [build, centos7, centos8, apple, musl-bin, debian]
runs-on: [ self-hosted, genin ]
steps:
- name: Create genin Release
Expand All @@ -133,12 +178,19 @@ jobs:
---
- [genin v${{ env.VERSION }}](#genin-v${{ env.VERSION }})
* [executable](#executable)
* [MacOSX](#macosx)
* [Centos x86_64](#centos-x86_64)
* [Debian x86_64](#debian-x86_64)
### Executable
[genin-${{ env.VERSION }}-x86_64-musl.tar.gz](${{ env.RAW_REGISTRY }}/genin/genin-${{ env.VERSION }}-x86_64-musl.tar.gz)
[genin-${{ env.VERSION }}-x86_64-musl.tar.gz](${{ env.RAW_REGISTRY }}/genin/bin/genin-${{ env.VERSION }}-x86_64-musl.tar.gz)
### MacOSX
[genin-${{ env.VERSION }}-x86_64-macos.tar.gz](${{ env.RAW_REGISTRY }}/genin/osx/genin-${{ env.VERSION }}-x86_64-macosx.tar.gz)
### Centos x86_64:
[genin-${{ env.VERSION }}-1.el7.x86_64.rpm](${{ env.YUM_REGISTRY }}/el/7/x86_64/os/genin-${{ env.VERSION }}-1.el7.x86_64.rpm)
[genin-${{ env.VERSION }}-1.el8.x86_64.rpm](${{ env.YUM_REGISTRY }}/el/8/x86_64/os/genin-${{ env.VERSION }}-1.el8.x86_64.rpm)
### Debian x86_64
[genin-${{ env.VERSION }}.amd64.deb](${{ env.APT_REGISTRY }}/genin/deb/genin-${{ env.VERSION }}.amd64.deb)
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "genin"
version = "0.3.1"
version = "0.3.2"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# GENIN
GENIN
---
![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/picodata/genin)
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/picodata/genin/IntegrationTest/master?label=test&logo=test)
[![License](https://img.shields.io/badge/License-BSD_2--Clause-orange.svg)](LICENSE)
[![en](https://img.shields.io/badge/lang-en-cyan.svg)](https://github.com/picodata/genin/blob/master/README.md)
[![ru](https://img.shields.io/badge/lang-ru-green.svg)](https://github.com/picodata/genin/blob/master/README.ru.md)

- [GENIN](#genin)
* [About](#about)
* [Installation](#installation)
- [RHEL, Fedora, Rockylinux](#rhel-fedora-rockylinux)
- [RHEL, Fedora, Rockylinux](#rhel-centos-rockylinux-fedora)
- [Debian, Ubuntu](#debian-ubuntu)
- [macOS](#macos)
- [Windows](#windows)
Expand Down Expand Up @@ -37,7 +39,7 @@ Genin is the tool that will help you very quickly roll out cluster configuration
Download and unzip the archive for the desired architecture.

#### RHEL, CentOS, Rockylinux, Fedora
There are two installation methods supported for RRHEL, CentOS, Rockylinux and Fedora.
There are two installation methods supported for RHEL, CentOS, Rockylinux and Fedora.

1. Installation using the package manager.

Expand All @@ -56,35 +58,38 @@ After that install **Genin**:
sudo yum install -y genin
```

2. If you want to install `rpm` packages directly without adding our repository, please don't forget to pick the right package for your OS version:
2. If you want to install `rpm` packages directly without adding our repository.
```shell
# RHEL 8.x, CentOS 8.x, Rockylinux 8.x, recent Fedora version
sudo rpm -i https://binary.picodata.io/repository/yum/el/8/x86_64/os/genin-0.3.1-1.el8.x86_64.rpm
sudo rpm -i https://binary.picodata.io/repository/yum/el/8/x86_64/os/genin-0.3.2-1.el8.x86_64.rpm
# RHEL 7.x, CentOS 7.x
sudo rpm -i https://binary.picodata.io/repository/yum/el/7/x86_64/os/genin-0.3.1-1.el7.x86_64.rpm
sudo rpm -i https://binary.picodata.io/repository/yum/el/7/x86_64/os/genin-0.3.2-1.el7.x86_64.rpm
```
> **Note:** please don't forget to pick the right package for your OS version.
#### Debian, Ubuntu
We provide the `deb` Genin package for `debian`-based Linux distributions including the Ubuntu family. Use the following command to download and install the package:
```shell
curl -sLO https://binary.picodata.io/repository/raw/genin/deb/genin-0.3.1.amd64.deb && sudo dpkg -i genin-0.3.1.amd64.deb
curl -sLO https://binary.picodata.io/repository/raw/genin/deb/genin-0.3.2.amd64.deb && sudo dpkg -i genin-0.3.2.amd64.deb
```

#### macOS
Use the following command to grab and install Genin in macOS (10.10+):
```shell
curl -L https://binary.picodata.io/repository/raw/genin/apple/genin-0.3.1-darwin-amd64.zip -o genin-0.3.1-darwin-amd64.zip
unzip genin-0.3.1-darwin-amd64.zip -d ~/bin/
curl -L https://binary.picodata.io/repository/raw/genin/apple/genin-0.3.2-darwin-amd64.zip -o genin-0.3.2-darwin-amd64.zip
unzip genin-0.3.2-darwin-amd64.zip -d ~/bin/
```
The application can then be found under the `~/bin` directory. Make sure the directory is in your $PATH.
> **Note:** The application can then be found under the `~/bin` directory.
> Make sure the directory is in your `$PATH`.
#### Windows
Use the following command to grab and install Genin in Windows 7 64 bit or newer:
```shell
curl.exe -L https://binary.picodata.io/repository/raw/genin/windows/genin-0.3.1-darwin-amd64.zip -o genin-0.3.1-windows-amd64.zip
unzip.exe genin-0.3.1-windows-amd64.zip -d %HOME%/.cargo/bin/
curl.exe -L https://binary.picodata.io/repository/raw/genin/windows/genin-0.3.2-darwin-amd64.zip -o genin-0.3.2-windows-amd64.zip
unzip.exe genin-0.3.2-windows-amd64.zip -d %HOME%/.cargo/bin/
```
The application can then be found under the `.cargo/bin` folder inside your user profile folder. Make sure it is in your %PATH%.
> **Note:** The application can then be found under the `.cargo/bin` folder inside
> your user profile folder. Make sure it is in your `%PATH%`.
Сheck that the installation was successful:
```
Expand Down
Loading

0 comments on commit 76045d6

Please sign in to comment.