chore:修改repo
All checks were successful
oasis/resume/pipeline/head This commit looks good

This commit is contained in:
2026-03-09 08:30:46 +00:00
parent 6a70bfcd92
commit 0dda9aa020
2 changed files with 14 additions and 13 deletions

25
Jenkinsfile vendored
View File

@@ -1,3 +1,5 @@
def repo = 'nexus.ingress.lab.gitfitlive.com'
pipeline {
agent {
kubernetes {
@@ -10,7 +12,7 @@ metadata:
spec:
containers:
- name: docker-client
image: harbor.ingress.lab.gitfitlive.com/mirror/docker:latest
image: ${repo}/docker-proxy/docker:latest
command: ['cat']
tty: true
env:
@@ -27,7 +29,7 @@ spec:
mountPath: /certs
readOnly: true
- name: docker-dind
image: harbor.ingress.lab.gitfitlive.com/mirror/docker:dind
image: ${repo}/docker-proxy/docker:dind
securityContext:
privileged: true
env:
@@ -44,8 +46,7 @@ spec:
}
environment {
HARBOR = 'harbor.ingress.lab.gitfitlive.com'
CONTAINER_NAME = 'harbor.ingress.lab.gitfitlive.com/oasis/resume:latest'
CONTAINER_NAME = "${repo}/docker-hosted/resume:latest"
}
stages {
@@ -66,13 +67,13 @@ spec:
withCredentials([
usernamePassword(
credentialsId: 'harbor-credentials',
usernameVariable: 'HARBOR_USERNAME',
passwordVariable: 'HARBOR_PASSWORD'
credentialsId: 'nexus-admin',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD'
)
]) {
sh """
echo "\$HARBOR_PASSWORD" | docker login -u "\$HARBOR_USERNAME" https://harbor.ingress.lab.gitfitlive.com --password-stdin
echo "\$PASSWORD" | docker login -u "\$USERNAME" https://${repo} --password-stdin
"""
}
@@ -95,13 +96,13 @@ spec:
steps {
withCredentials([
usernamePassword(
credentialsId: 'harbor-credentials',
usernameVariable: 'HARBOR_USERNAME',
passwordVariable: 'HARBOR_PASSWORD'
credentialsId: 'nexus-admin',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD'
)
]) {
sh """
docker login -u "\$HARBOR_USERNAME" -p "\$HARBOR_PASSWORD" https://harbor.ingress.lab.gitfitlive.com
docker login -u "\$USERNAME" -p "\$PASSWORD" https://${repo}
"""
}
echo "Pulling the docker image..."

View File

@@ -1,4 +1,4 @@
FROM harbor.ingress.lab.gitfitlive.com/mirror/nginx:alpine
FROM nexus.ingress.lab.gitfitlive.com/docker-proxy/nginx:alpine
RUN rm -rf /usr/share/nginx/html/*