Skip to content

Commit

Permalink
config drone (#61)
Browse files Browse the repository at this point in the history
* config drone

* Remove unused 'templates' directory

* Update Node version in Dockerfile
  • Loading branch information
fcarrero authored Feb 2, 2024
1 parent 6468b59 commit 2d1b329
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 47 deletions.
49 changes: 49 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
kind: pipeline
type: kubernetes
name: default

trigger:
branch:
- main
event:
- pull_request


steps:
- name: build_image
image: plugins/ecr
privileged: true
settings:
dockerfile: Dockerfile
registry: 462204803675.dkr.ecr.us-east-1.amazonaws.com
debug: true
target: builder
tags:
- "${DRONE_BUILD_NUMBER}"
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY:
from_secret: AWS_SECRET_ACCESS_KEY
PLUGIN_SSH_AGENT_KEY:
from_secret: SSH_KEY
DOCKER_BUILDKIT: 1
ECR_CREATE_REPOSITORY: true
PLUGIN_REPO: ${DRONE_REPO}
- name: validate
image: 462204803675.dkr.ecr.us-east-1.amazonaws.com/${DRONE_REPO}:${DRONE_BUILD_NUMBER}
depends_on:
- build_image
commands:
- openapi-generator-cli validate -i api.yaml
- name: dummy generator
image: 462204803675.dkr.ecr.us-east-1.amazonaws.com/${DRONE_REPO}:${DRONE_BUILD_NUMBER}
depends_on:
- build_image
commands:
- openapi-generator-cli generate -i api.yaml -g openapi-yaml

image_pull_secrets:
- ECR_PULL_SECRET
- DOCKERCONFIG
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
FROM node:14 as builder
FROM node:16 as builder

# Install OpenJDK-11
RUN apt-get update && \
apt-get install -y openjdk-11-jre-headless && \
apt-get clean;

RUN npm install @openapitools/openapi-generator-cli -g
RUN openapi-generator-cli version-manager set 6.3.0
RUN openapi-generator-cli version-manager set 7.2.0
WORKDIR /app

COPY parameters/ parameters/
COPY requestBodies requestBodies/
COPY resources resources/
COPY schemas schemas/
COPY templates templates/
COPY Makefile Makefile
COPY api.yaml api.yaml
44 changes: 0 additions & 44 deletions Jenkinsfile

This file was deleted.

0 comments on commit 2d1b329

Please sign in to comment.