better support for windows host-process containers
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
parent
d511bf4e43
commit
a7d5b53fd3
|
|
@ -14,7 +14,7 @@ export GHCR_REPO="ghcr.io/${GHCR_ORG}/${GHCR_PROJECT}"
|
||||||
if [[ -n "${IMAGE_TAG}" ]]; then
|
if [[ -n "${IMAGE_TAG}" ]]; then
|
||||||
docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${IMAGE_TAG} -t ${GHCR_REPO}:${IMAGE_TAG} \
|
docker buildx build --progress plain --pull --push --platform "${DOCKER_BUILD_PLATFORM}" -t ${DOCKER_REPO}:${IMAGE_TAG} -t ${GHCR_REPO}:${IMAGE_TAG} \
|
||||||
--label "org.opencontainers.image.created=$(date -u --iso-8601=seconds)" \
|
--label "org.opencontainers.image.created=$(date -u --iso-8601=seconds)" \
|
||||||
--label "org.opencontainers.image.revision=${CI_COMMIT_SHA}" \
|
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
|
||||||
.
|
.
|
||||||
else
|
else
|
||||||
:
|
:
|
||||||
|
|
|
||||||
|
|
@ -496,7 +496,7 @@ jobs:
|
||||||
docker info
|
docker info
|
||||||
docker build --pull -f ${{ matrix.file }} --build-arg NANO_BASE_TAG=${{ matrix.nano_base_tag }} --build-arg CORE_BASE_TAG=${{ matrix.core_base_tag }} -t democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }} \
|
docker build --pull -f ${{ matrix.file }} --build-arg NANO_BASE_TAG=${{ matrix.nano_base_tag }} --build-arg CORE_BASE_TAG=${{ matrix.core_base_tag }} -t democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }} \
|
||||||
--label "org.opencontainers.image.created=$(date -u --iso-8601=seconds)" \
|
--label "org.opencontainers.image.created=$(date -u --iso-8601=seconds)" \
|
||||||
--label "org.opencontainers.image.revision=${CI_COMMIT_SHA}" \
|
--label "org.opencontainers.image.revision=${GITHUB_SHA}" \
|
||||||
.
|
.
|
||||||
docker inspect democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }}
|
docker inspect democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }}
|
||||||
docker save democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }} -o democratic-csi-windows-${{ matrix.core_base_tag }}.tar
|
docker save democratic-csi-windows:${GITHUB_RUN_ID}-${{ matrix.core_base_tag }} -o democratic-csi-windows-${{ matrix.core_base_tag }}.tar
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,29 @@ const args = require("yargs")
|
||||||
return true;
|
return true;
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
|
// CONTAINER_SANDBOX_MOUNT_POINT C:\C\0eac9a8da76f6d7119c5d9f86c8b3106d67dbbf01dbeb22fdc0192476b7e31cb\
|
||||||
|
if (process.env.CONTAINER_SANDBOX_MOUNTPOINT) {
|
||||||
|
try {
|
||||||
|
options = JSON.parse(
|
||||||
|
fs.readFileSync(
|
||||||
|
`${process.env.CONTAINER_SANDBOX_MOUNTPOINT}${path}`,
|
||||||
|
"utf-8"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
options = yaml.load(
|
||||||
|
fs.readFileSync(
|
||||||
|
`${process.env.CONTAINER_SANDBOX_MOUNTPOINT}${path}`,
|
||||||
|
"utf8"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
|
||||||
throw new Error("failed parsing config file: " + path);
|
throw new Error("failed parsing config file: " + path);
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -317,6 +317,7 @@ class Windows {
|
||||||
async DisconnectIscsiTargetByNodeAddress(nodeAddress) {
|
async DisconnectIscsiTargetByNodeAddress(nodeAddress) {
|
||||||
let command;
|
let command;
|
||||||
|
|
||||||
|
// https://github.com/PowerShell/PowerShell/issues/17306
|
||||||
command = `Disconnect-IscsiTarget -NodeAddress ${nodeAddress.toLowerCase()} -Confirm:$false`;
|
command = `Disconnect-IscsiTarget -NodeAddress ${nodeAddress.toLowerCase()} -Confirm:$false`;
|
||||||
await this.ps.exec(command);
|
await this.ps.exec(command);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue