mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
simplify image push
This commit is contained in:
parent
0cda452c41
commit
aadcc62dde
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
@ -140,8 +140,7 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
if (env.CHANGE_ID == null) {
|
if (env.CHANGE_ID == null) {
|
||||||
withDockerRegistry([ credentialsId: "57e4a8b2-ccf9-4da1-a787-76dd1aac8fd1", url: "https://${REG}" ]) {
|
withDockerRegistry([ credentialsId: "57e4a8b2-ccf9-4da1-a787-76dd1aac8fd1", url: "https://${REG}" ]) {
|
||||||
sh "make images PUSH=1"
|
sh "make push"
|
||||||
sh "make demos PUSH=1"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
Makefile
14
Makefile
@ -49,25 +49,23 @@ export TAG
|
|||||||
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
|
images = $(shell ls build/docker/*.Dockerfile | sed 's/.*\/\(.\+\)\.Dockerfile/\1/')
|
||||||
|
|
||||||
$(images):
|
$(images):
|
||||||
ifndef PUSH
|
|
||||||
@build/docker/build-image.sh $(REG)$@ $(BUILDER)
|
@build/docker/build-image.sh $(REG)$@ $(BUILDER)
|
||||||
else
|
|
||||||
@docker push $(REG)$@
|
|
||||||
endif
|
|
||||||
|
|
||||||
images: $(images)
|
images: $(images)
|
||||||
|
|
||||||
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
|
demos = $(shell cd demo/ && ls -d */ | sed 's/\(.\+\)\//\1/g')
|
||||||
|
|
||||||
$(demos):
|
$(demos):
|
||||||
ifndef PUSH
|
|
||||||
@cd demo/ && ./build-image.sh $(REG)$@ $(BUILDER)
|
@cd demo/ && ./build-image.sh $(REG)$@ $(BUILDER)
|
||||||
else
|
|
||||||
@docker push ${REG}$@
|
|
||||||
endif
|
|
||||||
|
|
||||||
demos: $(demos)
|
demos: $(demos)
|
||||||
|
|
||||||
|
image_tags = $(patsubst %,$(REG)%,$(images) $(demos))
|
||||||
|
$(image_tags):
|
||||||
|
@docker push $@
|
||||||
|
|
||||||
|
push: $(image_tags)
|
||||||
|
|
||||||
lock-images:
|
lock-images:
|
||||||
@scripts/update-clear-linux-base.sh clearlinux/golang:latest $(shell ls build/docker/*.Dockerfile)
|
@scripts/update-clear-linux-base.sh clearlinux/golang:latest $(shell ls build/docker/*.Dockerfile)
|
||||||
@scripts/update-clear-linux-base.sh clearlinux:latest $(shell find demo -name Dockerfile)
|
@scripts/update-clear-linux-base.sh clearlinux:latest $(shell find demo -name Dockerfile)
|
||||||
|
Loading…
Reference in New Issue
Block a user