Jenkins, SCM, Nexus 및 Android-Gradle의 지속적인 개선에서 시작합니다. Gradle에서 Nexus 저장소에 AAR 파일을 업로드하는 작업이 있으며 내 컴퓨터에서 실행하면 작동합니다. 이 작업은 '가를 설치'하고 Gradle을 코드는 다음과 같습니다 :Gradle and Jenkins (Nexus)의 Nexus 사용자
// upload to our nexus repository
uploadArchives {
repositories {
// the maven plugin features this deployer
mavenDeployer {
// we deploy to the release repository in this case
repository(url: "https://nexus1.xxxxx.com/nexus/content/repositories/releases") {
authentication(userName: getRepositoryUsername(), password: getRepositoryPassword())
}
// pom project information
pom.project {
version android.defaultConfig.versionName
artifactId 't21-android-commons-utils'
name 'T21 Android Commons Utils Lib'
packaging 'aar'
}
}
}
}
task install(dependsOn: uploadArchives)
인증 기능이 getRepositoryUsername을 (호출) 및 getRepositoryPassword()이 gradle.properties에서 자격 증명을 읽을 수 있습니다. 하지만 SCM에이 파일을 공개하고 싶지는 않습니다. 안전하지 않아야합니다.
코드를 SCM에 푸시하면 Jenkins가이를 인식하고 '설치'을 포함하여 일부 작업을 수행하는 작업을 실행합니다. 올바르게 작동하지만 설치은 (예상대로) gradle.properties을 찾을 수 없으므로 Nexus 서버에 인증 할 수 없습니다.
젠킨스의 ' 설치'에서 인증을 어떻게해야하는지 알고 싶습니다.
Nexus에서 권한을 가진 일반 Jenkins-User를 만들려고하고 있지만 gradle 및 Jenkins를 어떻게 호출 할 수 있는지 알지 못합니다.
나는 설명하기를 희망한다. 내 불쌍한 영어에 대한 죄송합니다 ...
일단 권리가 있으면 만족스러운 답변을 수락해야합니다. –