You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
logger.lifecycle("Nmcp: deployment is published.")
90
73
} else {
91
74
logger.lifecycle("Nmcp: deployment is publishing... Check the central portal UI to verify its status.")
@@ -94,104 +77,9 @@ internal fun nmcpPublishWithPublisherApi(
94
77
check(publishingTimeoutSeconds ==null) {
95
78
"Nmcp: 'publishingTimeout' has no effect if 'publishingType' is USER_MANAGED. Either set 'publishingType = AUTOMATIC' or remove 'publishingTimeout'"
96
79
}
97
-
logger.lifecycle("Nmcp: deployment has passed validation, publish it manually from the Central Portal UI.")
80
+
logger.lifecycle("Nmcp: deployment has passed validation, publish it manually from the Central Portal UI or call './gradlew nmcpPublishDeployment -PnmcpDeploymentId=$deploymentId'.")
98
81
}
99
82
} else {
100
83
logger.lifecycle("Nmcp: deployment is validating... Check the central portal UI to verify its status.")
101
84
}
102
85
}
103
-
104
-
privatefunwaitFor(
105
-
target:Set<Status>,
106
-
timeout:Duration,
107
-
logger:GLogger,
108
-
deploymentId:String,
109
-
baseUrl:String,
110
-
token:String,
111
-
) {
112
-
val pollingInterval =5.seconds
113
-
val mark = markNow()
114
-
while (true) {
115
-
check(mark.elapsedNow() < timeout) {
116
-
"Nmcp: timeout while checking deployment '$deploymentId'. You might need to check the deployment status on the Central Portal UI (see $baseUrl), or you could increase the timeout."
117
-
}
118
-
119
-
val status = verifyStatus(
120
-
logger = logger,
121
-
deploymentId = deploymentId,
122
-
baseUrl = baseUrl,
123
-
token = token,
124
-
)
125
-
if (status isFAILED) {
126
-
error("Nmcp: deployment has failed:\n${status.error}")
127
-
} elseif (status in target) {
128
-
return
129
-
} else {
130
-
logger.lifecycle("Nmcp: deployment status is '$status', will try again in ${pollingInterval.inWholeSeconds}s (${(timeout - mark.elapsedNow()).inWholeSeconds.seconds} left)...")
131
-
// Wait for the next attempt to reduce the load on the Central Portal API
132
-
Thread.sleep(pollingInterval.inWholeMilliseconds)
133
-
continue
134
-
}
135
-
}
136
-
}
137
-
138
-
privatesealedinterfaceStatus
139
-
140
-
// A deployment is uploaded and waiting for processing by the validation service
141
-
privatedata objectPENDING : Status
142
-
143
-
// A deployment is being processed by the validation service
144
-
privatedata objectVALIDATING : Status
145
-
146
-
// A deployment has passed validation and is waiting on a user to manually publish via the Central Portal UI
147
-
privatedata objectVALIDATED : Status
148
-
149
-
// A deployment has been either automatically or manually published and is being uploaded to Maven Central
150
-
privatedata objectPUBLISHING : Status
151
-
152
-
// A deployment has successfully been uploaded to Maven Central
"Nmcp: timeout while checking deployment '$deploymentId'. You might need to check the deployment status on the Central Portal UI (see $baseUrl), or you could increase the timeout."
32
+
}
33
+
34
+
val status = verifyStatus(
35
+
logger = logger,
36
+
deploymentId = deploymentId,
37
+
baseUrl = baseUrl,
38
+
token = token,
39
+
)
40
+
if (status isFAILED) {
41
+
error("Nmcp: deployment has failed:\n${status.error}")
42
+
} elseif (status in target) {
43
+
return
44
+
} else {
45
+
logger.lifecycle("Nmcp: deployment status is '$status', will try again in ${pollingInterval.inWholeSeconds}s (${(timeout - mark.elapsedNow()).inWholeSeconds.seconds} left)...")
46
+
// Wait for the next attempt to reduce the load on the Central Portal API
47
+
Thread.sleep(pollingInterval.inWholeMilliseconds)
48
+
continue
49
+
}
50
+
}
51
+
}
52
+
53
+
internalsealedinterfaceStatus
54
+
55
+
// A deployment is uploaded and waiting for processing by the validation service
56
+
internaldata objectPENDING : Status
57
+
58
+
// A deployment is being processed by the validation service
59
+
internaldata objectVALIDATING : Status
60
+
61
+
// A deployment has passed validation and is waiting on a user to manually publish via the Central Portal UI
62
+
internaldata objectVALIDATED : Status
63
+
64
+
// A deployment has been either automatically or manually published and is being uploaded to Maven Central
65
+
internaldata objectPUBLISHING : Status
66
+
67
+
// A deployment has successfully been uploaded to Maven Central
0 commit comments