Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
17a1ec10
Commit
17a1ec10
authored
Jan 08, 2018
by
Manjunath A Kumatagi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the pause image a manifest list
parent
da9a4d5d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
17 deletions
+43
-17
Makefile
build/pause/Makefile
+13
-17
Makefile.manifest
hack/make-rules/Makefile.manifest
+30
-0
No files found.
build/pause/Makefile
View file @
17a1ec10
...
@@ -12,11 +12,13 @@
...
@@ -12,11 +12,13 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
.PHONY
:
all push push-legacy container clean orphan
.PHONY
:
all push container clean orphan all-push push-manifest
include
../../hack/make-rules/Makefile.manifest
REGISTRY
?=
gcr.io/google_containers
REGISTRY
?=
gcr.io/google_containers
IMAGE
=
$(REGISTRY)
/pause
-
$(ARCH)
IMAGE
=
$(REGISTRY)
/pause
LEGACY_AMD64_IMAGE
=
$(REGISTRY)
/pause
IMAGE_WITH_ARCH
=
$(IMAGE)
-
$(ARCH)
TAG
=
3.1
TAG
=
3.1
REV
=
$(
shell
git describe
--contains
--always
--match
=
'v*'
)
REV
=
$(
shell
git describe
--contains
--always
--match
=
'v*'
)
...
@@ -56,6 +58,11 @@ endif
...
@@ -56,6 +58,11 @@ endif
# If you want to build AND push all containers, see the 'all-push' rule.
# If you want to build AND push all containers, see the 'all-push' rule.
all
:
all-container
all
:
all-container
all-push
:
all-push-images push-manifest
push-manifest
:
manifest-tool
manifest-tool push from-args
--platforms
$
(
call join_platforms,
$(ALL_ARCH)
)
--template
$(IMAGE)
-ARCH
:
$(TAG)
--target
$(IMAGE)
:
$(TAG)
sub-container-%
:
sub-container-%
:
$(MAKE)
ARCH
=
$*
container
$(MAKE)
ARCH
=
$*
container
...
@@ -64,7 +71,7 @@ sub-push-%:
...
@@ -64,7 +71,7 @@ sub-push-%:
all-container
:
$(addprefix sub-container-
,
$(ALL_ARCH))
all-container
:
$(addprefix sub-container-
,
$(ALL_ARCH))
all-push
:
$(addprefix sub-push-
,
$(ALL_ARCH))
all-push
-images
:
$(addprefix sub-push-
,
$(ALL_ARCH))
build
:
bin/$(BIN)-$(ARCH)
build
:
bin/$(BIN)-$(ARCH)
...
@@ -79,23 +86,12 @@ bin/$(BIN)-$(ARCH): $(SRCS)
...
@@ -79,23 +86,12 @@ bin/$(BIN)-$(ARCH): $(SRCS)
container
:
.container-$(ARCH)
container
:
.container-$(ARCH)
.container-$(ARCH)
:
bin/$(BIN)-$(ARCH)
.container-$(ARCH)
:
bin/$(BIN)-$(ARCH)
docker build
--pull
-t
$(IMAGE)
:
$(TAG)
--build-arg
ARCH
=
$(ARCH)
.
docker build
--pull
-t
$(IMAGE_WITH_ARCH)
:
$(TAG)
--build-arg
ARCH
=
$(ARCH)
.
ifeq
($(ARCH),amd64)
docker rmi $(LEGACY_AMD64_IMAGE)
:
$(TAG) 2>/dev/null || true
docker tag
$(IMAGE)
:
$(TAG)
$(LEGACY_AMD64_IMAGE)
:
$(TAG)
endif
touch
$@
touch
$@
push
:
.push-$(ARCH)
push
:
.push-$(ARCH)
.push-$(ARCH)
:
.container-$(ARCH)
.push-$(ARCH)
:
.container-$(ARCH)
gcloud docker
--
push
$(IMAGE)
:
$(TAG)
gcloud docker
--
push
$(IMAGE_WITH_ARCH)
:
$(TAG)
touch
$@
push-legacy
:
.push-legacy-$(ARCH)
.push-legacy-$(ARCH)
:
.container-$(ARCH)
ifeq
($(ARCH),amd64)
gcloud docker -- push $(LEGACY_AMD64_IMAGE)
:
$(TAG)
endif
touch
$@
touch
$@
# Useful for testing, not automatically included in container image
# Useful for testing, not automatically included in container image
...
...
hack/make-rules/Makefile.manifest
0 → 100644
View file @
17a1ec10
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.PHONY
:
manifest-tool
MANIFEST_TOOL_DIR
:=
$(
shell
mktemp
-d
)
export
PATH
:=
$(MANIFEST_TOOL_DIR)
:
$(PATH)
MANIFEST_TOOL_VERSION
:=
v0.7.0
space
:=
space
+=
comma
:=
,
prefix_linux
=
$
(
addprefix linux/,
$
(
strip
$1
))
join_platforms
=
$
(
subst
$(space)
,
$(comma)
,
$
(
call prefix_linux,
$
(
strip
$1
)))
manifest-tool
:
curl
-sSL
https://github.com/estesp/manifest-tool/releases/download/
$(MANIFEST_TOOL_VERSION)
/manifest-tool-linux-amd64
>
$(MANIFEST_TOOL_DIR)
/manifest-tool
chmod
+x
$(MANIFEST_TOOL_DIR)
/manifest-tool
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment