docker: Tweak cargo build verbosities.
docker: Fix unused instructions; format/tabs. Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -36,6 +36,7 @@ RUN \
|
|||||||
set -eux
|
set -eux
|
||||||
rustup run ${rust_toolchain} \
|
rustup run ${rust_toolchain} \
|
||||||
cargo ${cargo_cmd} \
|
cargo ${cargo_cmd} \
|
||||||
|
--verbose \
|
||||||
--frozen \
|
--frozen \
|
||||||
--workspace \
|
--workspace \
|
||||||
"${cargo_spec_features}" \
|
"${cargo_spec_features}" \
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ RUN \
|
|||||||
mkdir -p "${pkg_dir}"
|
mkdir -p "${pkg_dir}"
|
||||||
rustup run ${rust_toolchain} \
|
rustup run ${rust_toolchain} \
|
||||||
cargo deb \
|
cargo deb \
|
||||||
|
--verbose \
|
||||||
--frozen \
|
--frozen \
|
||||||
--no-build \
|
--no-build \
|
||||||
"${cargo_spec_features}" \
|
"${cargo_spec_features}" \
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ RUN \
|
|||||||
set -eux
|
set -eux
|
||||||
rustup run ${rust_toolchain} \
|
rustup run ${rust_toolchain} \
|
||||||
cargo chef cook ${cook_args} \
|
cargo chef cook ${cook_args} \
|
||||||
|
--verbose \
|
||||||
--frozen \
|
--frozen \
|
||||||
--workspace \
|
--workspace \
|
||||||
"${cargo_spec_features}" \
|
"${cargo_spec_features}" \
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ of images from shared intermediate layers with a huge ever-growing pulsating cac
|
|||||||
The result is the ability to run continuous integration for a number of build
|
The result is the ability to run continuous integration for a number of build
|
||||||
variations while only paying the cost of rebuilding the last layer for each one.
|
variations while only paying the cost of rebuilding the last layer for each one.
|
||||||
|
|
||||||
|
|
||||||
### Layout
|
### Layout
|
||||||
|
|
||||||
This directory is made up of four types of files.
|
This directory is made up of three types of files:
|
||||||
|
|
||||||
- Shell scripts are the user interface. Use this system through one of the shell scripts. The
|
- Shell scripts are the user interface. Use this system through one of the shell scripts. The
|
||||||
bake files can still be docker'ed directly but it's recomended to run the script.
|
bake files can still be docker'ed directly but it's recomended to run the script.
|
||||||
@@ -25,9 +26,6 @@ always be a single unified tree.
|
|||||||
These are written generically in the style of "template functions" with many variables allowing
|
These are written generically in the style of "template functions" with many variables allowing
|
||||||
many targets to create many variations using the same Dockerfile.
|
many targets to create many variations using the same Dockerfile.
|
||||||
|
|
||||||
- All other files are various assets that may be referenced or used in a build mount, though
|
|
||||||
at the time of this writing I've actually eliminated all of them, more may return one day.
|
|
||||||
|
|
||||||
|
|
||||||
### Getting started
|
### Getting started
|
||||||
|
|
||||||
|
|||||||
@@ -6,23 +6,23 @@ variable "GITHUB_REF_SHA" {}
|
|||||||
variable "GITHUB_REF_NAME" {}
|
variable "GITHUB_REF_NAME" {}
|
||||||
|
|
||||||
variable "acct" {
|
variable "acct" {
|
||||||
default = "${GITHUB_ACTOR}"
|
default = "${GITHUB_ACTOR}"
|
||||||
}
|
}
|
||||||
variable "repo" {
|
variable "repo" {
|
||||||
default = "${GITHUB_REPOSITORY}"
|
default = "${GITHUB_REPOSITORY}"
|
||||||
}
|
}
|
||||||
variable "docker_repo" {
|
variable "docker_repo" {
|
||||||
default = "${repo}"
|
default = "${repo}"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "git_ref" {
|
variable "git_ref" {
|
||||||
default = "${GITHUB_REF}"
|
default = "${GITHUB_REF}"
|
||||||
}
|
}
|
||||||
variable "git_ref_sha" {
|
variable "git_ref_sha" {
|
||||||
default = "${GITHUB_REF_SHA}"
|
default = "${GITHUB_REF_SHA}"
|
||||||
}
|
}
|
||||||
variable "git_ref_name" {
|
variable "git_ref_name" {
|
||||||
default = "${GITHUB_REF_NAME}"
|
default = "${GITHUB_REF_NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
cargo_feat_sets = {
|
cargo_feat_sets = {
|
||||||
@@ -109,10 +109,10 @@ variable "package_last_modified" {
|
|||||||
|
|
||||||
# Compression options
|
# Compression options
|
||||||
variable "image_compress_level" {
|
variable "image_compress_level" {
|
||||||
default = 11
|
default = 11
|
||||||
}
|
}
|
||||||
variable "cache_compress_level" {
|
variable "cache_compress_level" {
|
||||||
default = 6
|
default = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
# Use the cargo-chef layering strategy to separate and pre-build dependencies
|
# Use the cargo-chef layering strategy to separate and pre-build dependencies
|
||||||
@@ -126,11 +126,11 @@ variable "use_chef" {
|
|||||||
# Options for output verbosity
|
# Options for output verbosity
|
||||||
variable "BUILDKIT_PROGRESS" {}
|
variable "BUILDKIT_PROGRESS" {}
|
||||||
variable "CARGO_TERM_VERBOSE" {
|
variable "CARGO_TERM_VERBOSE" {
|
||||||
default = BUILDKIT_PROGRESS == "plain"? "true": "false"
|
default = false
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "docker_dir" {
|
variable "docker_dir" {
|
||||||
default = "."
|
default = "."
|
||||||
}
|
}
|
||||||
|
|
||||||
# Override the project checkout
|
# Override the project checkout
|
||||||
@@ -778,7 +778,6 @@ target "book" {
|
|||||||
elem_tag("book", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
elem_tag("book", [cargo_profile, rust_toolchain, rust_target, feat_set, sys_name, sys_version, sys_target], "latest"),
|
||||||
]
|
]
|
||||||
target = "book"
|
target = "book"
|
||||||
dockerfile = "${docker_dir}/Dockerfile.cargo.book"
|
|
||||||
output = ["type=docker,compression=zstd,mode=min,compression-level=${image_compress_level}"]
|
output = ["type=docker,compression=zstd,mode=min,compression-level=${image_compress_level}"]
|
||||||
matrix = cargo_rust_feat_sys
|
matrix = cargo_rust_feat_sys
|
||||||
inherits = [
|
inherits = [
|
||||||
@@ -790,7 +789,6 @@ target "book" {
|
|||||||
}
|
}
|
||||||
dockerfile-inline =<<EOF
|
dockerfile-inline =<<EOF
|
||||||
FROM input AS book
|
FROM input AS book
|
||||||
WORKDIR /
|
|
||||||
COPY --link --from=input . .
|
COPY --link --from=input . .
|
||||||
RUN ["mdbook", "build", "-d", "/book", "/usr/src/tuwunel"]
|
RUN ["mdbook", "build", "-d", "/book", "/usr/src/tuwunel"]
|
||||||
EOF
|
EOF
|
||||||
@@ -1333,7 +1331,6 @@ target "ingredients" {
|
|||||||
feat_set == "all"?
|
feat_set == "all"?
|
||||||
"--all-features": "--no-default-features"
|
"--all-features": "--no-default-features"
|
||||||
)
|
)
|
||||||
CARGO_TERM_VERBOSE = CI == "true"
|
|
||||||
RUST_BACKTRACE = "full"
|
RUST_BACKTRACE = "full"
|
||||||
ROCKSDB_LIB_DIR="/usr/lib/${sys_target}"
|
ROCKSDB_LIB_DIR="/usr/lib/${sys_target}"
|
||||||
JEMALLOC_OVERRIDE="/usr/lib/${sys_target}/libjemalloc.a"
|
JEMALLOC_OVERRIDE="/usr/lib/${sys_target}/libjemalloc.a"
|
||||||
|
|||||||
Reference in New Issue
Block a user