Giter Club home page Giter Club logo

Comments (2)

nmoutschen avatar nmoutschen commented on September 21, 2024

Hey @marcarvar ! Thanks a lot for creating this issue.

Could you try this command to see if it outputs it into a localised format or not?

type -t check-deps_cloudformation

-t should only return the type (e.g. function), but I'm unsure if it localises it or not.

from aws-serverless-ecommerce-platform.

marcarvar avatar marcarvar commented on September 21, 2024

Hello @nmoutschen, thank you for your quick answers.

With the -t option the result is not generated in a localized format.
I attach the execution of the command in the same Bash instance:

~$ type -t check-deps_cloudformation
function
~$ type check-deps_cloudformation
check-deps_cloudformation: es una función
check-deps_cloudformation () 
{ 
    dependencies=$(yq -r ' .dependencies[]? ' $service_dir/metadata.yaml);
    echo "$dependencies" | grep --color=auto -q \* && { 
        dependencies="$($ROOT/tools/services --exclude ${SERVICE})"
    };
    echo dependencies=$dependencies;
    for dependency in $dependencies;
    do
        stack_name=${DOMAIN:-ecommerce}-${ENVIRONMENT:-dev}-${dependency};
        aws cloudformation describe-stacks --stack-name $stack_name | jq -r ' .Stacks |
                map(
                    .StackStatus
                    | test("(CREATE_FAILED|ROLLBACK_IN_PROGRESS|ROLLBACK_COMPLETE|ROLLBACK_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED)")
                    | not
                ) ' | grep --color=auto -q "true" && { 
            FOUND=true
        };
        if [ -z $FOUND ]; then
            echo "Stack $stack_name not found";
            stack_name=${DOMAIN:-ecommerce}-${dependency};
            aws cloudformation describe-stacks --stack-name $stack_name | jq -r ' .Stacks |
                    map(
                        .StackStatus
                        | test("(CREATE_FAILED|ROLLBACK_IN_PROGRESS|ROLLBACK_COMPLETE|ROLLBACK_FAILED|DELETE_IN_PROGRESS|DELETE_COMPLETE|DELETE_FAILED)")
                        | not
                    ) ' | grep --color=auto -q "true" && { 
                FOUND=true
            };
        fi;
        if [ -z $FOUND ]; then
            echo "Stack $stack_name not found";
            exit 1;
        fi;
    done
}

With that change should be solved.

from aws-serverless-ecommerce-platform.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.