Compare commits

...
2 Commits
2 changed files with 8 additions and 6 deletions

No files matched your search

+5 -3
View File
@@ -1,6 +1,8 @@
FROM golang:1.27.3-alpine AS builder
FROM harbor.vitatech.com.cn:19443/vitavideo/base-golang:1.27.3-alpine AS builder
RUN apk add --no-cache git openssh-client
ENV GOPRIVATE=git.vitatech.com.cn
ARG GOPROXY=https://goproxy.cn,direct
ENV GOPROXY=${GOPROXY} \
GOPRIVATE=git.vitatech.com.cn
RUN git config --global url."ssh://git@git.vitatech.com.cn:12222/".insteadOf "https://git.vitatech.com.cn/" \
&& mkdir -p -m 0700 /root/.ssh
WORKDIR /src
@@ -11,7 +13,7 @@ RUN --mount=type=ssh,required=true \
COPY . .
RUN CGO_ENABLED=0 go build -mod=readonly -trimpath -o /out/api ./cmd/api
FROM alpine:3.23
FROM harbor.vitatech.com.cn:19443/vitavideo/base-alpine:3.23
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /out/api ./api
Vendored
+3 -3
View File
@@ -12,7 +12,7 @@ pipeline {
}
environment {
SERVICE = 'gin-api'
IMAGE_REPOSITORY = 'harbor.vitatech.com.cn:19443/backend/gin_layout-api'
IMAGE_REPOSITORY = 'harbor.vitatech.com.cn:19443/vitavideo/gin_layout-api'
DOCKERFILE = 'Dockerfile'
DEPLOY_ROOT = '/home/SHARE/devstack-scb/apps/layout-test'
}
@@ -29,7 +29,7 @@ pipeline {
branches: [[name: '*/' + env.SOURCE_BRANCH]],
userRemoteConfigs: [[
url: 'ssh://git@git.vitatech.com.cn:12222/leo/gin_layout.git',
credentialsId: 'gitea-layout-read'
credentialsId: 'gitea'
]],
extensions: [[$class: 'CleanBeforeCheckout']]
])
@@ -41,7 +41,7 @@ pipeline {
}
stage('Build and push') {
steps {
sshagent(credentials: ['gitea-layout-read']) {
sshagent(credentials: ['gitea']) {
withCredentials([
file(credentialsId: 'gitea-known-hosts', variable: 'GIT_KNOWN_HOSTS'),
usernamePassword(credentialsId: 'harbor-backend',