Skip to content
This repository has been archived by the owner on Apr 30, 2018. It is now read-only.

Commit

Permalink
Add and use yarn by default to build the SRPMs
Browse files Browse the repository at this point in the history
  • Loading branch information
LeSuisse committed Feb 13, 2017
1 parent 2be4586 commit ce8080d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 36 deletions.
21 changes: 9 additions & 12 deletions Dockerfile
@@ -1,8 +1,8 @@
FROM ubuntu:16.04

MAINTAINER Thomas Gerbet <thomas.gerbet@enalean.com>

RUN apt-get update \
RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 72ECF46A56B4AD39C907BBB71646B01B86E50310 \
&& echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y \
nodejs \
npm \
Expand All @@ -13,21 +13,19 @@ RUN apt-get update \
git \
cpio \
gettext \
expect \
yarn \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& gem install scss_lint
&& gem install scss_lint \
&& ln -s /usr/bin/nodejs /usr/bin/node \
&& npm install --global npm \
&& npm config set progress false

# This is used by bower to disable interactive mode
ENV CI true

# Disable cli progress animation in npm
RUN ln -s /usr/bin/nodejs /usr/bin/node \
&& npm install --global npm \
&& npm config set progress false

## Install base node modules
RUN npm install --global \
RUN yarn global add \
grunt-cli \
bower \
less \
Expand All @@ -37,7 +35,6 @@ RUN npm install --global \
phantomjs-prebuilt

COPY run.sh /run.sh
COPY npm-login.sh /npm-login.sh

VOLUME ["/tuleap"]
VOLUME ["/srpms"]
Expand Down
1 change: 0 additions & 1 deletion README.md
Expand Up @@ -10,4 +10,3 @@ The following environment variables can be used for the configuration:
* ``NPM_REGISTRY``: registry address
* ``NPM_USER``: user name used to log in into the registry
* ``NPM_PASSWORD``: password of the user
* ``NPM_EMAIL``: public mail associated with the user
19 changes: 0 additions & 19 deletions npm-login.sh

This file was deleted.

9 changes: 5 additions & 4 deletions run.sh
Expand Up @@ -14,10 +14,11 @@ trap cleanup EXIT

configure_npm_registry(){
if [ ! -z "$NPM_REGISTRY" ]; then
npm config set registry "$NPM_REGISTRY"
fi
if [ ! -z "$NPM_USER" -a ! -z "$NPM_PASSWORD" -a ! -z "$NPM_EMAIL" ]; then
./npm-login.sh "$NPM_USER" "$NPM_PASSWORD" "$NPM_EMAIL"
local registry="$NPM_REGISTRY"
if [ ! -z "$NPM_USER" -a ! -z "$NPM_PASSWORD" ]; then
registry="${registry/https:\/\//https:\/\/$NPM_USER:$NPM_PASSWORD\@}"
fi
yarn config set registry "$registry" > /dev/null 2>&1
fi
}

Expand Down

0 comments on commit ce8080d

Please sign in to comment.