Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/check-server-performance-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ check 'MariaDB startup verifies live readback' \
has_marker server/artifacts/mysql.sh 'verify_mariadb_performance_settings'
check 'incremental release image installs the canonical scripts' \
has_marker server/Dockerfile.web-compose-release \
'COPY --chmod=0755 artifacts/cattle.sh artifacts/mysql.sh artifacts/performance-env.sh /usr/share/cattle/'
'COPY --chmod=0755 artifacts/cattle.sh artifacts/mysql.sh artifacts/performance-env.sh artifacts/verify-engine-archive.sh /usr/share/cattle/'
check 'external-DB image keeps the Java helper dependency' \
has_marker server/Dockerfile.externaldb \
'COPY --chmod=0755 artifacts/cattle.sh artifacts/performance-env.sh /usr/share/cattle/'
Expand Down
3 changes: 2 additions & 1 deletion scripts/test-current-server-packaging-contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,8 @@ def test_eighteen_component_inputs_keep_exact_sha_fetch_and_separate_jdk_stage(s
self.assertEqual(len(re.findall(r'^FROM ', FILES[DOCKER], re.M)), 6)
self.assertIn('FROM scratch AS component_input', FILES[DOCKER])
final = FILES[DOCKER].rsplit('FROM ${BASE_IMAGE}', 1)[1]
self.assertLessEqual(len(re.findall(r'^(RUN|COPY|ADD)\b', final, re.M)), 32)
# The already-flattened base contributes one real layer too.
self.assertLessEqual(1 + len(re.findall(r'^(RUN|COPY|ADD)\b', final, re.M)), 32)
self.assertEqual(len(re.findall(r'^\s+fetch-server-component ', FILES[DOCKER], re.M)), 16)
self.assertIn('"${release_url%/}/v${version}/${artifact}" "${artifact}" "${archive_sha}"', FILES[DOCKER])
release_stage = FILES[DOCKER].split('FROM ${ARTIFACT_HELPER_IMAGE} AS release_artifacts', 1)[1].split('FROM ${UBUNTU_SECURITY_IMAGE}', 1)[0]
Expand Down
4 changes: 3 additions & 1 deletion scripts/test-engine-archive-contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def test_shared_wiring_and_no_extra_layer_or_stale_variable(self):
self.assertNotIn('${listing}', engine_run)
self.assertNotIn('listing=', engine_run)
final = re.split(r'(?m)^FROM ', docker)[-1]
self.assertEqual(len(re.findall(r'(?m)^(?:RUN|COPY|ADD) ', final)), 32)
self.assertLessEqual(1 + len(re.findall(r'(?m)^(?:RUN|COPY|ADD) ', final)), 32)
self.assertNotIn('COPY --from=runtime_security_packages /out/tar /usr/bin/tar', final)
self.assertIn('sha256sum -c SHA256SUMS; \\\n install -m 0755 tar /usr/bin/tar; \\\n dpkg -i packages/*.deb;', final)


if __name__ == '__main__':
Expand Down
2 changes: 1 addition & 1 deletion server/Dockerfile.web-compose-release
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,12 @@ ARG MACHINE_DRIVER_BINARY_SHA256=9d379214de116542cb0e2b1a09c17409fd59fd2b0109428
ARG PACKET_DRIVER_BINARY_SHA256=b3e5c71928fcebe1bb648f79ebbf38af9ad32d6f6dbb87587e1b92c6c331e100

COPY --from=runtime_security_packages /out/ /tmp/pasturestack-runtime-security/
COPY --from=runtime_security_packages /out/tar /usr/bin/tar
COPY scripts/install-ubuntu-security-updates.sh security/ubuntu-security-packages.lock /tmp/pasturestack-security-input/
RUN set -eux; \
printf '%s\n' "${WEB_CONSOLE_COMMIT}" | grep -Eq '^[0-9a-f]{40}$'; \
cd /tmp/pasturestack-runtime-security; \
sha256sum -c SHA256SUMS; \
install -m 0755 tar /usr/bin/tar; \
dpkg -i packages/*.deb; \
install -D -m 0644 /tmp/pasturestack-security-input/ubuntu-security-packages.lock /usr/share/pasturestack/security/ubuntu-security-packages.lock; \
sh /tmp/pasturestack-security-input/install-ubuntu-security-updates.sh /usr/share/pasturestack/security/ubuntu-security-packages.lock /tmp/pasturestack-runtime-security/security-updates; \
Expand Down