]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
new circleci stuff
authorDylan William Hardison <dylan@hardison.net>
Sun, 6 Aug 2017 18:00:04 +0000 (14:00 -0400)
committerDylan William Hardison <dylan@hardison.net>
Sun, 6 Aug 2017 18:02:49 +0000 (14:02 -0400)
.circleci/config.yml [new file with mode: 0644]
Dockerfile
Makefile.PL
checksetup.pl

diff --git a/.circleci/config.yml b/.circleci/config.yml
new file mode 100644 (file)
index 0000000..c293f38
--- /dev/null
@@ -0,0 +1,10 @@
+version: 2
+jobs:
+  build:
+    working_directory: /app
+    docker:
+      - image: docker:17.06.1-ce
+    steps:
+      - setup_remote_docker
+      - checkout
+      - run: docker build .
index 0c1aac13b599c1cf59e24bb368a5d86105876650..77a490fa0a53dd1f3b551383869fb754dfb366cb 100644 (file)
@@ -1,75 +1,27 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
+FROM alpine:3.6 as builder
+MAINTAINER Dylan Hardison <dylan@hardison.net>
 
-FROM centos:7
-MAINTAINER David Lawrence <dkl@mozilla.com>
+RUN apk --update add perl curl wget \
+    make gcc g++ \
+    perl-dev \
+    libevent-dev \
+    libc-dev \
+    expat-dev \
+    libressl-dev \
+    libressl \
+    mariadb-dev \
+    postgresql-dev
 
-# Environment configuration
-ENV USER bugzilla
-ENV HOME /home/$USER
-ENV BUGS_DB_DRIVER mysql
-ENV BUGZILLA_ROOT $HOME/devel/htdocs/bugzilla
-ENV GITHUB_BASE_GIT https://github.com/bugzilla/bugzilla
-ENV GITHUB_BASE_BRANCH master
-ENV GITHUB_QA_GIT https://github.com/bugzilla/qa
+RUN curl -s -L https://cpanmin.us > /usr/local/bin/cpanm && \
+    chmod 755 /usr/local/bin/cpanm
 
-# Distribution package installation
-COPY docker_files /docker_files
-RUN yum -y -q update \
-    && yum -y -q install https://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm epel-release \
-    && yum -y -q groupinstall "Development Tools" \
-    && yum -y -q install `cat /docker_files/rpm_list` \
-    && yum clean all
+COPY . /app
 
-# User configuration
-RUN useradd -m -G wheel -u 1000 -s /bin/bash $USER \
-    && passwd -u -f $USER \
-    && echo "bugzilla:bugzilla" | chpasswd
+WORKDIR /app
 
-# Apache configuration
-RUN cp /docker_files/bugzilla.conf /etc/httpd/conf.d/bugzilla.conf \
-    && chown root.root /etc/httpd/conf.d/bugzilla.conf \
-    && chmod 440 /etc/httpd/conf.d/bugzilla.conf
+RUN perl checksetup.pl --cpanm='default pg mysql'
 
-# MySQL configuration
-RUN cp /docker_files/my.cnf /etc/my.cnf \
-    && chmod 644 /etc/my.cnf \
-    && chown root.root /etc/my.cnf \
-    && rm -rf /etc/mysql \
-    && rm -rf /var/lib/mysql/* \
-    && /usr/bin/mysql_install_db --user=$USER --basedir=/usr --datadir=/var/lib/mysql
+FROM alpine:3.6
 
-# Sudoer configuration
-RUN cp /docker_files/sudoers /etc/sudoers \
-    && chown root.root /etc/sudoers \
-    && chmod 440 /etc/sudoers
-
-# Clone the code repo initially
-RUN su $USER -c "git clone $GITHUB_BASE_GIT -b $GITHUB_BASE_BRANCH $BUGZILLA_ROOT"
-
-# Bugzilla dependencies and setup
-ADD https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm /usr/local/bin/cpanm
-RUN chmod 755 /usr/local/bin/cpanm
-RUN /bin/bash /docker_files/install_deps.sh
-RUN /bin/bash /docker_files/bugzilla_config.sh
-RUN /bin/bash /docker_files/my_config.sh
-
-# Final permissions fix
-RUN chown -R $USER.$USER $HOME
-
-# Networking
-RUN echo "NETWORKING=yes" > /etc/sysconfig/network
-EXPOSE 80
-EXPOSE 5900
-
-# Testing scripts for CI
-ADD https://selenium-release.storage.googleapis.com/2.45/selenium-server-standalone-2.45.0.jar /selenium-server.jar
-
-# Supervisor
-RUN cp /docker_files/supervisord.conf /etc/supervisord.conf \
-    && chmod 700 /etc/supervisord.conf
-CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
+WORKDIR /app
+COPY --from=builder /app /app
index c5e8886ee88794f3ce16954747ccf64226dbb7e8..c873d68bdadf1e1c60c3487cdc4100654b11e60e 100644 (file)
@@ -97,7 +97,7 @@ my %optional_features = (
     detect_charset => {
         prereqs => {
             runtime =>
-                { requires => { 'Encode::Detect' => 0, Encode => '2.21' } }
+                { requires => { 'Encode::Detect' => 0, Encode => '2.87' } }
         },
         description => 'Automatic charset detection for text attachments'
     },
index 9afc84c7d202ab5468ae4816b7b1a269a1b6a230..536d20987994936d9e69d8e263f8350c543b4251 100755 (executable)
@@ -90,7 +90,7 @@ if (defined $switch{cpanm}) {
     }
     print "cpanm @cpanm_args \".\"\n" if !$silent;
     my $rv = system('cpanm', @cpanm_args, '.');
-    exit 1 if $rv != 0;
+    exit(!!$rv);
 }
 
 $ENV{PERL_MM_USE_DEFAULT} = 1;