Skip to content

CI: deploy-testnet.yml captures no contract addresses from deployment outputs — deployment summary is useless #200

Description

@k-deejah

Difficulty: Advanced

Problem

1. Each stellar contract deploy step in deploy-testnet.yml has an id but never captures the output
.github/workflows/deploy-testnet.yml lines 47–67: each deploy step has id: deploy-enrollment, id: deploy-identity, etc. but no echo "contract_id=$(stellar contract deploy ...)" >> $GITHUB_OUTPUT or equivalent. The contract address printed to stdout is discarded.

2. The deployment-summary.json artifact only contains run number and timestamp
Lines 63–65 write: {"run": ..., "network": "testnet", "timestamp": "..."}. No contract IDs, no admin public key, no network passphrase. Any downstream consumer of this artifact (backend configuration, SDK tests, operator runbooks) must manually look up contract addresses from the Stellar testnet explorer.

3. Deployed contracts are never initialized — lineproof-queue-factory requires initialize(admin) before any queue can be deployed through it
After deployment, no stellar contract invoke ... --fn initialize --arg ... step exists. Every LineProof contract requires an explicit initialize() call after deployment. Without it, any call to the factory (e.g., deploy_queue) will panic with "queue not initialized" or "not initialized".

Impact: The testnet deployment workflow produces uninitialized, unconfigured contracts at unknown addresses. No downstream system can consume the deployment. Every manual testnet deployment requires looking up addresses manually and calling initialize manually.

Proposed Solution

  • Capture each contract ID: CONTRACT_ID=$(stellar contract deploy ... 2>&1 | grep -oP 'C[A-Z0-9]{55}') and write to $GITHUB_OUTPUT.
  • Write all five contract IDs to deployment-summary.json.
  • Add stellar contract invoke --fn initialize steps for factory and identity contracts after deployment.
  • Upload the summary as a workflow artifact AND post it as a job summary (>> $GITHUB_STEP_SUMMARY).

Acceptance Criteria

  • Each deploy step captures contract ID into step output
  • deployment-summary.json includes all five contract IDs, admin public key, network
  • stellar contract invoke --fn initialize called for factory and identity after deployment
  • Summary posted to GitHub Actions job summary ($GITHUB_STEP_SUMMARY)
  • Summary artifact retained for 30 days
  • A downstream CI step can read the summary and configure the backend env file

Contributor Note

If assigned, your PR must show a sample deployment-summary.json with real contract IDs and explain how to extract the contract ID from stellar contract deploy stdout output.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions