Tanzu Build Service(TBS) の依存関係をアップデートする
以下の記事で利用しているTanzu Build Service(TBS) の環境を利用し、TBS で利用しているClusterStack
, ClusterStore
をアップデートしてみました。
- Tanzu Kubernetes Grid 上に Tanzu Build Service をインストールする
- Tanzu Build Service を利用してみる - その1
- Tanzu Build Service を利用してみる - その2
「Tanzu Build Service をアップグレードする」でも同じ様に
ClusterStack
, ClusterStore
をアップデートしていますが、今回は既にTBS 上でコンテナイメージが作成されいている状態で、どの様な動きをするか確認してみています。結果、作成されいてるコンテナイメージが使用している
ClusterStack
, ClusterStore(Buildpacks)
がアップデートされた場合、自動でコンテナイメージが更新されている事を確認出来ています。手順
- コンテナイメージの確認
- TBS の依存関係(
ClusterBuilder
) のアップデート(descriptor-100.0.80
->descriptor-100.0.83
) - TBS の依存関係(
ClusterBuilder
) のアップデート(descriptor-100.0.83
->descriptor-100.0.86
)
コンテナイメージの確認
ビルド済のコンテナイメージを確認します。
spring-petclinic
という名前のコンテナイメージが存在している事が出来ます。$ kp build list -n demo
BUILD STATUS IMAGE REASON
1 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:616474a2f212cff60233aee8dde19439840361dd314c2f29793b4159f477ae92 CONFIG
2 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:b2b0c7bba33f31c29e1fa5d7d02fb7eb6dd91d17fca09fe0307d4446a4c5fcbc COMMIT
3 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:1446b847a4f68f480f6ea61cc8651c05d8a3cca061e7f8e5df33d177f26eafae COMMIT
TBS の依存関係(ClusterBuilder) のアップデート(descriptor-100.0.80 -> descriptor-100.0.83)
こちらのドキュメント「Tanzu Build Service - Updating Build Service Dependencies」を参考にし、
ClusterBuilder(
ClusterStack
とClusterStore)
のアップデートを実施します。$ kp import -f descriptor-100.0.83.yaml
Importing ClusterStore 'default'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_go@sha256:64ba98089642bdb1ae22fde9b12fb905e0034a2e99c4564249bbc5190dcef8f9'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_java@sha256:1b8dcd7fddbb9cc797c549183d5505e92f5b4888fb223776d4730c0070f2c30e'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_nodejs@sha256:5050ac76d043395422e4ae3cab74d5bb31dc4e9f66414d0be3c4ebb7d1276312'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_java-native-image@sha256:662b27ae983ff6b0aed6eca1e5ba7e25cab178204a628ca0542cfe23c25826bf'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_dotnet-core@sha256:9ecfbe3c3565f6bc15d5aa116615cf33195a5d27133438d285f9d812f5c72664'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_php@sha256:fd5abb334f4adbcf46f42977992af145db04fb262d4c516ff4264f94e1fcd689'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_nginx@sha256:e67d5cd2e5240a9eb7a899b9b5d979ad85d0cf6c8182e15424516dac9f577371'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_httpd@sha256:34989fb8e264ccaea7916a9017b306d621b017920f71439fc515164ac0484cf5'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/paketo-buildpacks_procfile@sha256:bf6a4265db23ae25b34d402cd24e04c36dccdf24d6a6b9297f1d154a9d0b8062'
Buildpackage already exists in the store
Importing ClusterStack 'tiny'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:14ec6cdb0d35c97cbfa5575b8b8fc06c666cedad01bd4a61f31f4a81c4bc9080'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:a420ce157e9a496ff84586ef38b1248cdbf51c572542b6ae5e53cabba3e51a84'
Importing ClusterStack 'base'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:e7a000fd83dc63b8b49d46a6a0335ea90cb3e4def8975e9d5b22e1e10aee77fb'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:5e259fd999007d3c6fcd5aca4a7fc10363953d3a8b70c5ea19a5b38de765ebd1'
Importing ClusterStack 'full'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:a70a6570c5b2b1b63fbc2f2961e6a7b6b8b8db47c384948257f01a9c2d55d199'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:b277ee54db18cc3027bb572096a50b36ad098f406e599d0d5590e55ff7281875'
Importing ClusterStack 'default'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:e7a000fd83dc63b8b49d46a6a0335ea90cb3e4def8975e9d5b22e1e10aee77fb'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:5e259fd999007d3c6fcd5aca4a7fc10363953d3a8b70c5ea19a5b38de765ebd1'
Importing ClusterBuilder 'base'...
Importing ClusterBuilder 'full'...
Importing ClusterBuilder 'tiny'...
Importing ClusterBuilder 'default'...
Imported resources
このバージョンにおいては、
ClusterStore
(Buildpacks)の更新はなく、ClusterStack
(ベースOSイメージ)の更新だけの様です。コンテナイメージを確認してみると、自動で再度コンテナのビルドが走っていることが分かると思います。コンテナイメージがビルドされている理由として、
<stack>
となっており、コンテナのベースOSイメージが更新された事をトリガーにコンテナのビルド処理が実施された事が分かります。$ kp build list -n demo
BUILD STATUS IMAGE REASON
1 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:616474a2f212cff60233aee8dde19439840361dd314c2f29793b4159f477ae92 CONFIG
2 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:b2b0c7bba33f31c29e1fa5d7d02fb7eb6dd91d17fca09fe0307d4446a4c5fcbc COMMIT
3 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:1446b847a4f68f480f6ea61cc8651c05d8a3cca061e7f8e5df33d177f26eafae COMMIT
4 BUILDING STACK
$ kp build list -n demo
BUILD STATUS IMAGE REASON
1 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:616474a2f212cff60233aee8dde19439840361dd314c2f29793b4159f477ae92 CONFIG
2 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:b2b0c7bba33f31c29e1fa5d7d02fb7eb6dd91d17fca09fe0307d4446a4c5fcbc COMMIT
3 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:1446b847a4f68f480f6ea61cc8651c05d8a3cca061e7f8e5df33d177f26eafae COMMIT
4 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:f9234789dc53149392278fc8b4a41ea5604e64392335141fa6e40e9ba0bf9d83 STACK
コンテナビルド時のログも確認してみます。
ベースOSイメージ部分だけの変更、
<REBASE>
の処理のみ実施されている事が分かると思います。$ kp build logs spring-petclinic -b 4 -n demo
===> REBASE
Build reason(s): STACK
STACK:
- sha256:367a43536f60c21190cea5c06d040d01d29f4102840d6b3e1dcd72ed2eb71721
+ sha256:5e259fd999007d3c6fcd5aca4a7fc10363953d3a8b70c5ea19a5b38de765ebd1
Loading secret for "harbor2.<MYDOMAIN>" from secret "lab-harbor2" at location "/var/build-secrets/lab-harbor2"
*** Images (sha256:f9234789dc53149392278fc8b4a41ea5604e64392335141fa6e40e9ba0bf9d83):
harbor2.<MYDOMAIN>/tanzu/spring-petclinic
harbor2.<MYDOMAIN>/tanzu/spring-petclinic:b4.20210322.033355
*** Digest: sha256:f9234789dc53149392278fc8b4a41ea5604e64392335141fa6e40e9ba0bf9d83
===> COMPLETION
Build successful
TBS の依存関係(ClusterBuilder) のアップデート(descriptor-100.0.83 -> descriptor-100.0.86)
ClusterBuilder を更にアップデートします。手順は上のものと同じ手順で実施します。
$ kp import -f descriptor-100.0.86.yaml
Importing ClusterStore 'default'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_go@sha256:64ba98089642bdb1ae22fde9b12fb905e0034a2e99c4564249bbc5190dcef8f9'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_java@sha256:00ace9c3fbf2f0553858f01f9cf4e31828517fe12662ea9fb4f9a3cf8a10e4b3'
Added Buildpackage
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_nodejs@sha256:5050ac76d043395422e4ae3cab74d5bb31dc4e9f66414d0be3c4ebb7d1276312'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_java-native-image@sha256:662b27ae983ff6b0aed6eca1e5ba7e25cab178204a628ca0542cfe23c25826bf'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_dotnet-core@sha256:024607974e03deab30b64478a41b91233bec5d6285c75dbaf1398a10bb47cd58'
Added Buildpackage
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_php@sha256:fd5abb334f4adbcf46f42977992af145db04fb262d4c516ff4264f94e1fcd689'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_nginx@sha256:e67d5cd2e5240a9eb7a899b9b5d979ad85d0cf6c8182e15424516dac9f577371'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/tanzu-buildpacks_httpd@sha256:34989fb8e264ccaea7916a9017b306d621b017920f71439fc515164ac0484cf5'
Buildpackage already exists in the store
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/paketo-buildpacks_procfile@sha256:bf6a4265db23ae25b34d402cd24e04c36dccdf24d6a6b9297f1d154a9d0b8062'
Buildpackage already exists in the store
Importing ClusterStack 'tiny'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:5308eff077c6e65531df72e8a915a6150bec9ec3a8756a6aa24fbf2c1fec02c9'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:1278d5e15d87454ca485d058bd3c39e92d4ad0f837c7519d38a0cdcf77d41f61'
Importing ClusterStack 'base'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:80bc79a4c6661e3a77ec34498399fdc755fa165e84500d84e7a5ca0878e62800'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:c963890adcc4a861904de75534097f6fe2e70821a8a171b87e9c8fa6043b2c04'
Importing ClusterStack 'full'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:9e7c09cce5fe37aec0346f0cd9f22c62f26c22033bdca61eba5bf830c4c06920'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:24b52d2ce4c9cb31a447625512e1c02eb8fea1b044767f8d91301485a16dc975'
Importing ClusterStack 'default'...
Uploading to 'harbor2.<MYDOMAIN>/tanzu/tbs'...
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/build@sha256:80bc79a4c6661e3a77ec34498399fdc755fa165e84500d84e7a5ca0878e62800'
Uploading 'harbor2.<MYDOMAIN>/tanzu/tbs/run@sha256:c963890adcc4a861904de75534097f6fe2e70821a8a171b87e9c8fa6043b2c04'
Importing ClusterBuilder 'base'...
Importing ClusterBuilder 'full'...
Importing ClusterBuilder 'tiny'...
Importing ClusterBuilder 'default'...
Imported resources
このバージョンにおいては、
ClusterStore
(Buildpacks)、ClusterStack
(ベースOSイメージ)両方が更新されています。コンテナイメージを確認してみると、
BUILD
の5/6 それぞれで自動でコンテナのビルドが走っていることが分かると思います。BUILD5
においては、ClusterStore
(Buildpacks) がアップデートされ、コンテナイメージがビルドされている理由として、<BUILDPACK>
となっている事が分かります。$ kp build list -n demo
BUILD STATUS IMAGE REASON
1 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:616474a2f212cff60233aee8dde19439840361dd314c2f29793b4159f477ae92 CONFIG
2 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:b2b0c7bba33f31c29e1fa5d7d02fb7eb6dd91d17fca09fe0307d4446a4c5fcbc COMMIT
3 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:1446b847a4f68f480f6ea61cc8651c05d8a3cca061e7f8e5df33d177f26eafae COMMIT
4 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:f9234789dc53149392278fc8b4a41ea5604e64392335141fa6e40e9ba0bf9d83 STACK
5 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:aaa61b9af8e50e1a17cc127a138d5a935b369dcf9bfceb6c77d7fcf7c180405c BUILDPACK
6 SUCCESS harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:8c6ad346d135aa4752f864d22501b8e4cc77a5b62a0f8f0d34b58e5f262b4891 STACK
コンテナビルド時のログも確認してみます。先程の場合と異なり、ベースのOSイメージに当たるStackだけではなく、コンテナイメージを再度ビルドしにいっている事が分かります。
$ kp build logs spring-petclinic -b 5 -n demo
===> PREPARE
Build reason(s): BUILDPACK
BUILDPACK:
- - id: paketo-buildpacks/bellsoft-liberica
- version: 7.0.1
Loading secret for "harbor2.<MYDOMAIN>" from secret "lab-harbor2" at location "/var/build-secrets/lab-harbor2"
Cloning "https://github.com/itot555/spring-petclinic.git" @ "d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18"...
Successfully cloned "https://github.com/itot555/spring-petclinic.git" @ "d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18" in path "/workspace"
===> DETECT
7 of 33 buildpacks participating
paketo-buildpacks/ca-certificates 2.1.0
paketo-buildpacks/bellsoft-liberica 7.1.0
paketo-buildpacks/maven 5.0.0
paketo-buildpacks/executable-jar 5.0.0
paketo-buildpacks/apache-tomcat 5.1.0
paketo-buildpacks/dist-zip 4.0.0
paketo-buildpacks/spring-boot 4.1.0
===> ANALYZE
Restoring metadata for "paketo-buildpacks/ca-certificates:helper" from app image
Restoring metadata for "paketo-buildpacks/bellsoft-liberica:jre" from app image
Restoring metadata for "paketo-buildpacks/bellsoft-liberica:jvmkill" from app image
Restoring metadata for "paketo-buildpacks/bellsoft-liberica:helper" from app image
Restoring metadata for "paketo-buildpacks/bellsoft-liberica:java-security-properties" from app image
Restoring metadata for "paketo-buildpacks/bellsoft-liberica:jdk" from cache
Restoring metadata for "paketo-buildpacks/maven:application" from cache
Restoring metadata for "paketo-buildpacks/maven:cache" from cache
Restoring metadata for "paketo-buildpacks/spring-boot:web-application-type" from app image
Restoring metadata for "paketo-buildpacks/spring-boot:helper" from app image
Restoring metadata for "paketo-buildpacks/spring-boot:spring-cloud-bindings" from app image
===> RESTORE
Restoring data for "paketo-buildpacks/bellsoft-liberica:jdk" from cache
Restoring data for "paketo-buildpacks/maven:application" from cache
Restoring data for "paketo-buildpacks/maven:cache" from cache
===> BUILD
Paketo CA Certificates Buildpack 2.1.0
https://github.com/paketo-buildpacks/ca-certificates
Launch Helper: Reusing cached layer
Paketo BellSoft Liberica Buildpack 7.1.0
https://github.com/paketo-buildpacks/bellsoft-liberica
Build Configuration:
$BP_JVM_VERSION 11 the Java version
Launch Configuration:
$BPL_JVM_HEAD_ROOM 0 the headroom in memory calculation
$BPL_JVM_LOADED_CLASS_COUNT 35% of classes the number of loaded classes in memory calculation
$BPL_JVM_THREAD_COUNT 250 the number of threads in memory calculation
$JAVA_TOOL_OPTIONS the JVM launch flags
BellSoft Liberica JDK 11.0.10: Reusing cached layer
BellSoft Liberica JRE 11.0.10: Reusing cached layer
Launch Helper: Contributing to layer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/active-processor-count
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/java-opts
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/link-local-dns
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/memory-calculator
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/openssl-certificate-loader
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-configurer
Creating /layers/paketo-buildpacks_bellsoft-liberica/helper/exec.d/security-providers-classpath-9
JVMKill Agent 1.16.0: Reusing cached layer
Java Security Properties: Contributing to layer
Writing env.launch/JAVA_SECURITY_PROPERTIES.default
Writing env.launch/JAVA_TOOL_OPTIONS.append
Writing env.launch/JAVA_TOOL_OPTIONS.delim
Paketo Maven Buildpack 5.0.0
https://github.com/paketo-buildpacks/maven
Build Configuration:
$BP_MAVEN_BUILD_ARGUMENTS -Dmaven.test.skip=true package the arguments to pass to Maven
$BP_MAVEN_BUILT_ARTIFACT target *.[jw]ar the built application artifact explicitly. Supersedes $BP_MAVEN_BUILT_MODULE
$BP_MAVEN_BUILT_MODULE the module to find application artifact in
Creating cache directory /home/cnb/.m2
Compiled Application: Contributing to layer
Executing mvnw --batch-mode -Dmaven.test.skip=true package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------< org.springframework.samples:spring-petclinic >------------
[INFO] Building petclinic 2.3.0.BUILD-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- spring-javaformat-maven-plugin:0.0.25:validate (default) @ spring-petclinic ---
[INFO]
[INFO] --- maven-checkstyle-plugin:3.1.1:check (nohttp-checkstyle-validation) @ spring-petclinic ---
[INFO] You have 0 Checkstyle violations.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:prepare-agent (default) @ spring-petclinic ---
[INFO] argLine set to -javaagent:/home/cnb/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/workspace/target/jacoco.exec
[INFO]
[INFO] --- git-commit-id-plugin:3.0.1:revision (default) @ spring-petclinic ---
[INFO] dotGitDirectory /workspace/.git
[INFO] Collected git.build.user.name with value
[INFO] Collected git.build.user.email with value
[INFO] Collected git.branch with value d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18
[INFO] --always = true
[INFO] --dirty = -dirty
[INFO] --abbrev = 7
[INFO] Tag refs [[Ref[refs/tags/1.5.x=c36452a2c34443ae26b4ecbba4f149906af14717]]]
[INFO] Created map: [{}]
[INFO] evalCommit is [d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18]
[INFO] Collected git.commit.id.describe with value d04c61d
[INFO] Collected git.commit.id.describe-short with value d04c61d
[INFO] Collected git.commit.id with value d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18
[INFO] Collected git.commit.id.abbrev with value d04c61d
[INFO] Collected git.dirty with value false
[INFO] Collected git.commit.user.name with value Tadashi Ito
[INFO] Collected git.commit.user.email with value 10068148+itot555@users.noreply.github.com
[INFO] Collected git.commit.message.full with value Update messages.properties
[INFO] Collected git.commit.message.short with value Update messages.properties
[INFO] Collected git.commit.time with value 2021-03-20T04:40:14+0000
[INFO] Collected git.remote.origin.url with value https://github.com/itot555/spring-petclinic.git
[INFO] Collected git.tags with value
[INFO] evalCommit is [d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18]
[INFO] Tag refs [[Ref[refs/tags/1.5.x=c36452a2c34443ae26b4ecbba4f149906af14717]]]
[INFO] Created map: [{}]
[INFO] Collected git.closest.tag.name with value
[INFO] evalCommit is [d04c61d93fb47138d0b2aa34e51d9c4ef4f21f18]
[INFO] Tag refs [[Ref[refs/tags/1.5.x=c36452a2c34443ae26b4ecbba4f149906af14717]]]
[INFO] Created map: [{}]
[INFO] Collected git.closest.tag.commit.count with value
[INFO] Collected git.total.commit.count with value 731
[INFO] Collected git.local.branch.ahead with value NO_REMOTE
[INFO] Collected git.local.branch.behind with value NO_REMOTE
[INFO] Collected git.build.time with value 2021-03-22T04:05:14+0000
[INFO] Collected git.build.version with value 2.3.0.BUILD-SNAPSHOT
[INFO] Collected git.build.host with value spring-petclinic-build-5-6fbhf-build-pod
[INFO] including property git.tags in results
[INFO] including property git.closest.tag.commit.count in results
[INFO] including property git.build.version in results
[INFO] including property git.commit.user.name in results
[INFO] including property git.commit.id.abbrev in results
[INFO] including property git.branch in results
[INFO] including property git.build.host in results
[INFO] including property git.commit.id.describe-short in results
[INFO] including property git.total.commit.count in results
[INFO] including property git.commit.id.describe in results
[INFO] including property git.build.user.email in results
[INFO] including property git.commit.id in results
[INFO] including property git.commit.message.short in results
[INFO] including property git.commit.user.email in results
[INFO] including property git.closest.tag.name in results
[INFO] including property git.local.branch.ahead in results
[INFO] including property git.commit.time in results
[INFO] including property git.local.branch.behind in results
[INFO] including property git.build.time in results
[INFO] including property git.build.user.name in results
[INFO] including property git.dirty in results
[INFO] including property git.commit.message.full in results
[INFO] including property git.remote.origin.url in results
[INFO] Writing properties file to [/workspace/target/classes/git.properties] (for module petclinic)...
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.3.RELEASE:build-info (default) @ spring-petclinic ---
[INFO]
[INFO] --- wro4j-maven-plugin:1.8.0:run (default) @ spring-petclinic ---
[INFO] Downloading from spring-snapshots: https://repo.spring.io/snapshot/me/n4u/sass/sass-gems/maven-metadata.xml
[INFO] Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/me/n4u/sass/sass-gems/maven-metadata.xml
[INFO] Downloading from spring-milestones: https://repo.spring.io/milestone/me/n4u/sass/sass-gems/maven-metadata.xml
[INFO] /workspace/src/main/less
[INFO] Executing the mojo:
[INFO] Wro4j Model path: /workspace/src/main/wro/wro.xml
[INFO] targetGroups: null
[INFO] minimize: true
[INFO] ignoreMissingResources: null
[INFO] parallelProcessing: false
[INFO] buildDirectory: /workspace/target
[INFO] destinationFolder: /workspace/target
[INFO] cssDestinationFolder: /workspace/target/classes/static/resources/css
[INFO] The following groups will be processed: [petclinic]
[INFO] folder: /workspace/target/classes/static/resources/css
[INFO] processing group: petclinic.css
[WARNING] Less warnings are:
[WARNING] 10:1 Cannot link source map. Css result location is not know and could not be deduced from input less source..
[INFO] file size: petclinic.css -> 152399 bytes
[INFO] /workspace/target/classes/static/resources/css/petclinic.css (152399 bytes)
[INFO] folder: /workspace/target
[INFO] processing group: petclinic.js
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ spring-petclinic ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 39 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ spring-petclinic ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 25 source files to /workspace/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ spring-petclinic ---
[INFO] Not copying test resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ spring-petclinic ---
[INFO] Not compiling test sources
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ spring-petclinic ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.5:report (report) @ spring-petclinic ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- maven-jar-plugin:3.2.0:jar (default-jar) @ spring-petclinic ---
[INFO] Building jar: /workspace/target/spring-petclinic-2.3.0.BUILD-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.3.3.RELEASE:repackage (repackage) @ spring-petclinic ---
[INFO] Replacing main artifact with repackaged archive
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23.427 s
[INFO] Finished at: 2021-03-22T04:05:29Z
[INFO] ------------------------------------------------------------------------
Removing source code
Paketo Executable JAR Buildpack 5.0.0
https://github.com/paketo-buildpacks/executable-jar
Class Path: Contributing to layer
Writing env/CLASSPATH.delim
Writing env/CLASSPATH.prepend
Process types:
executable-jar: java org.springframework.boot.loader.JarLauncher (direct)
task: java org.springframework.boot.loader.JarLauncher (direct)
web: java org.springframework.boot.loader.JarLauncher (direct)
Paketo Spring Boot Buildpack 4.1.0
https://github.com/paketo-buildpacks/spring-boot
Launch Helper: Reusing cached layer
Spring Cloud Bindings 1.7.0: Reusing cached layer
Web Application Type: Contributing to layer
Servlet web application detected
Writing env.launch/BPL_JVM_THREAD_COUNT.default
Image labels:
org.opencontainers.image.title
org.opencontainers.image.version
org.springframework.boot.spring-configuration-metadata.json
org.springframework.boot.version
===> EXPORT
Reusing layers from image 'harbor2.<MYDOMAIN>/tanzu/spring-petclinic@sha256:f9234789dc53149392278fc8b4a41ea5604e64392335141fa6e40e9ba0bf9d83'
Reusing layer 'paketo-buildpacks/ca-certificates:helper'
Adding layer 'paketo-buildpacks/bellsoft-liberica:helper'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:java-security-properties'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:jre'
Reusing layer 'paketo-buildpacks/bellsoft-liberica:jvmkill'
Reusing layer 'paketo-buildpacks/executable-jar:classpath'
Reusing layer 'paketo-buildpacks/spring-boot:helper'
Reusing layer 'paketo-buildpacks/spring-boot:spring-cloud-bindings'
Reusing layer 'paketo-buildpacks/spring-boot:web-application-type'
Adding 1/1 app layer(s)
Reusing layer 'launcher'
Adding layer 'config'
Reusing layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Adding label 'org.opencontainers.image.title'
Adding label 'org.opencontainers.image.version'
Adding label 'org.springframework.boot.spring-configuration-metadata.json'
Adding label 'org.springframework.boot.version'
Setting default process type 'web'
*** Images (sha256:aaa61b9af8e50e1a17cc127a138d5a935b369dcf9bfceb6c77d7fcf7c180405c):
harbor2.<MYDOMAIN>/tanzu/spring-petclinic
harbor2.<MYDOMAIN>/tanzu/spring-petclinic:b5.20210322.040355
Reusing cache layer 'paketo-buildpacks/bellsoft-liberica:jdk'
Adding cache layer 'paketo-buildpacks/maven:application'
Adding cache layer 'paketo-buildpacks/maven:cache'
===> COMPLETION
Build successful
demo@jumpbox1:~/tbs$ kp build logs spring-petclinic -b 6 -n demo
===> REBASE
Build reason(s): STACK
STACK:
- sha256:5e259fd999007d3c6fcd5aca4a7fc10363953d3a8b70c5ea19a5b38de765ebd1
+ sha256:c963890adcc4a861904de75534097f6fe2e70821a8a171b87e9c8fa6043b2c04
Loading secret for "harbor2.<MYDOMAIN>" from secret "lab-harbor2" at location "/var/build-secrets/lab-harbor2"
*** Images (sha256:8c6ad346d135aa4752f864d22501b8e4cc77a5b62a0f8f0d34b58e5f262b4891):
harbor2.<MYDOMAIN>/tanzu/spring-petclinic
harbor2.<MYDOMAIN>/tanzu/spring-petclinic:b6.20210322.040556
*** Digest: sha256:8c6ad346d135aa4752f864d22501b8e4cc77a5b62a0f8f0d34b58e5f262b4891
===> COMPLETION
Build successful
BUILD6
のビルドログも確認してみます。こちらはStack
のみの更新になります。$ kp build logs spring-petclinic -b 6 -n demo
===> REBASE
Build reason(s): STACK
STACK:
- sha256:5e259fd999007d3c6fcd5aca4a7fc10363953d3a8b70c5ea19a5b38de765ebd1
+ sha256:c963890adcc4a861904de75534097f6fe2e70821a8a171b87e9c8fa6043b2c04
Loading secret for "harbor2.<MYDOMAIN>" from secret "lab-harbor2" at location "/var/build-secrets/lab-harbor2"
*** Images (sha256:8c6ad346d135aa4752f864d22501b8e4cc77a5b62a0f8f0d34b58e5f262b4891):
harbor2.<MYDOMAIN>/tanzu/spring-petclinic
harbor2.<MYDOMAIN>/tanzu/spring-petclinic:b6.20210322.040556
*** Digest: sha256:8c6ad346d135aa4752f864d22501b8e4cc77a5b62a0f8f0d34b58e5f262b4891
===> COMPLETION
Build successful
まとめ
ClusterBuilder
をアップデートする事でビルド済のコンテナイメージがアップデートされた部分に応じて、自動でコンテナイメージがアップデートされる事を確認出来ました。また、Tanzu Buildpacks(
ClusterStore
) とStack(ClusterStack
) 、サポートされている言語等のBuildpack(以下はJava Buildpack、Paketo Spring Boot Buildpack に関する情報) に関するドキュメントは以下で確認出来ます。