mirror of https://github.com/k3s-io/k3s
Standardized test image Makefile targets
parent
55d03fd102
commit
70e4693428
|
@ -1,8 +1,13 @@
|
||||||
all:
|
# This image does not tag
|
||||||
@echo "try 'make image' or 'make push'"
|
#TAG =
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
image:
|
image:
|
||||||
docker build -t gcr.io/google_containers/dnsutils .
|
docker build -t $(PREFIX)/dnsutils .
|
||||||
|
|
||||||
push:
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/dnsutils
|
gcloud docker push $(PREFIX)/dnsutils
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
all: push
|
|
||||||
|
|
||||||
TAG = 0.1
|
TAG = 0.1
|
||||||
|
PREFIX = kubernetes
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
ep: ep.go
|
ep: ep.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./ep.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./ep.go
|
||||||
|
|
||||||
image: ep
|
image: ep
|
||||||
sudo docker build -t kubernetes/eptest:$(TAG) .
|
sudo docker build -t $(PREFIX)/eptest:$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
sudo docker push kubernetes/eptest:$(TAG)
|
sudo docker push $(PREFIX)/eptest:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f ep
|
rm -f ep
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
all: push
|
|
||||||
|
|
||||||
TAG = 0.1
|
TAG = 0.1
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
goproxy: goproxy.go
|
goproxy: goproxy.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./goproxy.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./goproxy.go
|
||||||
|
|
||||||
image: goproxy
|
image: goproxy
|
||||||
docker build -t gcr.io/google_containers/goproxy:$(TAG) .
|
docker build -t $(PREFIX)/goproxy:$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/goproxy:$(TAG)
|
gcloud docker push $(PREFIX)/goproxy:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f goproxy
|
rm -f goproxy
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
all:
|
# This image does not tag
|
||||||
@echo "try 'make image' or 'make push'"
|
#TAG =
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
image:
|
image:
|
||||||
docker build -t gcr.io/google_containers/jessie-dnsutils .
|
docker build -t $(PREFIX)/jessie-dnsutils .
|
||||||
|
|
||||||
push:
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/jessie-dnsutils
|
gcloud docker push $(PREFIX)/jessie-dnsutils
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
|
TAG = 0.3
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.3
|
|
||||||
|
|
||||||
image:
|
image:
|
||||||
sudo docker build -t gcr.io/google_containers/mounttest-user:$(TAG) .
|
sudo docker build -t $(PREFIX)/mounttest-user:$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/mounttest-user:$(TAG)
|
gcloud docker push $(PREFIX)/mounttest-user:$(TAG)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
all: push
|
|
||||||
|
|
||||||
TAG = 0.5
|
TAG = 0.5
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
mt: mt.go
|
mt: mt.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./mt.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./mt.go
|
||||||
|
|
||||||
image: mt
|
image: mt
|
||||||
sudo docker build -t gcr.io/google_containers/mounttest:$(TAG) .
|
sudo docker build -t $(PREFIX)/mounttest:$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/mounttest:$(TAG)
|
gcloud docker push $(PREFIX)/mounttest:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f mt
|
rm -f mt
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
all: push
|
|
||||||
|
|
||||||
# Set this to the *next* version to prevent accidentally overwriting the existing image.
|
|
||||||
TAG = 1.6
|
TAG = 1.6
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
webserver: webserver.go
|
webserver: webserver.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./webserver.go
|
||||||
|
|
||||||
container: webserver
|
container: image
|
||||||
docker build -t gcr.io/google_containers/nettest:$(TAG) .
|
|
||||||
|
|
||||||
push: container
|
image: webserver
|
||||||
gcloud docker push gcr.io/google_containers/nettest:$(TAG)
|
docker build -t $(PREFIX)/nettest:$(TAG) .
|
||||||
|
|
||||||
|
push: image
|
||||||
|
gcloud docker push $(PREFIX)/nettest:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f webserver
|
rm -f webserver
|
||||||
|
|
|
@ -1,15 +1,16 @@
|
||||||
all: push
|
|
||||||
|
|
||||||
TAG = 1.0
|
TAG = 1.0
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: push
|
||||||
|
|
||||||
portforwardtester: portforwardtester.go
|
portforwardtester: portforwardtester.go
|
||||||
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./portforwardtester.go
|
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags '-w' ./portforwardtester.go
|
||||||
|
|
||||||
image: portforwardtester
|
image: portforwardtester
|
||||||
docker build -t gcr.io/google_containers/portforwardtester:$(TAG) .
|
docker build -t $(PREFIX)/portforwardtester:$(TAG) .
|
||||||
|
|
||||||
push: image
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/portforwardtester:$(TAG)
|
gcloud docker push $(PREFIX)/portforwardtester:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f portforwardtester
|
rm -f portforwardtester
|
||||||
|
|
|
@ -2,10 +2,12 @@
|
||||||
#
|
#
|
||||||
# `make porter` will build porter.
|
# `make porter` will build porter.
|
||||||
# `make tag` will suggest a tag.
|
# `make tag` will suggest a tag.
|
||||||
# `make container` will build a container-- you must supply a tag.
|
# `make image` will build an image-- you must supply a tag.
|
||||||
# `make push` will push the container-- you must supply a tag.
|
# `make push` will push the image-- you must supply a tag.
|
||||||
|
|
||||||
REPO ?= gcr.io/google_containers
|
# This image does not tag in the normal way
|
||||||
|
# TAG =
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
SUGGESTED_TAG = $(shell git rev-parse --verify HEAD)
|
SUGGESTED_TAG = $(shell git rev-parse --verify HEAD)
|
||||||
|
|
||||||
porter: porter.go
|
porter: porter.go
|
||||||
|
@ -17,13 +19,15 @@ tag:
|
||||||
@echo "or"
|
@echo "or"
|
||||||
@echo "$$ make push TAG=$(SUGGESTED_TAG)"
|
@echo "$$ make push TAG=$(SUGGESTED_TAG)"
|
||||||
|
|
||||||
container:
|
container: image
|
||||||
|
|
||||||
|
image:
|
||||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
||||||
docker build -t $(REPO)/porter:$(TAG) .
|
docker build -t $(PREFIX)/porter:$(TAG) .
|
||||||
|
|
||||||
push:
|
push:
|
||||||
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
$(if $(TAG),,$(error TAG is not defined. Use 'make tag' after committing changes to see a suggestion))
|
||||||
gcloud docker push $(REPO)/porter:$(TAG)
|
gcloud docker push $(PREFIX)/porter:$(TAG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f porter
|
rm -f porter
|
||||||
|
|
|
@ -1,16 +1,22 @@
|
||||||
all: clean consumer
|
|
||||||
|
|
||||||
TAG = beta
|
TAG = beta
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
|
all: clean consumer
|
||||||
|
|
||||||
consumer:
|
consumer:
|
||||||
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consume-cpu/consume-cpu ./consume-cpu/consume_cpu.go
|
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consume-cpu/consume-cpu ./consume-cpu/consume_cpu.go
|
||||||
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consumer .
|
CGO_ENABLED=0 godep go build -a -installsuffix cgo --ldflags '-w' -o consumer .
|
||||||
|
|
||||||
container:
|
container: image
|
||||||
sudo docker build -t gcr.io/google_containers/resource_consumer:$(TAG) .
|
|
||||||
|
image:
|
||||||
|
sudo docker build -t $(PREFIX)/resource_consumer:$(TAG) .
|
||||||
|
|
||||||
run_container:
|
run_container:
|
||||||
docker run --publish=8080:8080 gcr.io/google_containers/resource_consumer:$(TAG)
|
docker run --publish=8080:8080 $(PREFIX)/resource_consumer:$(TAG)
|
||||||
|
|
||||||
|
push:
|
||||||
|
@echo "This image is not meant to be pushed."
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f consumer
|
rm -f consumer
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
|
TAG = 0.1
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.1
|
container: image
|
||||||
|
|
||||||
container:
|
image:
|
||||||
docker build -t gcr.io/google_containers/volume-ceph . # Build new image and automatically tag it as latest
|
docker build -t $(PREFIX)/volume-ceph . # Build new image and automatically tag it as latest
|
||||||
docker tag gcr.io/google_containers/volume-ceph gcr.io/google_containers/volume-ceph:$(TAG) # Add the version tag to the latest image
|
docker tag $(PREFIX)/volume-ceph $(PREFIX)/volume-ceph:$(TAG) # Add the version tag to the latest image
|
||||||
|
|
||||||
push: container
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/volume-ceph # Push image tagged as latest to repository
|
gcloud docker push $(PREFIX)/volume-ceph # Push image tagged as latest to repository
|
||||||
gcloud docker push gcr.io/google_containers/volume-ceph:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
gcloud docker push $(PREFIX)/volume-ceph:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
|
TAG = 0.2
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.2
|
container: image
|
||||||
|
|
||||||
container:
|
image:
|
||||||
docker build -t gcr.io/google_containers/volume-gluster . # Build new image and automatically tag it as latest
|
docker build -t $(PREFIX)/volume-gluster . # Build new image and automatically tag it as latest
|
||||||
docker tag gcr.io/google_containers/volume-gluster gcr.io/google_containers/volume-gluster:$(TAG) # Add the version tag to the latest image
|
docker tag $(PREFIX)/volume-gluster $(PREFIX)/volume-gluster:$(TAG) # Add the version tag to the latest image
|
||||||
|
|
||||||
push: container
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/volume-gluster # Push image tagged as latest to repository
|
gcloud docker push $(PREFIX)/volume-gluster # Push image tagged as latest to repository
|
||||||
gcloud docker push gcr.io/google_containers/volume-gluster:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
gcloud docker push $(PREFIX)/volume-gluster:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
|
TAG = 0.1
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.1
|
container: image
|
||||||
|
|
||||||
container:
|
image:
|
||||||
# Build new image and automatically tag it as latest
|
# Build new image and automatically tag it as latest
|
||||||
docker build -t gcr.io/google_containers/volume-iscsi .
|
docker build -t $(PREFIX)/volume-iscsi .
|
||||||
# Add the version tag to the latest image
|
# Add the version tag to the latest image
|
||||||
docker tag gcr.io/google_containers/volume-iscsi gcr.io/google_containers/volume-iscsi:$(TAG)
|
docker tag $(PREFIX)/volume-iscsi $(PREFIX)/volume-iscsi:$(TAG)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
# Create block.tar.gz with ext2 block device with index.html inside.
|
# Create block.tar.gz with ext2 block device with index.html inside.
|
||||||
|
@ -15,8 +18,10 @@ block:
|
||||||
# Run as root!
|
# Run as root!
|
||||||
./create_block.sh
|
./create_block.sh
|
||||||
|
|
||||||
push: container
|
push: image
|
||||||
# Push image tagged as latest to repository
|
# Push image tagged as latest to repository
|
||||||
gcloud docker push gcr.io/google_containers/volume-iscsi
|
gcloud docker push $(PREFIX)/volume-iscsi
|
||||||
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||||
gcloud docker push gcr.io/google_containers/volume-iscsi:$(TAG)
|
gcloud docker push $(PREFIX)/volume-iscsi:$(TAG)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
|
@ -1,13 +1,16 @@
|
||||||
|
TAG = 0.4
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.4
|
container: image
|
||||||
|
|
||||||
container:
|
image:
|
||||||
docker build -t gcr.io/google_containers/volume-nfs . # Build new image and automatically tag it as latest
|
docker build -t $(PREFIX)/volume-nfs . # Build new image and automatically tag it as latest
|
||||||
docker tag gcr.io/google_containers/volume-nfs gcr.io/google_containers/volume-nfs:$(TAG) # Add the version tag to the latest image
|
docker tag $(PREFIX)/volume-nfs $(PREFIX)/volume-nfs:$(TAG) # Add the version tag to the latest image
|
||||||
|
|
||||||
push: container
|
push: image
|
||||||
gcloud docker push gcr.io/google_containers/volume-nfs # Push image tagged as latest to repository
|
gcloud docker push $(PREFIX)/volume-nfs # Push image tagged as latest to repository
|
||||||
gcloud docker push gcr.io/google_containers/volume-nfs:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
gcloud docker push $(PREFIX)/volume-nfs:$(TAG) # Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
|
|
@ -1,12 +1,15 @@
|
||||||
|
TAG = 0.1
|
||||||
|
PREFIX = gcr.io/google_containers
|
||||||
|
|
||||||
all: push
|
all: push
|
||||||
|
|
||||||
TAG = 0.1
|
container: image
|
||||||
|
|
||||||
container:
|
image:
|
||||||
# Build new image and automatically tag it as latest
|
# Build new image and automatically tag it as latest
|
||||||
docker build -t gcr.io/google_containers/volume-rbd .
|
docker build -t $(PREFIX)/volume-rbd .
|
||||||
# Add the version tag to the latest image
|
# Add the version tag to the latest image
|
||||||
docker tag gcr.io/google_containers/volume-rbd gcr.io/google_containers/volume-rbd:$(TAG)
|
docker tag $(PREFIX)/volume-rbd $(PREFIX)/volume-rbd:$(TAG)
|
||||||
|
|
||||||
block:
|
block:
|
||||||
# Create block.tar.gz with ext2 block device with index.html inside.
|
# Create block.tar.gz with ext2 block device with index.html inside.
|
||||||
|
@ -15,8 +18,10 @@ block:
|
||||||
# Run as root!
|
# Run as root!
|
||||||
./create_block.sh
|
./create_block.sh
|
||||||
|
|
||||||
push: container
|
push: image
|
||||||
# Push image tagged as latest to repository
|
# Push image tagged as latest to repository
|
||||||
gcloud docker push gcr.io/google_containers/volume-rbd
|
gcloud docker push $(PREFIX)/volume-rbd
|
||||||
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
# Push version tagged image to repository (since this image is already pushed it will simply create or update version tag)
|
||||||
gcloud docker push gcr.io/google_containers/volume-rbd:$(TAG)
|
gcloud docker push $(PREFIX)/volume-rbd:$(TAG)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
|
Loading…
Reference in New Issue