Skip to content

Commit

Permalink
QUA-461: update eslint-1 base image (#559)
Browse files Browse the repository at this point in the history
* QUA-461: update base image

* QUA-461: add CircleCI config file

* QUA-461: delete old circle config file
  • Loading branch information
dantevvp authored Jan 20, 2022
1 parent 273c360 commit c3d9834
Showing 3 changed files with 57 additions and 40 deletions.
50 changes: 50 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: 2

jobs:
test:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-eslint
steps:
- checkout
- run: make image
- run: make citest

release_images:
machine:
docker_layer_caching: true
working_directory: ~/codeclimate/codeclimate-eslint
steps:
- checkout
- run:
name: Validate owner
command: |
if [ "$CIRCLE_PROJECT_USERNAME" -ne "codeclimate" ]
then
echo "Skipping release for non-codeclimate branches"
circleci step halt
fi
- run: make image
- run: echo "$GCR_JSON_KEY" | docker login -u _json_key --password-stdin us.gcr.io
- run:
name: Push image to GCR
command: |
docker tag $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \
us.gcr.io/code-climate/codeclimate-eslint:b$CIRCLE_BUILD_NUM
docker push us.gcr.io/code-climate/codeclimate-eslint:b$CIRCLE_BUILD_NUM
workflows:
version: 2
build_deploy:
jobs:
- test
- release_images:
requires:
- test
filters:
branches:
only: /master|channel\/[\w-]+/

notify:
webhooks:
- url: https://cc-slack-proxy.herokuapp.com/circle
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
FROM mhart/alpine-node:5.4
MAINTAINER Code Climate <hello@codeclimate.com>
FROM node:17.3-bullseye-slim
LABEL maintainer "Code Climate <hello@codeclimate.com>"

RUN adduser --uid 9000 --gecos "" --disabled-password app

WORKDIR /usr/src/app
COPY npm-shrinkwrap.json /usr/src/app/
COPY package.json /usr/src/app/

RUN apk --update add git && \
RUN apt-get update && \
apt-get install -y git && \
npm install && \
apk del --purge git
apt-get purge -y git

RUN adduser -u 9000 -D app
COPY . /usr/src/app
RUN chown -R app:app /usr/src/app

35 changes: 0 additions & 35 deletions circle.yml

This file was deleted.

0 comments on commit c3d9834

Please sign in to comment.