Skip to content
Snippets Groups Projects
Commit a6b0c162 authored by Alexandro Setiawan's avatar Alexandro Setiawan
Browse files

add cicd

parent ffc693d6
No related branches found
No related tags found
No related merge requests found
Pipeline #456 passed with warnings with stage
in 6 minutes and 12 seconds
image: registry.goldplate.org/alexandro/docker-buildx:0.9.1
variables:
DOCKER_DRIVER: overlay2
IMAGE_VERSION: latest
services:
- docker:20.10.21-dind
stages:
- build
BUILD_ON_AMD:
variables:
BUILD_PLATFORM: linux/amd64
tags:
- runner-amd
stage: build
when: manual
script:
- echo $CI_REGISTRY_IMAGE:$IMAGE_VERSION
- docker buildx inspect --bootstrap
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- docker buildx create --use
- docker buildx build --platform $BUILD_PLATFORM --push -t $CI_REGISTRY_IMAGE:$IMAGE_VERSION .
BUILD_ON_ARM:
variables:
BUILD_PLATFORM: linux/arm64
tags:
- runner-arm
stage: build
when: manual
script:
- echo $CI_REGISTRY_IMAGE:$IMAGE_VERSION
- docker buildx inspect --bootstrap
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
- docker buildx create --use
- docker buildx build --platform $BUILD_PLATFORM --push -t $CI_REGISTRY_IMAGE:$IMAGE_VERSION .
FROM node:16-alpine
WORKDIR /app
RUN apk add --update python3 make g++\
&& rm -rf /var/cache/apk/*
COPY package.json yarn.lock tsconfig.json ./
RUN yarn install
COPY . .
RUN yarn run build
CMD ["node", "dist/index.js"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment