-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixup test runner #8
Changes from all commits
ff9e6da
57ac38b
302f422
d33576a
a53403a
5203326
5c45ce3
54b5876
723f8e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ ENV UPGRADE_TO=${to} THIS_NAME=${agZeroUpgrade} | |
# put env functions into shell environment | ||
RUN echo '. /usr/src/upgrade-test-scripts/env_setup.sh' >> ~/.bashrc | ||
|
||
COPY --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts | ||
COPY --link --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts | ||
SHELL ["/bin/bash", "-c"] | ||
# this is the only layer that starts ag0 | ||
RUN /usr/src/upgrade-test-scripts/start_ag0.sh | ||
|
@@ -51,7 +51,7 @@ RUN /usr/src/upgrade-test-scripts/start_ag0.sh | |
FROM use-${lastProposal.proposalName} as prepare-${proposalName} | ||
ENV UPGRADE_TO=${planName} | ||
# base is a fresh sdk image so copy these supports | ||
COPY --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/ | ||
COPY --link --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/ | ||
|
||
WORKDIR /usr/src/upgrade-test-scripts | ||
SHELL ["/bin/bash", "-c"] | ||
|
@@ -63,16 +63,16 @@ RUN ./start_to_to.sh | |
* - Start agd with the SDK that has the upgradeHandler | ||
* - Run any core-evals associated with the proposal (either the ones specified in prepare, or straight from the proposal) | ||
*/ | ||
EXECUTE({ proposalName, planName, sdkVersion }: SoftwareUpgradeProposal) { | ||
EXECUTE({ proposalName, planName, sdkImageTag }: SoftwareUpgradeProposal) { | ||
return ` | ||
# EXECUTE ${proposalName} | ||
FROM ghcr.io/agoric/agoric-sdk:${sdkVersion} as execute-${proposalName} | ||
FROM ghcr.io/agoric/agoric-sdk:${sdkImageTag} as execute-${proposalName} | ||
ENV THIS_NAME=${planName} | ||
|
||
# base is a fresh sdk image so copy these supports | ||
COPY --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/ | ||
COPY --link --chmod=755 ./upgrade-test-scripts/*.sh /usr/src/upgrade-test-scripts/ | ||
|
||
COPY --from=prepare-${proposalName} /root/.agoric /root/.agoric | ||
COPY --link --from=prepare-${proposalName} /root/.agoric /root/.agoric | ||
|
||
WORKDIR /usr/src/upgrade-test-scripts | ||
SHELL ["/bin/bash", "-c"] | ||
|
@@ -91,7 +91,7 @@ RUN ./start_to_to.sh | |
# EVAL ${proposalName} | ||
FROM use-${lastProposal.proposalName} as eval-${proposalName} | ||
|
||
COPY --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName} | ||
COPY --link --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName} | ||
|
||
WORKDIR /usr/src/upgrade-test-scripts | ||
SHELL ["/bin/bash", "-c"] | ||
|
@@ -110,10 +110,10 @@ RUN ./run_eval.sh ${proposalIdentifier}:${proposalName} | |
# USE ${proposalName} | ||
FROM ${previousStage}-${proposalName} as use-${proposalName} | ||
|
||
COPY --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName} | ||
COPY --link --chmod=755 ./proposals/${proposalIdentifier}:${proposalName} /usr/src/proposals/${proposalIdentifier}:${proposalName} | ||
|
||
# XXX for 'lib' dir for JS modules | ||
COPY --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts/ | ||
COPY --link --chmod=755 ./upgrade-test-scripts /usr/src/upgrade-test-scripts/ | ||
# TODO remove network dependencies in stages | ||
RUN cd /usr/src/upgrade-test-scripts/lib/ && yarn install | ||
|
||
|
@@ -138,7 +138,7 @@ FROM use-${proposalName} as test-${proposalName} | |
# XXX the test files were already copied in the "use" stage | ||
WORKDIR /usr/src/upgrade-test-scripts | ||
SHELL ["/bin/bash", "-c"] | ||
RUN ./run_tests.sh ${proposalIdentifier}:${proposalName} | ||
ENTRYPOINT ./run_test.sh ${proposalIdentifier}:${proposalName} | ||
`; | ||
}, | ||
}; | ||
|
@@ -171,5 +171,11 @@ for (const proposal of readProposals()) { | |
previousProposal = proposal; | ||
} | ||
|
||
const contents = blocks.join('\n'); | ||
fs.writeFileSync('Dockerfile', contents); | ||
export function refreshDockerfile() { | ||
const contents = blocks.join('\n'); | ||
fs.writeFileSync('Dockerfile', contents); | ||
} | ||
|
||
if (require.main === module) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I thought we used ES modules and node doesn't support this idiom in that context. Does .ts not get compiled to ES modules? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Node only uses ESM if |
||
refreshDockerfile(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"sdkVersion": "29", | ||
"sdkImageTag": "29", | ||
"planName": "agoric-upgrade-8", | ||
"type": "Software Upgrade Proposal" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/pismoC", | ||
"sdkVersion": "31", | ||
"sdkImageTag": "31", | ||
"planName": "agoric-upgrade-9", | ||
"type": "Software Upgrade Proposal" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/mainnet1B-rc3", | ||
"sdkVersion": "35", | ||
"sdkImageTag": "35", | ||
"planName": "agoric-upgrade-10", | ||
"type": "Software Upgrade Proposal" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11", | ||
"sdkVersion": "36", | ||
"sdkImageTag": "36", | ||
"planName": "agoric-upgrade-11", | ||
"type": "Software Upgrade Proposal" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: COPY --link