[Jenkins] 멀티모듈 파이프 라인 (feat. Jenkinsfile)
·
Project
환경Gradle 7.0.1Java, SpringBootDocker (docker compose)Spring gatewaymulti module 개요하나의 프로젝트에 도메인별 모듈을 가지고 MSA 형태의 서비스를 제공하고 있는 상황에서 CI/CD를 구축해야 하는 상황이었다. 프로세스  Jenkins 설정 (GitLab / Jenkins 관련 기초 설정은 생략)위의 예시에서는 GitLab에서 webhook push event를 전달받기 위한 설정이다.(각 환경에 맞는 Build Triggers 설정을 해야한다)Jenkins Build Triggers를 통해 나온 Webhook용 URL을 넣고 Jenkins 설정 아래에 고급 버튼을 눌러 Secret token을 생성한다.생성된 토큰은 GitLab Webhoo..
[QueryDSL] build.gradle 설정으로 cannot find symbol 오류 해결하기
·
Project
build.gradle 설정 예시buildscript { ext { queryDslVersion = "5.0.0" }}plugins { id 'org.springframework.boot' version '2.6.0' id 'io.spring.dependency-management' version '1.0.11.RELEASE' //querydsl 추가 id "com.ewerk.gradle.plugins.querydsl" version "1.0.10" id 'java'}group = 'study'version = '0.0.1-SNAPSHOT'sourceCompatibility = '11'configurations { compileOnly { extendsFro..
[Docker/docker compose] docker compose를 이용한 database 설치
·
Project
이유와 목적MSA 기반 서비스를 효율적으로 관리하고자 할 경우회사의 리소스가 충분하지 않거나 많이 할당을 받지 못했을 경우환경의 영향을 받지 않고 모든 환경에서 동일한 경험을 제공하고 싶을 경우이미지 파일을 이용해서 운영상 버전 관리가 필요한 경우기타 수많은 다른 이유... 어플리케이션 배포 환경 및 용어 설치 환경 및 설정Ubuntu 20.04Docker 24.0.5 (설치 과정 생략)Docker compose 2.20.3## docker compose 설치 ### 필요한 디렉토리로 이동mkdir -p ~/.docker/cli-plugins/# 최신 버전 다운로드curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-com..
[Mybatis] resultMap collection을 이용한 중첩 데이터 출력하기
·
BackEnd
가끔 사용하게 되는 테크닉인데 항상 같은 삽질을 반복하는 것 같아 히스토리를 남긴다. ResponseDto.java@Data@JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class)public class WarrantyPackResponseDto { @Data @Builder @AllArgsConstructor @NoArgsConstructor @JsonNaming(value = PropertyNamingStrategies.SnakeCaseStrategy.class) public static class Detail { private Integer warrantyId; private ..
Jenkins gradlew permission denied error
·
BackEnd
해당 branch 를 intelliJ로 실행시킨 후, Terminal 에서 아래의 명령어로 권한을 부여한다. git update-index --add --chmod=+x gradlew sourcetree로 commit, push 하면 jenkins에서 정상 동작하는 것을 확인할 수 있다.
[SpringBoot + Gradle] JAR, Bitbucket, Jenkins 원격 배포 환경 구축
·
Project
기본 환경 프로젝트 서버 구성 완료(AWS instance 설정 및 Route53 도메인&호스팅 + JAVA 11) 젠킨스 서버 구성 완료(JAVA 11, Jenkins 설치 및 기본 설정 완료) Bitbucket Repository 구성 및 SourceTree 연동 완료 ㆍJenkins 접속 후 Jenkins 관리 > 플러그인 관리에서 해당 플러그인 설치 ㆍJenkins 관리 > Global Tool Configuration에서 본인 프로젝트에 맞는 항목의 버전 설정 ㆍ새로운 Item 에서 item name 입력 후 Freestyle project 선택 > OK ㆍssh-keygen -t rsa -b 4096 -m PEM 를명령어를 이용해 RSA 형태의 SSH Key를 생성한다. - id_rsa는 pr..
Lombok을 이용한 Bulider Pattern
·
BackEnd
public final class Hero { private final Profession profession; private final String name; private final HairType hairType; private final HairColor hairColor; private final Armor armor; private final Weapon weapon; private Hero(Builder builder) { this.profession = builder.profession; this.name = builder.name; this.hairColor = builder.hairColor; this.hairType = builder.hairType; this.weapon = buil..
Algorithm Study - 003
·
Algorithm/JAVA
Problem https://app.codility.com/programmers/lessons/6-sorting/distinct/ Write a function class Solution { public int solution(int[] A); } that, given an array A consisting of N integers, returns the number of distinct values in array A. For example, given array A consisting of six elements such that: A[0] = 2 A[1] = 1 A[2] = 1 A[3] = 2 A[4] = 3 A[5] = 1 the function should return 3, because the..