Skip to content

Commit

Permalink
fix package deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed Nov 19, 2022
1 parent 510ab8f commit af9e187
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 4 deletions.
17 changes: 14 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ configure(publishProjects) {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Ahoo-Wang/CoSec")
credentials {
username = project.findProperty("gitHubPackagesUserName") as? String
password = project.findProperty("gitHubPackagesToken") as? String?
username = System.getenv("GITHUB_ACTOR")
password = System.getenv("GITHUB_TOKEN")
}
}
}
Expand Down Expand Up @@ -209,6 +209,14 @@ configure(publishProjects) {
}
}
configure<SigningExtension> {
val isInCI = null != System.getenv("CI");
if (isInCI) {
val signingKeyId = System.getenv("SIGNING_KEYID")
val signingKey = System.getenv("SIGNING_SECRETKEY")
val signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
}

if (isBom) {
sign(extensions.getByType(PublishingExtension::class).publications.get("mavenBom"))
} else {
Expand All @@ -219,7 +227,10 @@ configure(publishProjects) {

nexusPublishing {
repositories {
sonatype()
sonatype {
username.set(System.getenv("MAVEN_USERNAME"))
password.set(System.getenv("MAVEN_PASSWORD"))
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# limitations under the License.
#
group=me.ahoo.cosec
version=0.8.0
version=0.8.2
description=RBAC-based And Policy-based Multi-Tenant Security Framework
website=https://github.com/Ahoo-Wang/CoSec
issues=https://github.com/Ahoo-Wang/CoSec/issues
Expand Down
76 changes: 76 additions & 0 deletions k8s/deployment/cosec-gateway.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: cosec-gateway
labels:
app: cosec-gateway
spec:
replicas: 1

selector:
matchLabels:
app: cosec-gateway
template:
metadata:
labels:
app: cosec-gateway
spec:
containers:
- env:
- name: SPRING_REDIS_HOST
value: redis-uri:6379
- name: SPRING_REDIS_PASSWORD
value: redis-pwd
- name: SPRING_CLOUD_COSKY_NAMESPACE
value: '{dev}'
- name: TZ
value: Asia/Shanghai
image: ahoowang/cosec-gateway:lastVersion
livenessProbe:
httpGet:
port: 8080
path: /actuator/health
readinessProbe:
httpGet:
port: 8080
path: /actuator/health
startupProbe:
httpGet:
port: 8080
path: /actuator/health
name: cosec-gateway
ports:
- containerPort: 8080
protocol: TCP
resources:
limits:
cpu: "1"
memory: 2048Mi
requests:
cpu: 250m
memory: 1024Mi
volumeMounts:
- mountPath: /etc/localtime
name: volume-localtime
volumes:
- hostPath:
path: /etc/localtime
type: ""
name: volume-localtime

---
apiVersion: v1
kind: Service
metadata:
name: cosec-gateway
labels:
app: cosec-gateway
spec:
selector:
app: cosec-gateway
ports:
- name: rest
port: 80
protocol: TCP
targetPort: 8080

0 comments on commit af9e187

Please sign in to comment.