|
@@ -3,33 +3,45 @@ kind: pipeline
|
|
|
type: docker
|
|
type: docker
|
|
|
name: Build Hestia for AMD64
|
|
name: Build Hestia for AMD64
|
|
|
|
|
|
|
|
|
|
+platform:
|
|
|
|
|
+ os: linux
|
|
|
|
|
+ arch: amd64
|
|
|
|
|
+
|
|
|
|
|
+---
|
|
|
|
|
+kind: pipeline
|
|
|
|
|
+type: ssh
|
|
|
|
|
+name: Build Hestia for RHEL AMD64
|
|
|
|
|
+
|
|
|
platform:
|
|
platform:
|
|
|
os: linux
|
|
os: linux
|
|
|
arch: amd64
|
|
arch: amd64
|
|
|
|
|
|
|
|
steps:
|
|
steps:
|
|
|
|
|
+ - name: Cleanup SOURCES & SPECS folder
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - rm -rf ~/rpmbuild/SPECS/* ~/rpmbuild/SOURCES/* ~/rpmbuild/SRPMS/* ~/hestiacp
|
|
|
- name: Clone HestiaCP
|
|
- name: Clone HestiaCP
|
|
|
- image: alpine/git
|
|
|
|
|
commands:
|
|
commands:
|
|
|
- - git clone https://github.com/hestiacp/hestiacp.git
|
|
|
|
|
- - cd hestiacp
|
|
|
|
|
- - echo "Checkout ${branch}"
|
|
|
|
|
- - git checkout ${branch}
|
|
|
|
|
- - name: Build JS/CSS
|
|
|
|
|
- image: node:current-slim
|
|
|
|
|
|
|
+ - cd ~ && git clone https://github.com/hestiacp/hestiacp
|
|
|
|
|
+ - name: Get SPECS & SOURCES
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/nginx.conf "$HOME/rpmbuild/SOURCES/nginx.conf"
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/hestia-nginx.spec "$HOME/rpmbuild/SPECS/hestia-nginx.spec"
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/hestia-nginx.service "$HOME/rpmbuild/SOURCES/hestia-nginx.service"
|
|
|
|
|
+ - wget https://nginx.org/download/nginx-1.24.0.tar.gz "$HOME/rpmbuild/SOURCES/"
|
|
|
|
|
+ - name: Build source RPMS
|
|
|
commands:
|
|
commands:
|
|
|
- - cd ./hestiacp/
|
|
|
|
|
- - yarn set version stable
|
|
|
|
|
- - yarn install
|
|
|
|
|
- - yarn build
|
|
|
|
|
|
|
+ - rpmbuild -bs ~/rpmbuild/SPECS/hestia-nginx.spec
|
|
|
|
|
+ - name: RHEL 8
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - mkdir -p ./packages/rhel8/
|
|
|
|
|
+ - mock -r rocky+epel-8-$(arch) ~/rpmbuild/SRPMS/hestia-nginx-1.24.0-1.el8.src.rpm
|
|
|
|
|
+ - cp /var/lib/mock/rocky+epel-8-$(arch)/result/*.rpm ./packages/rhel8/
|
|
|
- name: RHEL 9
|
|
- name: RHEL 9
|
|
|
- image: rockylinux:9
|
|
|
|
|
commands:
|
|
commands:
|
|
|
- - ln -snf /usr/share/zoneinfo/CET /etc/localtime && echo CET > /etc/timezone
|
|
|
|
|
- - ./hestiacp/src/hst_autocompile.sh --all --noinstall --keepbuild --debug '~localsrc'
|
|
|
|
|
- mkdir -p ./packages/rhel9/
|
|
- mkdir -p ./packages/rhel9/
|
|
|
- - mv /tmp/hestiacp-src/rpm/*.rpm ./packages/rhel9/
|
|
|
|
|
- - rm -rf /tmp/hestia-src/
|
|
|
|
|
|
|
+ - mock -r rocky+epel-9-$(arch) ~/rpmbuild/SRPMS/hestia-nginx-1.24.0-1.el9.src.rpm
|
|
|
|
|
+ - cp /var/lib/mock/rocky+epel-9-$(arch)/result/*.rpm ./packages/rhel9/
|
|
|
- name: scp files
|
|
- name: scp files
|
|
|
image: appleboy/drone-scp:1.6.4
|
|
image: appleboy/drone-scp:1.6.4
|
|
|
settings:
|
|
settings:
|
|
@@ -56,42 +68,54 @@ trigger:
|
|
|
os: linux
|
|
os: linux
|
|
|
arch: arm64
|
|
arch: arm64
|
|
|
|
|
|
|
|
- steps:
|
|
|
|
|
- - name: Clone HestiaCP
|
|
|
|
|
- image: alpine/git
|
|
|
|
|
- commands:
|
|
|
|
|
- - git clone https://github.com/hestiacp/hestiacp.git
|
|
|
|
|
- - cd hestiacp
|
|
|
|
|
- - echo "Checkout ${branch}"
|
|
|
|
|
- - git checkout ${branch}
|
|
|
|
|
- - name: Build JS/CSS
|
|
|
|
|
- image: node:current-slim
|
|
|
|
|
- commands:
|
|
|
|
|
- - cd ./hestiacp/
|
|
|
|
|
- - yarn set version stable
|
|
|
|
|
- - yarn install
|
|
|
|
|
- - yarn build
|
|
|
|
|
- - name: RHEL 9
|
|
|
|
|
- image: rockylinux:9
|
|
|
|
|
- commands:
|
|
|
|
|
- - ln -snf /usr/share/zoneinfo/CET /etc/localtime && echo CET > /etc/timezone
|
|
|
|
|
- - ./hestiacp/src/hst_autocompile.sh --all --noinstall --keepbuild --debug '~localsrc'
|
|
|
|
|
- - mkdir -p ./packages/rhel9/
|
|
|
|
|
- - mv /tmp/hestiacp-src/rpm/*.rpm ./packages/rhel9/
|
|
|
|
|
- - rm -rf /tmp/hestia-src/
|
|
|
|
|
- - name: scp files
|
|
|
|
|
- image: appleboy/drone-scp:1.6.4
|
|
|
|
|
- settings:
|
|
|
|
|
- host:
|
|
|
|
|
- from_secret: target_server
|
|
|
|
|
- user: root
|
|
|
|
|
- key:
|
|
|
|
|
- from_secret: ssh_key
|
|
|
|
|
- port: 22
|
|
|
|
|
- command_timeout: 2m
|
|
|
|
|
- target: /root/
|
|
|
|
|
- source:
|
|
|
|
|
- - ./packages/*
|
|
|
|
|
|
|
+---
|
|
|
|
|
+kind: pipeline
|
|
|
|
|
+type: ssh
|
|
|
|
|
+name: Build Hestia for RHEL AMD64
|
|
|
|
|
+
|
|
|
|
|
+platform:
|
|
|
|
|
+ os: linux
|
|
|
|
|
+ arch: amd64
|
|
|
|
|
+
|
|
|
|
|
+steps:
|
|
|
|
|
+ - name: Cleanup SOURCES & SPECS folder
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - rm -rf ~/rpmbuild/SPECS/* ~/rpmbuild/SOURCES/* ~/rpmbuild/SRPMS/* ~/hestiacp
|
|
|
|
|
+ - name: Clone HestiaCP
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - cd ~ && git clone https://github.com/hestiacp/hestiacp
|
|
|
|
|
+ - name: Get SPECS & SOURCES
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/nginx.conf "$HOME/rpmbuild/SOURCES/nginx.conf"
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/hestia-nginx.spec "$HOME/rpmbuild/SPECS/hestia-nginx.spec"
|
|
|
|
|
+ - cp ~/hestiacp/src/rpm/nginx/hestia-nginx.service "$HOME/rpmbuild/SOURCES/hestia-nginx.service"
|
|
|
|
|
+ - wget https://nginx.org/download/nginx-1.24.0.tar.gz "$HOME/rpmbuild/SOURCES/"
|
|
|
|
|
+ - name: Build source RPMS
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - rpmbuild -bs ~/rpmbuild/SPECS/hestia-nginx.spec
|
|
|
|
|
+ - name: RHEL 8
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - mkdir -p ./packages/rhel8/
|
|
|
|
|
+ - mock -r rocky+epel-8-$(arch) ~/rpmbuild/SRPMS/hestia-nginx-1.24.0-1.el8.src.rpm
|
|
|
|
|
+ - cp /var/lib/mock/rocky+epel-8-$(arch)/result/*.rpm ./packages/rhel8/
|
|
|
|
|
+ - name: RHEL 9
|
|
|
|
|
+ commands:
|
|
|
|
|
+ - mkdir -p ./packages/rhel9/
|
|
|
|
|
+ - mock -r rocky+epel-9-$(arch) ~/rpmbuild/SRPMS/hestia-nginx-1.24.0-1.el9.src.rpm
|
|
|
|
|
+ - cp /var/lib/mock/rocky+epel-9-$(arch)/result/*.rpm ./packages/rhel9/
|
|
|
|
|
+ - name: scp files
|
|
|
|
|
+ image: appleboy/drone-scp:1.6.4
|
|
|
|
|
+ settings:
|
|
|
|
|
+ host:
|
|
|
|
|
+ from_secret: target_server
|
|
|
|
|
+ user: root
|
|
|
|
|
+ key:
|
|
|
|
|
+ from_secret: ssh_key
|
|
|
|
|
+ port: 22
|
|
|
|
|
+ command_timeout: 2m
|
|
|
|
|
+ target: /root/
|
|
|
|
|
+ source:
|
|
|
|
|
+ - ./packages/*
|
|
|
|
|
|
|
|
trigger:
|
|
trigger:
|
|
|
event: [ promote ]
|
|
event: [ promote ]
|