mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-31 04:19:15 +08:00
Merge pull request #1342 from mbilker/linux-32bit-docker
[RFC] Linux 32-bit Docker build
This commit is contained in:
commit
10ec524d90
5 changed files with 64 additions and 1 deletions
|
@ -10,7 +10,7 @@ packageVersion = null
|
||||||
fullVersion = null
|
fullVersion = null
|
||||||
|
|
||||||
module.exports = (grunt) ->
|
module.exports = (grunt) ->
|
||||||
{cp, spawn, rm} = require('./task-helpers')(grunt)
|
{cp, shouldPublishBuild, spawn, rm} = require('./task-helpers')(grunt)
|
||||||
|
|
||||||
appName = -> grunt.config.get('nylasGruntConfig.appName')
|
appName = -> grunt.config.get('nylasGruntConfig.appName')
|
||||||
dmgName = -> "#{appName().split('.')[0]}.dmg"
|
dmgName = -> "#{appName().split('.')[0]}.dmg"
|
||||||
|
@ -125,6 +125,8 @@ module.exports = (grunt) ->
|
||||||
uploadToS3(buildZipFilename, key).then(resolve).catch(reject)
|
uploadToS3(buildZipFilename, key).then(resolve).catch(reject)
|
||||||
|
|
||||||
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
grunt.registerTask "publish-nylas-build", "Publish Nylas build", ->
|
||||||
|
return unless shouldPublishBuild()
|
||||||
|
|
||||||
awsKey = process.env.AWS_ACCESS_KEY_ID ? ""
|
awsKey = process.env.AWS_ACCESS_KEY_ID ? ""
|
||||||
awsSecret = process.env.AWS_SECRET_ACCESS_KEY ? ""
|
awsSecret = process.env.AWS_SECRET_ACCESS_KEY ? ""
|
||||||
|
|
||||||
|
|
37
docker/ubuntu32/Dockerfile
Normal file
37
docker/ubuntu32/Dockerfile
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# VERSION: 0.1
|
||||||
|
# DESCRIPTION: Image to build N1 and create a .deb and .rpm file for 32-bit systems, derived from Atom's Dockerfile
|
||||||
|
|
||||||
|
# Base docker image
|
||||||
|
FROM 32bit/ubuntu:14.04
|
||||||
|
|
||||||
|
# Force noninteractive mode
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
# Setup NodeSource repository for Node LTS v4.x
|
||||||
|
RUN apt-get update && apt-get install -y curl
|
||||||
|
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash -
|
||||||
|
|
||||||
|
# Correct errors with libpam-systemd (indirect dependency of libnotify4)
|
||||||
|
RUN /bin/ln -sf /bin/true /sbin/initctl
|
||||||
|
RUN /usr/bin/touch /etc/init.d/systemd-logind
|
||||||
|
|
||||||
|
# Install dependencies (NodeSource setup runs `apt-get update` for us)
|
||||||
|
RUN apt-get -y install \
|
||||||
|
build-essential \
|
||||||
|
fakeroot \
|
||||||
|
git \
|
||||||
|
libgnome-keyring-dev \
|
||||||
|
python \
|
||||||
|
rpm \
|
||||||
|
nodejs
|
||||||
|
|
||||||
|
# For when Linux testing is re-enabled
|
||||||
|
# libgconf2-4 \
|
||||||
|
# libgtk2.0-0 \
|
||||||
|
# libnotify4 \
|
||||||
|
# xvfb
|
||||||
|
|
||||||
|
#RUN npm install -g npm@3.3.10 --loglevel error
|
||||||
|
|
||||||
|
ADD . /n1
|
||||||
|
WORKDIR /n1
|
13
script/cibuild-n1-ubuntu32
Executable file
13
script/cibuild-n1-ubuntu32
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# --rm \
|
||||||
|
docker build -t n1-32 -f ./docker/ubuntu32/Dockerfile .
|
||||||
|
docker run \
|
||||||
|
--env PUBLISH_BUILD="$PUBLISH_BUILD" \
|
||||||
|
--env TRAVIS="$TRAVIS" \
|
||||||
|
--env TRAVIS_PULL_REQUEST="$TRAVIS_PULL_REQUEST" \
|
||||||
|
--env TRAVIS_BRANCH="$TRAVIS_BRANCH" \
|
||||||
|
n1-32 /usr/bin/linux32 /n1/script/dockerbuild
|
||||||
|
docker rmi n1-32
|
6
script/dockerbuild
Executable file
6
script/dockerbuild
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
script/build
|
||||||
|
script/grunt mkdeb mkrpm publish-nylas-build --stack --no-color --install-dir /usr
|
|
@ -11,6 +11,11 @@ APP_FILE_NAME="$5"
|
||||||
RPM_BUILD_ROOT=~/rpmbuild
|
RPM_BUILD_ROOT=~/rpmbuild
|
||||||
ARCH=`uname -m`
|
ARCH=`uname -m`
|
||||||
|
|
||||||
|
# Work around for `uname -m` returning i686 when rpmbuild uses i386 instead
|
||||||
|
if [ "$ARCH" = "i686" ]; then
|
||||||
|
ARCH="i386"
|
||||||
|
fi
|
||||||
|
|
||||||
# rpmdev-setuptree
|
# rpmdev-setuptree
|
||||||
mkdir -p $RPM_BUILD_ROOT/BUILD
|
mkdir -p $RPM_BUILD_ROOT/BUILD
|
||||||
mkdir -p $RPM_BUILD_ROOT/SPECS
|
mkdir -p $RPM_BUILD_ROOT/SPECS
|
||||||
|
|
Loading…
Reference in a new issue