capactio / capact

Simple way to manage applications and infrastructure.
https://capact.io
Apache License 2.0
80 stars 19 forks source link

Remove copied code from argo watch cmd #541

Closed mszostok closed 2 years ago

mszostok commented 2 years ago

Description

Changes proposed in this pull request:

Ready to copy-paste script

To reproduce the same result for newest Argo version, run:

# clone repo, the 'gh' CLI sets already a proper remote sources
gh repo clone capactio/argo-workflows

# Export version tag
export TAG="{tag}" # e.g. v3.2.2
git co $TAG
git co -b $TAG-for-capact
git cherry-pick 3147feae82d3a0114beb5d50c430e49480349cbb
git push -u origin $TAG-for-capact

Now you can update replace in go.mod file: https://github.com/capactio/capact/blob/d7724224548b5fcdc4e747a39f97e0705d427cfe/go.mod#L93

Findings

Testing

  1. Create cluster:

    #!/usr/bin/env bash
    export DISABLE_MONITORING_INSTALLATION=true
    export DISABLE_K3D_REGISTRY=false
    export ENABLE_POPULATOR=true
    export CLUSTER_TYPE=k3d
    
    if ! k3d cluster get | grep -q 'dev-capact'; then
    make dev-cluster
    else
    make dev-cluster-update
    fi
  2. Create params:
    cat <<EOF > /tmp/install-params.yaml
    input-parameters:
     superuser:
       username: superuser
       password: super
     defaultDBName: postgres
    EOF
  3. Create action:
    capact act create cap.interface.database.postgresql.install --name psql --parameters-from-file=/tmp/install-params.yaml
  4. Run and watch:
    capact act run psql
    capact act watch psql

    NOTE: Test the ctrl+c.

Related issue(s)

Fix: https://github.com/capactio/capact/issues/482