From fb62493a1968d27766c246c4b31b85f382a923da Mon Sep 17 00:00:00 2001 From: Paolo Asperti Date: Sun, 1 Mar 2020 23:58:16 +0100 Subject: [PATCH] updated drone config --- .drone.yml | 71 ++++++++++++++++++++++------------------ README.md | 2 +- libreschool-release.spec | 2 +- 3 files changed, 41 insertions(+), 34 deletions(-) diff --git a/.drone.yml b/.drone.yml index 09d4ca2..1f36665 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,47 +1,54 @@ -# this is needed by the RPM build plugin -workspace: - base: /build - path: / +kind: pipeline +name: default -pipeline: - create_targz: - image: libreschool-automation/rpm-pack:latest - dest: $$NAME-$$VERSION-$$RELEASE.tar.gz - dir: $$NAME-$$VERSION - files: - - root - - README.md - - COPYING + +steps: + - name: create_targz + image: registry.libreschool.org/libreschool-automation/rpm-pack:latest + pull: always + settings: + files: + - root + - README.md + - COPYING when: - event: [ push, tag, deployment ] - - build: - image: libreschool-automation/rpm-build:latest + event: [ push, tag ] + + - name: build + image: registry.libreschool.org/libreschool-automation/rpm-build:7 + pull: always commands: - yum-builddep -y libreschool-release.spec - rpmbuild -ba libreschool-release.spec - mkdir out ; mv *.rpm noarch/*.rpm out/ when: - event: [ push, tag, deployment ] + event: [ push, tag ] - pkg_sign: - image: libreschool-automation/rpm-sign - files: out/*.rpm - secrets: [ gpg_key, passphrase ] + - name: sign + image: registry.libreschool.org/libreschool-automation/rpm-sign:latest + pull: always + settings: + files: out/*.rpm + gpg_key: + from_secret: gpg_key + passphrase: + from_secret: passphrase when: event: tag - gitea_release: - group: deploy + - name: gitea_release image: plugins/gitea-release - files: out/*.rpm - checksum: - - md5 - - sha1 - - sha256 - - sha512 - secrets: [ gitea_token ] - base_url: https://git.libreschool.org + settings: + files: out/*.rpm + checksum: + - md5 + - sha1 + - sha256 + - sha512 + api_key: + from_secret: gitea_token + base_url: https://git.libreschool.org + file_exists: skip when: event: tag diff --git a/README.md b/README.md index d62bd10..352fdac 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,5 @@ Adds LibreSchool repository configuration for NethServer Installations. yum localinstall -y https://repo.libreschool.org/nethserver/6/base/x86_64/Packages/libreschool-release-1.0-1.noarch.rpm ## Installation on NethServer 7 - yum localinstall -y https://repo.libreschool.org/nethserver/7/base/x86_64/Packages/libreschool-release-1.0-1.noarch.rpm + yum localinstall -y https://repo.libreschool.org/nethserver/7/base/x86_64/Packages/libreschool-release-1.1-1.noarch.rpm diff --git a/libreschool-release.spec b/libreschool-release.spec index 402d6d7..884449c 100644 --- a/libreschool-release.spec +++ b/libreschool-release.spec @@ -5,7 +5,7 @@ Release: 1 License: GPL BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-root -Source0: %{name}-%{version}-%{release}.tar.gz +Source0: %{name}-%{version}.tar.gz Source1: COPYING URL: %{url_prefix}/%{name} BuildRequires: nethserver-devtools