์ ์์ ๋ถํ๋ ์์ํฌ์ ์๋ฒ์ฉ ๊ฐ๋ฐํ๊ฒฝ์ ๋ค์ด ์๋ Nexus๋ฅผ ์ค์น ๋ฐ ์ฐ๋ ๊ณผ์ ์ ๊ธฐ๋กํ๋ค.
[DevOps] CentOS 8 Jenkins CI, CD ํ๊ฒฝ ๊ตฌ์ถ(feat. eGovCI)
๋ชฉ์ฐจ์ด๋ฒ์ ์ ์์ ๋ถํ๋ ์์ํฌ์ ์๋ฒ์ฉ ๊ฐ๋ฐํ๊ฒฝ์ ์ด์ฉํด์ CI, CD๋ฅผ ๊ตฌ์ถํ๋ค.๋ค์์ ์ ๋ฒ์ ์ค์นํ GitLab๊ณผ ์๋ก ์ค์นํ Jenkins๋ก ์ฒ์๋ถํฐ ์ฐ๋ํ๋ ๊ฒ๋ ํฌ์คํ ์์ ์ด๋ค. [DevOps] CentOS 8 Jen
yaga.tistory.com
Nexus ์คํ ๋ฐ ์ค์
eGovCI-4.2.0์ ๊ธฐ์ค์ผ๋ก ์์ฑ๋์๋ค.
ํด๋น ๋ฒ์ ์ Nexus OSS ๋ฒ์ ์ 2.15.1์ด๋ผ jdk 1.8์ด ํ์๋ค.
ํด์ nexus ์คํ ์์๋ ๋ฐ๋ก jdk 1.8๋ก ๋๋ ค์ผ ํ๋ค.
jdk 1.8 ๋ฆฌ๋ ์ค์ฉ์ ํด๋น ๊ฒฝ๋ก์ ์ ๋ก๋ ํ ์ค์ ํ์ผ์์ ์ค์ ํ๋ค.
vi ~/eGovCI-4.2.0/bin/nexus-2.15.1-02-bundle/nexus-2.15.1-02/bin/jsw/conf/wrapper.conf
Nexus์ ํฌํธ๊ฐ WAS์ ํฌํธ์ ์ค๋ณต๋์ง ์๋๋ก ํฌํธ๋ ๋ณ๊ฒฝํ๋ค.
vi ~/eGovCI-4.2.0/bin/nexus-2.15.1-02-bundle/nexus-2.15.1-02/conf/nexus.properties
Nexus๋ฅผ ๋ฐฑ๊ทธ๋ผ์ด๋๋ก ์คํํ๊ธฐ ์ํด ์์ ์ ์คํฌ๋ฆฝํธ๋ฅผ ์ด์ง ์์ ํ๋ค.
vi ~/eGovCI-4.2.0/start-nexus.sh
eGovCI-4.2.0์ start-nexus.sh๋ฅผ ์คํํ๋ค.
์ด ๋ nexus์ ์ฐ๋๋ jdk ๋ฒ์ ์ด 1.8์ด ์๋ ๊ฒฝ์ฐ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค.
๋ธ๋ผ์ฐ์ ์์ ์๋ฒ์์ดํผ:8082/nexus๋ก url ํธ์ถ ์ ํ๋ฉด์ด ํ์๋๋์ง ํ์ธ ํ admin/admin123์ผ๋ก ๋ก๊ทธ์ธ ํ ๋น๋ฐ๋ฒํธ๋ฅผ ๋ณ๊ฒฝํ๋ค.
Views/Repositories๋ฅผ ์ ํํ๋ค.
3rd party > ์๋ ๋ฉ๋ด์์ Artifact Upload > GAV Parameters๋ฅผ ์ ํ ํ Group, Artifact, Version์ ๋ ฅ ํ Packaging์ jar๋ก ์ ํํ๋ค
Select Artifact(s) for Upload์์ญ > Select Artifact(s) to Upload ์ ํ ํ ์ ๋ก๋ ํ jarํ์ผ์ ์ ํ ํ Upload Artifact(s)๋ก ์ ๋ก๋ ํ๋ค.
ํ์ด์ง ์๋ก๊ณ ์นจ ๋๋ Repository ์ฐํด๋ฆญ > Update Index ์ ํ ํ jarํ์ผ์ด ์ ์ฅ๋์๋์ง ํ์ธํ๋ค.
์๋ฒ์์๋ ํด๋น repository์ ์ ๋ก๋ ๋ jarํ์ผ์ ํ์ธํ ์ ์๋ค.
Nexus Repository ํ๋ก์ ํธ์ ์ ์ฉ
Nexus ์ ์ฅ์๋ฅผ ํ๋ก์ ํธ์ ์ ์ฉํ๊ธฐ ์ํด pom.xml์ <repositories>๋ถ๋ถ์ ์๋์ฒ๋ผ ์์ ํ๋ค.
Jenkins ๋น๋ ์ ๋ค์๊ณผ ๊ฐ์ ์๋ฌ ๋ฐ์ ์ ์๋์ฒ๋ผ ์กฐ์นํ๋ค.
maven์์ ๋ณด์์ ์ธ๋ถ http ํต์ ์ด ์๋๊ฒ๋ ์ ์ฑ ์ด ๋ณ๊ฒฝ๋์๊ธฐ์ Nexus ์ ์ฅ์์ http๋ฅผ ๋ฌด๋ ฅํ ํ๊ธฐ ์ํด ์ค์ ํ์ผ์ ๋ฏธ๋ฌ๋ด์ฉ์ ์์ ํ ์ฌ๊ธฐ๋ํ๋ค.
vi ~/eGovCI-4.2.0/bin/apache-maven-3.9.6/conf/settings.xml
maven ์ฌ๊ธฐ๋ ํ Jenkins ์ฌ๋น๋ ์ Nexus ์ ์ฅ์์์ jarํ์ผ์ด ๋ค์ด๋ก๋ ๋จ์ ํ์ธํ๋ค.
๋ก์ปฌ์์ ๋น๋ ์ ๋น์ทํ ์๋ฌ ๋ฐ์ ํ ๊ฒฝ์ฐ local repository์ settings.xml ์์ฑ ํ ์ฌ์๋ํ๋ค.
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>maven-default-http-blocker</id>
<mirrorOf>external:dont-match-anything-mate:*</mirrorOf>
<name>Pseudo repository to mirror external repositories initially using HTTP.</name>
<url>http://0.0.0.0/</url>
</mirror>
</mirrors>
</settings>
๊ฐ์ธ ์คํฐ๋ ๊ธฐ๋ก์ ๋ฉ๋ชจํ๋ ๊ณต๊ฐ์ด๋ผ ํ๋ฆฐ์ ์ด ์์ ์ ์์ต๋๋ค.
ํ๋ฆฐ ์ ์์ ๊ฒฝ์ฐ ๋๊ธ ๋ถํ๋๋ฆฝ๋๋ค.
[DevOps] CentOS 8 Jenkins CI, CD ํ๊ฒฝ ๊ตฌ์ถ(feat. eGovCI)
๋ชฉ์ฐจ์ด๋ฒ์ ์ ์์ ๋ถํ๋ ์์ํฌ์ ์๋ฒ์ฉ ๊ฐ๋ฐํ๊ฒฝ์ ์ด์ฉํด์ CI, CD๋ฅผ ๊ตฌ์ถํ๋ค.๋ค์์ ์ ๋ฒ์ ์ค์นํ GitLab๊ณผ ์๋ก ์ค์นํ Jenkins๋ก ์ฒ์๋ถํฐ ์ฐ๋ํ๋ ๊ฒ๋ ํฌ์คํ ์์ ์ด๋ค. [DevOps] CentOS 8 Jen
yaga.tistory.com
[DevOps] CentOS 8 GitLab ์ค์น
๋ชฉ์ฐจGitLab ์ค์น๊ณผ์ #GitLab์ CentOS์ฉ RPM ์ ์ฅ์ ์ค์นํ๊ธฐ ์ํ ์คํฌ๋ฆฝํธ ๋ค์ด๋ก๋ ๋ฐ ์คํcurl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.rpm.sh | sudo bash#gitlab ์ปค๋ฎค๋ํฐ๋ฒ์ ์ค์นsudo yum
yaga.tistory.com
[DevOps] CentOS7 ์ค์น๋ถํฐ jdk, mysql, tomcat ์ฐ๋๊น์ง ๊ณผ์
๋ชฉ์ฐจCentOS7 ์ค์น๋ถํฐ jdk, mysql, tomcat ์ค์น ๋ฐ ๊ฐ๋จํ ์ฐ๋๊ณผ์ ์ ๊ฐ๋ตํ ํฌ์คํ ํ๋ค.CentOS ๋ฏธ๋ฌ ์ฌ์ดํธ์์ isovํ์ผ ๋ค์ด๋ก๋ํ๋ค.(์ฌ๊ธฐ์ GUIํ๊ฒฝ์ผ๋ก ์ค์นํ๊ธฐ ์ํด DVD ์ ํ)CentOS7 ์ค์น๋ฆฌ๋ ์ค ๋ถ
yaga.tistory.com
'IT > DevOps' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[git] git revert (40) | 2024.06.06 |
---|---|
[git] git reset(feat. soft, mixed, hard) (36) | 2024.06.06 |
[DevOps] CentOS 8 Jenkins CI, CD ํ๊ฒฝ ๊ตฌ์ถ(feat. eGovCI) (61) | 2024.05.03 |
[DevOps] CentOS 8 GitLab ์ค์น (35) | 2024.05.01 |
[DevOps] CentOS 8 JenKins ์ค์น(feat. CI, CD) (37) | 2024.05.01 |
๋๊ธ