Browse Source

use vendoring

tags/0.0.3.1
Vladimir Smagin 5 months ago
parent
commit
9d5f3d8f39
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      Dockerfile
  2. +3
    -3
      Jenkinsfile

+ 2
- 2
Dockerfile View File

@@ -8,8 +8,8 @@ COPY . .

WORKDIR /app/operator/cmd/manager

RUN CGO_ENABLED=0 go build
RUN go install
RUN CGO_ENABLED=0 go build -mod=vendor
RUN go install -mod=vendor

FROM alpine:3.11



+ 3
- 3
Jenkinsfile View File

@@ -3,10 +3,9 @@ node {

def branch = env.BRANCH_NAME
def build = env.BUILD_NUMBER
def tag = "${branch}-${build}"
def image
def repository = "iam21h/mqtt-operator"
def image_name = "${repository}:${tag}"
def image_name = "${repository}"
def commit_hash = checkout(scm).GIT_COMMIT
def version

@@ -14,6 +13,7 @@ node {
try {
version = readFile file: "VERSION"
echo "Detected version: ${version}"
image_name = "${repository}:${version}"
} catch (Exception e) {
error("Failed to read version from file")
}
@@ -32,7 +32,7 @@ node {
try {

docker.withRegistry("${repository}", "dockerhub") {
image.push("${version}")
image.push()
}

} catch(Exception e) {


Loading…
Cancel
Save