Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • smartdatalab/public/applications/renovate
1 result
Select Git revision
Show changes
Commits on Source (1000)
Showing
with 401 additions and 103 deletions
......@@ -15,5 +15,12 @@
"@babel/proposal-object-rest-spread"
],
"sourceMaps": true,
"retainLines": true
"retainLines": true,
// https://github.com/facebook/jest/issues/5920
"env": {
"test": {
"plugins": ["dynamic-import-node"]
}
}
}
......@@ -14,6 +14,13 @@ commands:
git config --global user.name "Renovate Bot"
git --version
- restore_cache:
keys:
- dependency-cache-v2-{{ .Branch }}-{{ checksum "yarn.lock" }}
- dependency-cache-v2-{{ .Branch }}-
- dependency-cache-v2-
- dependency-cache-
- run:
name: Installing Dependencies
command: |
......@@ -21,8 +28,9 @@ commands:
pip install --user -r requirements.txt
- save_cache:
key: dependency-cache-{{ checksum "yarn.lock" }}
key: dependency-cache-v2-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- ./node_modules
- '.cache'
- '.eslintcache'
......@@ -30,8 +38,10 @@ commands:
- run:
name: Lint
command: |
yarn lint
yarn eslint --format junit -o test-results/lint/results.xml
yarn prettier
yarn test-schema
yarn type-check
- run:
name: Build
......@@ -41,7 +51,15 @@ commands:
- run:
name: Unit Tests
command: |
yarn jest --runInBand
yarn jest --maxWorkers=2 --ci --reporters=default --reporters=jest-junit
environment:
JEST_JUNIT_OUTPUT_DIR: 'test-results/jest'
JEST_JUNIT_OUTPUT_NAME: 'results.xml'
- store_test_results:
path: test-results
- store_artifacts:
path: test-results
- run:
name: E2E Tests
......@@ -52,22 +70,24 @@ commands:
name: Coverage
command: |
bash <(curl -s https://codecov.io/bash) -Z -C $CIRCLE_SHA1
when: always
jobs:
test_node_10:
docker:
- image: amd64/node:10.16.0@sha256:7af3328e235a92c949e0b7c3c738b4c3d05ceb82306fddbe75136f2e7842e6f4
steps:
- test
test_node_12:
docker:
- image: amd64/node:12.5.0@sha256:78acf4f4a80d23f94546bf80c174b182c43c1ca88befa9bfbc36878085e14ecf
- image: amd64/node:10.18.1@sha256:c46b41071ce455e47f205bf83b7ad6593ad22194639df1298a735f407ded1df6
steps:
- test
release:
docker:
- image: amd64/node:10.16.0@sha256:7af3328e235a92c949e0b7c3c738b4c3d05ceb82306fddbe75136f2e7842e6f4
- image: amd64/node:10.18.1@sha256:c46b41071ce455e47f205bf83b7ad6593ad22194639df1298a735f407ded1df6
steps:
- checkout
- restore_cache:
keys:
- dependency-cache-v2-{{ .Branch }}-{{ checksum "yarn.lock" }}
- dependency-cache-v2-{{ .Branch }}-
- dependency-cache-v2-
- dependency-cache-
- run: yarn install --frozen-lockfile
- run: yarn build
- run: yarn semantic-release
......@@ -78,11 +98,9 @@ workflows:
test_and_release:
jobs:
- test_node_10
- test_node_12
- release:
requires:
- test_node_10
- test_node_12
filters:
branches:
only:
......
......@@ -4,5 +4,6 @@
!hooks
!lib
!bin/yarn*
!bin/config-validator.js
!tsconfig*.json
!data
test/**/**/_fixtures
lib/types/**/*.d.ts
**/__mocks__/**/*.ts
/config.js
module.exports = {
env: {
node: true,
jest: true,
},
extends: [
'plugin:promise/recommended',
......@@ -14,7 +15,8 @@ module.exports = {
project: './tsconfig.json',
},
rules: {
'import/no-unresolved': 0, // only required for js, see overrides
'import/no-unresolved': 0, // done by typescript
'import/prefer-default-export': 0, // no benefit
'require-await': 'error',
'no-use-before-define': 0,
'no-restricted-syntax': 0,
......@@ -23,24 +25,29 @@ module.exports = {
'prefer-template': 'off',
'no-underscore-dangle': 0,
'@typescript-eslint/explicit-function-return-type': 'error',
// TODO: fix lint
'@typescript-eslint/camelcase': 'off', // disabled until ??
'@typescript-eslint/no-var-requires': 'off', // disable until all files converted to typescript
'@typescript-eslint/no-use-before-define': 'off', // disable until all files converted to typescript
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
},
], // disable until proper interfaced api
},
overrides: [
{
// TODO: should be removed in near future, uses around ~50% lint time
files: ['*.js'],
rules: {
'import/no-unresolved': [
'error',
{ commonjs: true, caseSensitive: true },
],
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/explicit-function-return-type': 0,
},
},
],
......
......@@ -4,25 +4,21 @@ about: You've found a bug with Renovate
---
**What Renovate type are you using?**
Renovate CLI, Renovate GitHub App, or Renovate Pro?
<!-- Tell us if you're using the hosted App, or if you are self-hosted Renovate yourself. Platform too (GitHub, GitLab, etc) if you think it's relevant. -->
**Describe the bug**
A clear and concise description of what the bug is.
**Did you see anything helpful in debug logs?**
If you are using the Renovate App, log into https://renovatebot.com/dashboard and locate the correct job log for when the problem occurred (e.g. when the PR was created).
<!-- A clear and concise description of what the bug is. -->
**To Reproduce**
Steps to reproduce the behavior:
**Did you see anything helpful in debug logs?**
1. Create repository with '...'
2. Configure '....'
<!-- If you're running self-hosted, run with `--log-level=debug` or LOG_LEVEL=debug and search for whatever dependency/branch/PR that is causing the problem. If you are using the Renovate App, log into https://app.renovatebot.com/dashboard and locate the correct job log for when the problem occurred (e.g. when the PR was created). The Job ID will help us locate it. -->
**Expected behavior**
A clear and concise description of what you expected to happen.
**To Reproduce**
**Screenshots**
If applicable, add screenshots to help explain your problem.
<!-- To fix a bug, we nearly always need a *minimal* repo to reproduce it in, before verifying that our fix works using the same repo. If you provide a public repo that already reproduces the problem, then your bug will get highest priority for fixing. If you can't reproduce it in a simple repo, do your best to describe how it could be reproduced, or under what circumstances the bug occurs. -->
**Additional context**
Add any other context about the problem here.
<!-- Add any other context about the problem here, including your own debugging or ideas on what went wrong. -->
......@@ -14,7 +14,7 @@ If you've found a **bug** or have a **feature request** then please create an is
## Code
If you would like to fix a bug or implement a feature, please fork the repository and create a Pull Request. More information on getting set up locally can be found in [docs/local-development.md](https://github.com/renovatebot/renovate/blob/master/docs/local-development.md).
If you would like to fix a bug or implement a feature, please fork the repository and create a Pull Request. More information on getting set up locally can be found in [docs/development/local-development.md](https://github.com/renovatebot/renovate/blob/master/docs/development/local-development.md).
Before you start any Pull Request, it's recommended that you create an issue to discuss
first if you have any doubts about requirement or implementation. That way you can be sure that the maintainer(s)
......
<!--
Before submitting a Pull Request, please ensure you have signed the CLA using this GitHub App:
https://cla-assistant.io/renovateapp/renovate
Please ensure `Allow edits from maintainers.` checkbox is checked
-->
<!-- Replace this text with a description of what this PR fixes or adds -->
......
name: Docker Images CI
on: [pull_request]
env:
PLATFORM: linux/amd64
jobs:
build:
name: Build image
runs-on: ubuntu-latest
strategy:
matrix:
file: [Dockerfile, Dockerfile.slim]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: v0.3.1
- name: Build the Docker image
run: |
docker buildx build \
--platform ${PLATFORM} \
--output "type=docker" \
--tag renovate \
--file ./${{ matrix.file }} .
- name: Image history
run: docker history renovate
- name: Image size
run: docker image ls | grep renovate
name: Test CI
on:
push:
branches:
- master
pull_request:
env:
CI: true
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [10.x, 12.x]
python-version: [3.8]
steps:
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Init platform
id: init
shell: bash
run: |
echo "::set-output name=yarn_cache::$(yarn cache dir)"
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=pip_cache::' + USER_CACHE_DIR)"
git config --global core.autocrlf false
git config --global core.symlinks true
git config --global user.email 'bot@renovateapp.com'
git config --global user.name 'Renovate Bot'
node --version
python --version
yarn --version
pip --version
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Cache Yarn packages
uses: actions/cache@v1
with:
path: ${{ steps.init.outputs.yarn_cache }}
key: ${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn_cache-
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.node-version }}-yarn-
- name: Cache pip packages
uses: actions/cache@v1
with:
path: ${{ steps.init.outputs.pip_cache }}
key: ${{ runner.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-${{ matrix.python-version }}-pip-
- name: Installing dependencies
shell: bash
run: |
python -m pip install --upgrade pip
yarn install --frozen-lockfile --link-duplicates
pip install --user -r requirements.txt
- name: Lint
run: yarn lint
- name: Test schema
run: yarn test-schema
- name: Type check
run: yarn type-check
- name: Build
run: yarn build
- name: Unit tests
run: yarn jest --maxWorkers=2 --ci --coverageReporters=text-summary
- name: E2E Test
run: yarn test-e2e
......@@ -12,3 +12,5 @@
renovate-0.0.0-semantic-release.tgz
/e2e/node_modules
.eslintcache
junit.xml
/test-results
......@@ -22,9 +22,10 @@
"args": [
"--runInBand",
"--collectCoverage=false",
"${fileBasenameNoExtension}"
"--runTestsByPath",
"${relativeFile}"
],
"env": { "LOG_LEVEL": "debug" },
"env": { "NODE_ENV": "test", "LOG_LEVEL": "debug" },
"console": "integratedTerminal",
"disableOptimisticBPs": true,
"windows": {
......@@ -40,7 +41,7 @@
"name": "Jest All",
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": ["--runInBand", "--collectCoverage=false"],
"env": { "LOG_LEVEL": "debug" },
"env": { "NODE_ENV": "test", "LOG_LEVEL": "debug" },
"console": "integratedTerminal",
"disableOptimisticBPs": true,
"windows": {
......
......@@ -11,5 +11,8 @@
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.associations": {
"Dockerfile.*": "dockerfile"
}
}
FROM amd64/node:10.16.0 AS tsbuild
FROM amd64/node:10.18.1@sha256:c46b41071ce455e47f205bf83b7ad6593ad22194639df1298a735f407ded1df6 AS tsbuild
COPY package.json .
COPY yarn.lock .
......@@ -8,26 +8,29 @@ COPY lib lib
COPY tsconfig.json tsconfig.json
COPY tsconfig.app.json tsconfig.app.json
RUN yarn build
RUN yarn build:docker
FROM amd64/ubuntu:18.04@sha256:eb70667a801686f914408558660da753cde27192cd036148e58258819b927395
FROM amd64/ubuntu:18.04@sha256:bc025862c3e8ec4a8754ea4756e33da6c41cba38330d7e324abd25c8e0b93300
LABEL maintainer="Rhys Arkins <rhys@arkins.net>"
LABEL name="renovate"
LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate"
WORKDIR /usr/src/app/
ENV APP_ROOT=/usr/src/app
WORKDIR ${APP_ROOT}
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt-get update && apt-get install -y gpg curl wget unzip xz-utils git openssh-client bsdtar && apt-get clean -y
RUN apt-get update && apt-get install -y gpg curl wget unzip xz-utils git openssh-client bsdtar build-essential && \
rm -rf /var/lib/apt/lists/*
## Gradle
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-8-jdk gradle && apt-get clean -y
RUN apt-get update && apt-get install -y --no-install-recommends openjdk-11-jre-headless gradle && \
rm -rf /var/lib/apt/lists/*
## Node.js
......@@ -74,9 +77,35 @@ RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \
## END copy Node.js
# Erlang
RUN cd /tmp && \
curl https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb -o erlang-solutions_1.0_all.deb && \
dpkg -i erlang-solutions_1.0_all.deb && \
rm -f erlang-solutions_1.0_all.deb
ENV ERLANG_VERSION=22.0.2-1
RUN apt-get update && \
apt-cache policy esl-erlang && \
apt-get install -y esl-erlang=1:$ERLANG_VERSION && \
rm -rf /var/lib/apt/lists/*
# Elixir
ENV ELIXIR_VERSION 1.8.2
RUN curl -L https://github.com/elixir-lang/elixir/releases/download/v${ELIXIR_VERSION}/Precompiled.zip -o Precompiled.zip && \
mkdir -p /opt/elixir-${ELIXIR_VERSION}/ && \
unzip Precompiled.zip -d /opt/elixir-${ELIXIR_VERSION}/ && \
rm Precompiled.zip
ENV PATH $PATH:/opt/elixir-${ELIXIR_VERSION}/bin
# PHP Composer
RUN apt-get update && apt-get install -y php-cli php-mbstring && apt-get clean
RUN apt-get update && apt-get install -y php-cli php-mbstring && \
rm -rf /var/lib/apt/lists/*
ENV COMPOSER_VERSION=1.8.6
......@@ -86,9 +115,14 @@ RUN chmod +x /usr/local/bin/composer
# Go Modules
RUN apt-get update && apt-get install -y bzr && apt-get clean
RUN apt-get update && apt-get install -y bzr mercurial && \
rm -rf /var/lib/apt/lists/*
ENV GOLANG_VERSION 1.12
ENV GOLANG_VERSION 1.13.4
# Disable GOPROXY and GOSUMDB until we offer a solid solution to configure
# private repositories.
ENV GOPROXY=direct GOSUMDB=off
RUN wget -q -O go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" && \
tar -C /usr/local -xzf go.tgz && \
......@@ -104,28 +138,32 @@ ENV CGO_ENABLED=0
# Python
RUN apt-get update && apt-get install -y python3.7-dev python3-distutils && apt-get clean
RUN apt-get update && apt-get install -y python3.8-dev python3.8-venv python3-distutils && \
rm -rf /var/lib/apt/lists/*
RUN rm -fr /usr/bin/python3 && ln /usr/bin/python3.7 /usr/bin/python3
RUN rm -rf /usr/bin/python && ln /usr/bin/python3.7 /usr/bin/python
RUN rm -fr /usr/bin/python3 && ln /usr/bin/python3.8 /usr/bin/python3
RUN rm -rf /usr/bin/python && ln /usr/bin/python3.8 /usr/bin/python
# Pip
RUN curl --silent https://bootstrap.pypa.io/get-pip.py | python
# Set up ubuntu user
# Set up ubuntu user and home directory with access to users in the root group (0)
ENV HOME=/home/ubuntu
RUN groupadd --gid 1000 ubuntu && \
useradd --uid 1000 --gid ubuntu --groups 0 --shell /bin/bash --home-dir ${HOME} --create-home ubuntu
RUN groupadd --gid 1000 ubuntu \
&& useradd --uid 1000 --gid ubuntu --shell /bin/bash --create-home ubuntu
RUN chmod -R a+rw /usr
RUN chown -R ubuntu:0 ${APP_ROOT} ${HOME} && \
chmod -R g=u ${APP_ROOT} ${HOME}
# Docker client and group
RUN groupadd -g 999 docker
RUN usermod -aG docker ubuntu
ENV DOCKER_VERSION=18.09.2
ENV DOCKER_VERSION=19.03.1
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
&& tar xzvf docker-${DOCKER_VERSION}.tgz --strip 1 \
......@@ -134,39 +172,61 @@ RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${
USER ubuntu
# Cargo
ENV RUST_BACKTRACE=1 \
PATH=${HOME}/.cargo/bin:$PATH
ENV RUST_VERSION=1.36.0
RUN set -ex ;\
curl https://sh.rustup.rs -sSf | sh -s -- --no-modify-path --profile minimal --default-toolchain ${RUST_VERSION} -y
# Mix and Rebar
RUN mix local.hex --force
RUN mix local.rebar --force
# Pipenv
ENV PATH="/home/ubuntu/.local/bin:$PATH"
ENV PATH="${HOME}/.local/bin:$PATH"
RUN pip install --user pipenv
# Poetry
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
ENV POETRY_VERSION=1.0.0
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - --version ${POETRY_VERSION}
ENV PATH="/home/ubuntu/.poetry/bin:$PATH"
RUN poetry config settings.virtualenvs.create false
ENV PATH="${HOME}/.poetry/bin:$PATH"
RUN poetry config virtualenvs.in-project false
# npm
ENV NPM_VERSION=6.9.0
ENV NPM_VERSION=6.10.2
RUN npm install -g npm@$NPM_VERSION
# Yarn
ENV YARN_VERSION=1.16.0
ENV YARN_VERSION=1.19.1
RUN curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${YARN_VERSION}
ENV PATH="/home/ubuntu/.yarn/bin:/home/ubuntu/.config/yarn/global/node_modules/.bin:$PATH"
ENV PATH="${HOME}/.yarn/bin:${HOME}/.config/yarn/global/node_modules/.bin:$PATH"
COPY package.json .
COPY yarn.lock .
RUN yarn install --production --frozen-lockfile && yarn cache clean
RUN rm -f yarn.lock
COPY --from=tsbuild dist dist
COPY bin bin
COPY data data
# Numeric user ID for the ubuntu user. Used to indicate a non-root user to OpenShift
USER 1000
ENTRYPOINT ["node", "/usr/src/app/dist/renovate.js"]
CMD []
# Base image
#============
FROM renovate/yarn:1.21.1@sha256:6aeeab4a40e4687a961ab8bcefb2fa4ce374c4f0324cc40d37fbcecbfac4af0c AS base
LABEL maintainer="Rhys Arkins <rhys@arkins.net>"
LABEL name="renovate"
LABEL org.opencontainers.image.source="https://github.com/renovatebot/renovate"
WORKDIR /usr/src/app/
# required for install
USER root
RUN chown -R ubuntu:ubuntu /usr/src/app/
# and back to normal
USER ubuntu
# Build image
#============
FROM base as tsbuild
USER root
# Python 2 and make are required to build node-re2
RUN apt-get update && apt-get install -y python-minimal build-essential
USER ubuntu
COPY package.json .
COPY yarn.lock .
RUN yarn install --frozen-lockfile
COPY lib lib
COPY tsconfig.json tsconfig.json
COPY tsconfig.app.json tsconfig.app.json
RUN yarn build:docker
# Prune node_modules to production-only so they can be copied into the final image
RUN yarn install --production --frozen-lockfile
# Final image
#============
FROM base as final
# required for install
USER root
# Docker client and group
RUN groupadd -g 999 docker
RUN usermod -aG docker ubuntu
ENV DOCKER_VERSION=19.03.1
RUN curl -fsSLO https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz \
&& tar xzvf docker-${DOCKER_VERSION}.tgz --strip 1 \
-C /usr/local/bin docker/docker \
&& rm docker-${DOCKER_VERSION}.tgz
# and back to normal
USER ubuntu
COPY package.json .
COPY --from=tsbuild /usr/src/app/dist dist
COPY --from=tsbuild /usr/src/app/node_modules node_modules
COPY bin bin
COPY data data
ENV RENOVATE_BINARY_SOURCE=docker
ENTRYPOINT ["node", "/usr/src/app/dist/renovate.js"]
CMD []
......@@ -5,15 +5,9 @@ const os = require('os');
const { validateConfig } = require('../dist/config/validation');
const { massageConfig } = require('../dist/config/massage');
const { getConfig } = require('../dist/config/file');
const { initLogger } = require('../dist/logger');
const cache = require('../dist/workers/global/cache');
const { configFileNames } = require('../dist/config/app-strings');
initLogger();
// istanbul ignore if
if (!global.renovateCache) {
cache.init(os.tmpdir());
}
/* eslint-disable no-console */
let returnVal = 0;
......
......@@ -40,6 +40,9 @@ function createSingleConfig(option) {
if (option.default !== undefined) {
temp.default = option.default;
}
if (option.additionalProperties !== undefined) {
temp.additionalProperties = option.additionalProperties;
}
if (temp.type === 'object' && !option.freeChoice) {
temp.$ref = '#';
}
......
......@@ -47,7 +47,7 @@
"start": "2018-04-24",
"lts": "2018-10-30",
"maintenance": "2020-04-01",
"end": "2021-04-01",
"end": "2021-04-30",
"codename": "Dubnium"
},
"v11": {
......@@ -57,21 +57,21 @@
},
"v12": {
"start": "2019-04-23",
"lts": "2019-10-22",
"maintenance": "2021-04-01",
"end": "2022-04-01",
"codename": ""
"lts": "2019-10-21",
"maintenance": "2020-10-21",
"end": "2022-04-30",
"codename": "Erbium"
},
"v13": {
"start": "2019-10-22",
"maintenance": "2020-04-20",
"maintenance": "2020-04-01",
"end": "2020-06-01"
},
"v14": {
"start": "2020-04-21",
"lts": "2020-10-20",
"maintenance": "2022-04-01",
"end": "2023-04-01",
"maintenance": "2021-10-20",
"end": "2023-04-30",
"codename": ""
}
}
# Deployment
Before deploying the script for scheduled runs, it's recommend you test your
settings locally first.
## Server cron
Adding `renovate` as a `cron` job is the simplest way to deploy.
### Installation
Install using `npm install -g`.
### Configuration
At a minimum, you will need to configure the token and repository list. Simplest
would be to specify both via CLI. Alternatively, configure the token via
Environment Variable if you don't want it to show in any cron logs.
Running daily should suit most people. At most, hourly.
# Adding a Package Manager
This document describes the steps to take if you are interest in adding new language/package manager support.
This document describes the steps to take if you are interested in adding new language/package manager support.
### Background
Renovate began life as a JavaScript-only, specifically for the npmjs ecosystem.
Over time, additional "package managers" (e.g. Meteor.js, Dockerfile, nvm) have been added and the codebase incrementally refactored and improved with many of those to make it easier to add newer ones in future.
Over time, additional "package managers" (e.g. Pip, Dockerfile, nvm) have been added and the codebase incrementally refactored and improved with many of those to make it easier to add newer ones in future.
### Code structure
......@@ -37,13 +37,13 @@ This function is mandatory unless you use `extractAllPackageFiles` instead. It t
- currentValue
- version scheme used (e.g. semver, pep440)
The fields returned here can be customised to suit the package manager, e.g. Docker uses `currentFrom`
The fields returned here can be customised to suit the package manager, e.g. Dockerfile uses `lineNumber`. Custom fields should be added within a `managerData` object.
This function doesn't necessarily need to _understand_ the file or even syntax that it is passed, instead it just needs to understand enough to extract the list of dependencies.
As a general approach, we want to extract _all_ dependencies from each dependency file, even if they contain values we don't support. For any that have unsupported values that we cannot renovate, this `extractPackageFile` function should set a `skipReason` to a value that would be helpful to someone reading the logs.
Also, if a file is passed to `extractPackageFile` that is a "false match" (e.g. not an actual package file, or contains no dependencies) then this function can return `null` to have it ignored and removed from the list of package files. A common case for this is in Meteor, where its `package.js` file name is not unique and there many be many non-Meteor projects using that filename.
Also, if a file is passed to `extractPackageFile` which is a "false match" (e.g. not an actual package file, or contains no dependencies) then this function can return `null` to have it ignored and removed from the list of package files. A common case for this is in Meteor, where its `package.js` file name is not unique and there may be many non-Meteor projects using that filename.
##### `extractAllPackageFiles(packageFiles)` (async, optional)
......@@ -71,4 +71,4 @@ Set to true if this package manager needs to update lock files in addition to pa
##### `updateDependency(fileContent, upgrade)`
This function is the final one called for most managers. It's purpose is to patch the package file with the new value (described in the upgrade) and return an updated file. If the file was already updated then it would return the same contents as it was provided.
This function is the final one called for most managers. Its purpose is to patch the package file with the new value (described in the upgrade) and return an updated file. If the file was already updated then it would return the same contents as it was provided.