Compare commits

..

7 Commits

Author SHA1 Message Date
e171f0420d
fix build
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2023-05-13 13:47:25 +02:00
c7591d736c
changed registry and updated drone pipeline format
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing
2023-05-13 11:51:49 +02:00
e8d74a33bf
pinned to specific centos release
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-04-27 18:21:48 +02:00
ebe4b98580
updated nethserver to 7.7
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2020-03-02 14:21:08 +01:00
ed746b6792
typo
All checks were successful
continuous-integration/drone/tag Build is passing
continuous-integration/drone/push Build is passing
2019-04-25 20:30:58 +02:00
e9270cac3a
force devtree setup
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone/tag Build is failing
2019-04-25 20:27:21 +02:00
488b727aa7
no need to set working dir
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
2019-04-25 20:16:39 +02:00
4 changed files with 31 additions and 19 deletions

View File

@ -1,4 +1,5 @@
kind: pipeline kind: pipeline
type: docker
name: default name: default
steps: steps:
@ -8,7 +9,7 @@ steps:
settings: settings:
daemon_off: false daemon_off: false
dry_run: true dry_run: true
repo: registry.libreschool.org/libreschool-automation/rpm-build repo: git.libreschool.org/libreschool-automation/rpm-build
tags: tags:
- latest - latest
- 7 - 7
@ -22,15 +23,16 @@ steps:
pull: always pull: always
settings: settings:
daemon_off: false daemon_off: false
force_tag: true
registry: git.libreschool.org
username:
from_secret: docker_username
password: password:
from_secret: docker_password from_secret: docker_password
registry: registry.libreschool.org repo: git.libreschool.org/libreschool-automation/rpm-build
repo: registry.libreschool.org/libreschool-automation/rpm-build
tags: tags:
- latest - latest
- 7 - 7
username:
from_secret: docker_username
when: when:
event: event:
- tag - tag

View File

@ -1,22 +1,21 @@
FROM centos:7 FROM centos:7.7.1908
RUN \ RUN \
sed -i 's/^keepcache.*/keepcache=1/' /etc/yum.conf && \ sed -i 's/^keepcache.*/keepcache=1/' /etc/yum.conf && \
yum upgrade -y && \ yum upgrade -y && \
yum localinstall -y http://mirror.nethserver.org/nethserver/7/base/x86_64/Packages/nethserver-release-7-11.ns7.noarch.rpm && \ yum localinstall -y http://mirror.nethserver.org/nethserver/7/base/x86_64/Packages/nethserver-release-7-19.ns7.noarch.rpm && \
yum install -y sudo cmake automake autoconf libtool gcc gcc-c++ nethserver-mock yum install -y sudo cmake automake autoconf libtool gcc gcc-c++ epel-release && \
yum install -y nethserver-mock
# other packages often needed # other packages often needed
RUN yum install -y nethserver-devtools hunspell-en RUN yum install -y nethserver-devtools hunspell-en
RUN \ ADD run.sh /usr/local/bin
echo "# macros" > /root/.rpmmacros && \ RUN chmod 755 /usr/local/bin/run.sh && \
echo "%_topdir /build" >> /root/.rpmmacros && \ mkdir -p /drone/src && \
echo "%_sourcedir %{_topdir}" >> /root/.rpmmacros && \ cd /drone/src && \
echo "%_builddir %{_topdir}" >> /root/.rpmmacros && \ /usr/local/bin/run.sh
echo "%_specdir %{_topdir}" >> /root/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /root/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /root/.rpmmacros && \
rpmdev-setuptree
ENV PATH=/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin ENV PATH=/usr/bin:/sbin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin
ENTRYPOINT ["/usr/local/bin/run.sh"]

View File

@ -19,9 +19,8 @@ name: default
steps: steps:
- name: build - name: build
image: registry.libreschool.org/libreschool-automation/rpm-build:latest image: git.libreschool.org/libreschool-automation/rpm-build:7
pull: always pull: always
working_dir: /build
commands: commands:
- yum-builddep -y mypackage.spec - yum-builddep -y mypackage.spec
- rpmbuild -ba mypackage.spec - rpmbuild -ba mypackage.spec

12
run.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
echo "# macros" > /root/.rpmmacros && \
echo "%_topdir /$PWD" >> /root/.rpmmacros && \
echo "%_sourcedir %{_topdir}" >> /root/.rpmmacros && \
echo "%_builddir %{_topdir}" >> /root/.rpmmacros && \
echo "%_specdir %{_topdir}" >> /root/.rpmmacros && \
echo "%_rpmdir %{_topdir}" >> /root/.rpmmacros && \
echo "%_srcrpmdir %{_topdir}" >> /root/.rpmmacros && \
rpmdev-setuptree