Remove Gitlab CI & Fix Dockerfile
This commit is contained in:
parent
46c5b39d6b
commit
8fda8a7309
2 changed files with 1 additions and 65 deletions
|
@ -1,65 +0,0 @@
|
||||||
stages:
|
|
||||||
- lint
|
|
||||||
#- test
|
|
||||||
- build
|
|
||||||
- deploy
|
|
||||||
|
|
||||||
variables:
|
|
||||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
|
|
||||||
IMAGE_LATEST: $CI_REGISTRY_IMAGE:develop
|
|
||||||
|
|
||||||
|
|
||||||
.node:
|
|
||||||
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/node:latest
|
|
||||||
|
|
||||||
|
|
||||||
.docker:
|
|
||||||
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/docker:20
|
|
||||||
rules:
|
|
||||||
- if: $CI_COMMIT_TAG && $CI_COMMIT_TAG !~ /(^t)+.*/
|
|
||||||
variables:
|
|
||||||
IMAGE_LATEST: $CI_REGISTRY_IMAGE:latest
|
|
||||||
- if: $CI_COMMIT_TAG
|
|
||||||
|
|
||||||
|
|
||||||
linter:
|
|
||||||
image: !reference [.node, image]
|
|
||||||
stage: lint
|
|
||||||
before_script:
|
|
||||||
- yarn install
|
|
||||||
script:
|
|
||||||
- yarn lint
|
|
||||||
|
|
||||||
|
|
||||||
build:
|
|
||||||
image: !reference [.docker, image]
|
|
||||||
stage: build
|
|
||||||
before_script:
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
script:
|
|
||||||
- docker build -t $IMAGE_TAG .
|
|
||||||
after_script:
|
|
||||||
- docker save $IMAGE_TAG > docker.tar
|
|
||||||
artifacts:
|
|
||||||
expire_in: 30 mins
|
|
||||||
paths:
|
|
||||||
- docker.tar
|
|
||||||
rules:
|
|
||||||
- !reference [.docker, rules]
|
|
||||||
|
|
||||||
|
|
||||||
push:
|
|
||||||
image: !reference [.docker, image]
|
|
||||||
stage: deploy
|
|
||||||
needs:
|
|
||||||
- job: build
|
|
||||||
artifacts: true
|
|
||||||
before_script:
|
|
||||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
|
||||||
- docker load -i docker.tar
|
|
||||||
script:
|
|
||||||
- docker tag $IMAGE_TAG $IMAGE_LATEST
|
|
||||||
- docker push $IMAGE_TAG
|
|
||||||
- docker push $IMAGE_LATEST
|
|
||||||
rules:
|
|
||||||
- !reference [.docker, rules]
|
|
|
@ -7,6 +7,7 @@ WORKDIR /app
|
||||||
|
|
||||||
# Copy the files needed to install deps
|
# Copy the files needed to install deps
|
||||||
COPY package.json yarn.lock ./
|
COPY package.json yarn.lock ./
|
||||||
|
RUN yarn add sharp
|
||||||
RUN yarn install --frozen-lockfile
|
RUN yarn install --frozen-lockfile
|
||||||
|
|
||||||
## BUILD STEP
|
## BUILD STEP
|
||||||
|
|
Reference in a new issue