From 161cb598c4a8be5d3f291b8fbc628f1052871a1b Mon Sep 17 00:00:00 2001 From: Roberto Alsina Date: Wed, 27 Jul 2022 11:11:38 -0300 Subject: [PATCH] Separate build/deploy --- nombres/build.sh | 15 +++++++++++++++ nombres/deploy.sh | 12 +----------- 2 files changed, 16 insertions(+), 11 deletions(-) create mode 100755 nombres/build.sh diff --git a/nombres/build.sh b/nombres/build.sh new file mode 100755 index 0000000..8f9bd97 --- /dev/null +++ b/nombres/build.sh @@ -0,0 +1,15 @@ +#!/bin/sh -x +set -e + +# My FAAS is arm64, so need to install this to cross-compile +docker run --rm --privileged \ + multiarch/qemu-user-static \ + --reset -p yes + +# Build and deploy +if [ ! -d templates] +then + faas-cli template store pull python3-http +fi +faas-cli publish -f nombres.yml --platforms linux/arm64 --build-arg 'TEST_ENABLED=false' +faas-cli deploy -f nombres.yml diff --git a/nombres/deploy.sh b/nombres/deploy.sh index 1d00e2d..5187ca0 100755 --- a/nombres/deploy.sh +++ b/nombres/deploy.sh @@ -1,15 +1,5 @@ #!/bin/sh -x set -e -# My FAAS is arm64, so need to install this to cross-compile -docker run --rm --privileged \ - multiarch/qemu-user-static \ - --reset -p yes - -# Build and deploy -if [! -d templates] -then - faas-cli template store pull python3-http -fi -faas-cli publish -f nombres.yml --platforms linux/arm64 --build-arg 'TEST_ENABLED=false' +pass faas.ralsina.me | faas-cli login --password-stdin faas-cli deploy -f nombres.yml