Skip to content

Commit

Permalink
chore(upgrade-test): rename upgrade and remove unneeded actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mhofman committed Dec 15, 2023
1 parent 845360e commit 552879a
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 159 deletions.
26 changes: 12 additions & 14 deletions packages/deployment/upgrade-test/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Defaults
ARG BASE_IMAGE=ghcr.io/agoric/agoric-3-proposals:pr-33
# Use a stable base image to prevent this test from breaking when
# new upgrade proposals are added to a3p.
# https://github.com/Agoric/agoric-3-proposals/pull/47 adds upgrade-13 to the base a3p image
# TODO: When https://github.com/Agoric/agoric-3-proposals/issues/25 is resolved,
# use a tagged upgrade-13 layer instead
ARG BASE_IMAGE=ghcr.io/agoric/agoric-3-proposals:pr-47
ARG DEST_IMAGE=ghcr.io/agoric/agoric-sdk:dev

# TODO different naming scheme for upgrade handler (in app.go) and the image name

# UPGRADE
FROM ${BASE_IMAGE} as propose-agoric-upgrade-13
ARG UPGRADE_INFO
ENV THIS_NAME= UPGRADE_TO="agoric-upgrade-13" UPGRADE_INFO=${UPGRADE_INFO}

WORKDIR /usr/src/agoric-sdk/
COPY --chmod=755 ./env_setup.sh ./start_to_to.sh ./upgrade-test-scripts/
SHELL ["/bin/bash", "-c"]
RUN . ./upgrade-test-scripts/start_to_to.sh
# BASE stage for the `COPY --from` below
FROM ${BASE_IMAGE} as base-wallet-factory-upgrade

# DEST (TEST)
#this is agoric-upgrade-13
#this is wallet-factory-upgrade
ARG DEST_IMAGE
FROM ${DEST_IMAGE} as agoric-upgrade-13
ENV THIS_NAME=agoric-upgrade-13 USE_JS=1
COPY --from=propose-agoric-upgrade-13 /root/.agoric /root/.agoric
FROM ${DEST_IMAGE} as wallet-factory-upgrade
ENV THIS_NAME=wallet-factory-upgrade USE_JS=1
COPY --from=base-wallet-factory-upgrade /root/.agoric /root/.agoric
# start-chain boilerplate
WORKDIR /usr/src/agoric-sdk/
COPY ./env_setup.sh ./start_to_to.sh ./package.json ./*.js ./upgrade-test-scripts/
Expand Down
11 changes: 4 additions & 7 deletions packages/deployment/upgrade-test/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
REPOSITORY = agoric/upgrade-test
# use :dev (latest prerelease image) unless we build local sdk
DEST_IMAGE ?= $(if $(findstring local_sdk,$(MAKECMDGOALS)),ghcr.io/agoric/agoric-sdk:latest,ghcr.io/agoric/agoric-sdk:dev)
TARGET?=agoric-upgrade-13
TARGET?=wallet-factory-upgrade
dockerLabel?=$(TARGET)
@echo target: $(TARGET)

Expand All @@ -12,11 +12,8 @@ BUILD = docker build --progress=plain $(BUILD_OPTS) \
--build-arg DEST_IMAGE=$(DEST_IMAGE) \
-f Dockerfile upgrade-test-scripts

propose-agoric-upgrade-13:
$(BUILD) --target propose-agoric-upgrade-13 -t $(REPOSITORY):propose-agoric-upgrade-13

agoric-upgrade-13: propose-agoric-upgrade-13
$(BUILD) --target agoric-upgrade-13 -t $(REPOSITORY):agoric-upgrade-13
wallet-factory-upgrade:
$(BUILD) -t $(REPOSITORY):wallet-factory-upgrade

# build main bootstrap
build: $(TARGET)
Expand All @@ -38,4 +35,4 @@ run_test:
shell:
docker exec -it `docker ps --latest --format '{{json .}}' | jq -r .Names` bash

.PHONY: local_sdk agoric-upgrade-13 build build_test run
.PHONY: local_sdk wallet-factory-upgrade build build_test run

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"scripts": {
"agops": "yarn --cwd /usr/src/agoric-sdk/ --silent agops",
"upgrade-tests": "ava --serial agoric-upgrade*/**/pre.test.js agoric-upgrade*/**/actions.test.js agoric-upgrade*/**/post.test.js"
"upgrade-tests": "ava --serial */**/pre.test.js */**/actions.test.js */**/post.test.js"
},
"ava": {
"files": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import test from 'ava';

0 comments on commit 552879a

Please sign in to comment.