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 531 additions and 362 deletions
version: 2.1
commands:
test:
steps:
- checkout
- run:
name: Initial Setup
command: |
python --version
python3 --version
curl https://bootstrap.pypa.io/get-pip.py | python
pip --version
git config --global user.email "bot@renovateapp.com"
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: |
yarn install --frozen-lockfile
pip install --user -r requirements.txt
- save_cache:
key: dependency-cache-v2-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- ./node_modules
- '.cache'
- '.eslintcache'
- run:
name: Lint
command: |
yarn eslint --format junit -o test-results/lint/results.xml
yarn prettier
yarn test-schema
yarn type-check
- run:
name: Build
command: |
yarn build
- run:
name: Unit Tests
command: |
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
command: |
yarn test-e2e
- run:
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.18.1@sha256:c46b41071ce455e47f205bf83b7ad6593ad22194639df1298a735f407ded1df6
steps:
- test
release:
docker:
- 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
- run: curl -X POST -d '{}' $NETLIFY_DEPLOY_WEBHOOK
workflows:
version: 2
test_and_release:
jobs:
- test_node_10
- release:
requires:
- test_node_10
filters:
branches:
only:
- master
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0.119.0-12@sha256:b46a520a09888b34fce28aa75e58a537a82cc6b086170d279e7ecd1d0a8b4262
# see https://mcr.microsoft.com/v2/vscode/devcontainers/typescript-node/tags/list for tags
# Add missing renovate dev tools
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get -y install --no-install-recommends --no-upgrade build-essential \
&& rm -rf /var/lib/apt/lists/*
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.106.0/containers/typescript-node-12
{
"name": "Node.js 12 & TypeScript",
"dockerFile": "Dockerfile",
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"orta.vscode-jest"
],
"postCreateCommand": "yarn install"
}
*
!package.json
!yarn.lock
!hooks
!lib
!bin/yarn*
!bin/config-validator.js
!tsconfig*.json
!data
test/**/**/_fixtures
lib/types/**/*.d.ts
**/__mocks__/**/*.ts
# don't ever lint node_modules
node_modules
# don't lint build output (make sure it's set to your correct build folder name)
dist
# don't lint nyc coverage output
coverage
# don't lint test stuff
**/__fixtures__/**
**/__mocks__/**
**/*.d.ts
/config.js
# generated code
**/*.generated.ts
/tools/dist
/patches
module.exports = {
root: true,
env: {
node: true,
jest: true,
},
extends: [
'plugin:promise/recommended',
'plugin:@typescript-eslint/recommended',
'airbnb-typescript/base',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:jest/recommended',
'plugin:jest/style',
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin/src/configs
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:promise/recommended',
'prettier',
'prettier/@typescript-eslint',
],
parserOptions: {
ecmaVersion: 9,
project: './tsconfig.json',
tsconfigRootDir: __dirname,
project: ['./tsconfig.lint.json'],
extraFileExtensions: ['.mjs'],
},
rules: {
'import/no-unresolved': 0, // done by typescript
/*
* checks done by typescript.
*
* https://github.com/typescript-eslint/typescript-eslint/blob/master/docs/getting-started/linting/FAQ.md#eslint-plugin-import
*/
'import/default': 0,
'import/named': 0,
'import/namespace': 0,
'import/no-named-as-default-member': 0,
// other rules
'import/prefer-default-export': 0, // no benefit
'require-await': 'error',
'no-use-before-define': 0,
'no-restricted-syntax': 0,
'no-await-in-loop': 0,
'prefer-destructuring': 'off',
'prefer-template': 'off',
'prefer-destructuring': 0,
'prefer-template': 0,
'no-underscore-dangle': 0,
'@typescript-eslint/explicit-function-return-type': 'error',
'sort-imports': [
'error',
{
ignoreCase: false,
ignoreDeclarationSort: true, // conflicts with our other import ordering rules
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
},
],
'import/order': [
'error',
{
alphabetize: {
order: 'asc',
},
},
],
// Makes no sense to allow type inferrence for expression parameters, but require typing the response
'@typescript-eslint/explicit-function-return-type': [
'error',
{ allowExpressions: true, allowTypedFunctionExpressions: true },
],
// TODO: fix lint
'@typescript-eslint/camelcase': 'off', // disabled until ??
'@typescript-eslint/camelcase': 0, // disabled until ??
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-floating-promises': 2,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unused-vars': [
'error',
2,
{
vars: 'all',
args: 'none',
ignoreRestSiblings: false,
},
], // disable until proper interfaced api
curly: [2, 'all'],
},
settings: {
// https://github.com/benmosher/eslint-plugin-import/issues/1618
'import/internal-regex': '^type\\-fest$',
},
overrides: [
{
files: ['*.js'],
files: ['**/*.spec.ts'],
env: {
jest: true,
},
rules: {
'prefer-destructuring': 0,
'prefer-promise-reject-errors': 0,
'import/no-dynamic-require': 0,
'global-require': 0,
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/no-use-before-define': 0,
'@typescript-eslint/explicit-member-accessibility': 0,
'@typescript-eslint/no-object-literal-type-assertion': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/unbound-method': 0,
},
},
{
files: ['**/*.mjs'],
rules: {
'@typescript-eslint/explicit-function-return-type': 0,
},
},
......
* text=auto eol=lf
*.bat text eol=crlf
version: 1
push:
branches:
- '!master'
pull_request:
......@@ -25,9 +25,9 @@ Pull Requests can only be merged once all status checks are green, which means `
## Slack collaboration with maintainers
We won't lie - sometimes the codebase can be a challenge to navigate. We don't want you spending an hour trying to work out something that might take us a minute to explain.
Sometimes the codebase can be a challenge to navigate, especially for a first-time contributor. We don't want you spending an hour trying to work out something that would take us only a minute to explain.
For that reason, we host a Slack channel dedicated to helping anyone who's working on PRs for Renovate. It's strictly developers-only and not intended for general support, so please email support@renovatebot.com to ask to be added.
For that reason, we have a Slack channel dedicated to helping anyone who's working on Pull Requests for Renovate. Please email rhys@renovatebot.com and simply mention that you need an invitation to the channel.
## Legal
......
name: build
on:
push:
branches:
- master
- 'renovate/**'
pull_request:
env:
YARN_MODULES_CACHE_KEY: v1
YARN_PACKAGE_CACHE_KEY: v1
YARN_CACHE_FOLDER: .cache/yarn
NODE_VERSION: 12
# https://github.com/chalk/supports-color/issues/106
FORCE_COLOR: true
jobs:
test:
runs-on: ${{ matrix.os }}
# tests shouldn't need more time
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12]
python-version: [3.8]
java-version: [8]
exclude:
- os: windows-latest
node-version: 10
env:
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.node-version == 12 }}
NODE_VERSION: ${{ matrix.node-version }}
PYTHON_VERSION: ${{ matrix.python-version }}
JAVA_VERSION: ${{ matrix.java-version }}
steps:
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v1
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Set up Java ${{ env.JAVA_VERSION }}
if: env.NODE_VERSION == '12'
uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- name: Skip Java tests
if: env.NODE_VERSION != '12'
run: echo "::set-env name=SKIP_JAVA_TESTS::true"
- name: Init platform
shell: bash
run: |
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'
npm config set scripts-prepend-node-path true
echo "Node $(node --version)"
python --version
echo "Yarn $(yarn --version)"
- uses: actions/checkout@v2
- name: Cache Yarn packages
id: yarn_cache_packages
uses: actions/cache@v1
with:
path: ${{ env.YARN_CACHE_FOLDER }}
key: ${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-
# Clear caches on cache miss, otherwise they will grow indefinitely
- name: Clear yarn cache
if: steps.yarn_cache_packages.outputs.cache-hit != 'true'
run: yarn cache clean
- name: Installing dependencies
run: yarn install --frozen-lockfile --link-duplicates
- name: Build
run: yarn build
- name: Unit tests
run: yarn jest --maxWorkers=2 --ci --coverage ${{ env.coverage }}
- name: Upload coverage
uses: actions/upload-artifact@v1
if: always() && env.coverage == 'true'
with:
name: coverage
path: coverage
- name: Codecov
shell: bash
if: always() && env.coverage == 'true'
continue-on-error: true
run: bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: E2E Test
run: yarn test-e2e
lint:
runs-on: ubuntu-latest
# lint shouldn't need more than 10 min
timeout-minutes: 15
steps:
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Init platform
run: |
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'
npm config set scripts-prepend-node-path true
echo "Node $(node --version)"
echo "Yarn $(yarn --version)"
- uses: actions/checkout@v2
- name: Cache Yarn packages
id: yarn_cache_packages
uses: actions/cache@v1
with:
path: ${{ env.YARN_CACHE_FOLDER }}
key: ${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-
# Clear caches on cache miss, otherwise they will grow indefinitely
- name: Clear yarn cache
if: steps.yarn_cache_packages.outputs.cache-hit != 'true'
run: yarn cache clean
- name: Installing dependencies
run: yarn install --frozen-lockfile --link-duplicates
- name: Lint
run: |
yarn eslint -f ./tmp/tools/eslint-gh-reporter.js
yarn prettier
- name: Test schema
run: yarn test-schema
- name: Type check
run: yarn type-check
release:
needs: [lint, test]
runs-on: ubuntu-latest
# release shouldn't need more than 5 min
timeout-minutes: 15
steps:
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Init platform
run: |
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'
yarn config set version-git-tag false
npm config set scripts-prepend-node-path true
# full checkout for semantic-release
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Yarn packages
uses: actions/cache@v1
with:
path: ${{ env.YARN_CACHE_FOLDER }}
key: ${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Installing dependencies
run: yarn install --frozen-lockfile --link-duplicates
- name: semantic-release
if: github.ref == 'refs/heads/master'
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
npx semantic-release --dry-run ${{github.ref != 'refs/heads/master'}} --ci ${{github.ref == 'refs/heads/master'}}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
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: release-npm
on:
repository_dispatch:
types: [renovate-release]
env:
YARN_MODULES_CACHE_KEY: v1
YARN_PACKAGE_CACHE_KEY: v1
YARN_CACHE_FOLDER: .cache/yarn
NODE_VERSION: 12
# https://github.com/chalk/supports-color/issues/106
FORCE_COLOR: true
jobs:
release-npm:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: Init platform
run: |
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'
yarn config set version-git-tag false
npm config set scripts-prepend-node-path true
- uses: actions/checkout@v2
with:
ref: ${{ github.event.client_payload.sha }}
- name: Cache Yarn packages
id: yarn_cache_packages
uses: actions/cache@v1
with:
path: ${{ env.YARN_CACHE_FOLDER }}
key: ${{ env.YARN_PACKAGE_CACHE_KEY }}-${{ runner.os }}-yarn_cache-${{ hashFiles('**/yarn.lock') }}
- name: Cache node_modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ env.YARN_MODULES_CACHE_KEY }}-${{ runner.os }}-${{ env.NODE_VERSION }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Installing dependencies
run: yarn install --frozen-lockfile --link-duplicates
- name: Build ${{ github.event.client_payload.version }}
run: yarn build
- name: Prepare ${{ github.event.client_payload.version }}
run: |
npm --no-git-tag-version version ${{ github.event.client_payload.version }}
- name: Publish ${{ github.event.client_payload.version }}
run: |
echo '//registry.npmjs.org/:_authToken=${NPM_TOKEN}' >> ~/.npmrc
npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
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
......@@ -14,3 +14,10 @@ renovate-0.0.0-semantic-release.tgz
.eslintcache
junit.xml
/test-results
renovate-schema.json
**/gradle-wrapper/__fixtures__/**/.gradle
# generated code
**/*.generated.ts
tools/dist
test/datasource/nuget/_fixtures/obj
queries:
- include: js/user-controlled-bypass
- include: js/request-forgery
- include: js/indirect-command-line-injection
- include: js/regex/missing-regexp-anchor
- include: js/node/unused-npm-dependency
- include: js/useless-assignment-to-global
- include: js/single-run-loop
- include: js/misspelled-identifier
- include: js/omitted-array-element
- include: js/unused-property
# It would be nice to remove this file and use .gitignore instead however we need to add package.json and _fixtures
# It would be nice to remove this file and use .gitignore instead however we need to add package.json and __fixtures__
/node_modules
/config.js
......@@ -9,5 +9,11 @@
.cache
/*.log
package.json
test/**/**/_fixtures
**/__fixtures__/
**/__mocks__/
bin/yarn*
# generated code
**/*.generated.ts
/tools/dist
/patches
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/exec",
{
"verifyConditionsCmd": "run-s verify",
"publishCmd": "run-s \"release -- {@}\" -- --release=${nextRelease.version} --sha=${nextRelease.gitHead}"
}
]
],
"analyzeCommits": {
"releaseRules": [
{
"type": "docs",
"scope": "readme.md",
"release": "patch"
},
{
"type": "build",
"release": "patch"
}
]
},
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "feature",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance Improvements"
},
{
"type": "revert",
"section": "Reverts"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "style",
"section": "Styles"
},
{
"type": "chore",
"section": "Miscellaneous Chores"
},
{
"type": "refactor",
"section": "Code Refactoring"
},
{
"type": "test",
"section": "Tests"
},
{
"type": "build",
"section": "Build System"
},
{
"type": "ci",
"section": "Continuous Integration"
}
]
},
"tagFormat": "${version}"
}
......@@ -13,6 +13,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"files.associations": {
"Dockerfile.*": "dockerfile"
}
"Dockerfile.*": "dockerfile",
".releaserc": "json"
},
"omnisharp.autoStart": false
}
# 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 []
......@@ -17,7 +17,6 @@
"sourceMaps": true,
"retainLines": true,
// https://github.com/facebook/jest/issues/5920
"env": {
"test": {
"plugins": ["dynamic-import-node"]
......