Compare commits

..

11 Commits
main ... main

Author SHA1 Message Date
df579f3ba5 Update package.json
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m41s
2024-08-21 18:26:05 +00:00
aa3b393d7a Update package.json
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m41s
2024-08-21 17:58:19 +00:00
ed9c88c110 Update package.json
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m40s
2024-08-21 16:48:23 +00:00
a8c3a81621 Update package.json
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m36s
2024-08-21 16:45:08 +00:00
a29fb929fd Update package.json
All checks were successful
Publish ApplicationRecord to Registry / cns_publish (push) Successful in 1m35s
2024-08-21 16:03:59 +00:00
fb6f7e5778 Update scripts/request-app-deployment.sh
Some checks failed
Publish ApplicationRecord to Registry / cns_publish (push) Has been cancelled
2024-08-21 16:03:14 +00:00
21a21fa3a8 Update scripts/publish-app-record.sh
Some checks failed
Publish ApplicationRecord to Registry / cns_publish (push) Has been cancelled
2024-08-21 16:02:42 +00:00
faadcb6d45 Update .gitea/workflows/publish.yaml
Some checks failed
Publish ApplicationRecord to Registry / cns_publish (push) Failing after 1m1s
2024-08-21 15:54:28 +00:00
61c97278e6 Update .gitea/workflows/publish.yaml 2024-08-21 15:53:24 +00:00
b73fffa4a4 Update scripts/request-app-deployment.sh 2024-08-21 15:42:30 +00:00
77a1d9f702 Update scripts/request-app-deployment.sh 2024-08-21 15:40:55 +00:00
7 changed files with 16 additions and 99 deletions

View File

@ -1,42 +0,0 @@
name: Test Encrypted Config
on:
push:
branches: '*'
paths:
- '!**'
- '.gitea/workflows/triggers/encrypted'
env:
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_VAASL_LACONIC_USER_KEY }}
CERC_REGISTRY_BOND_ID: ${{ secrets.CICD_VAASL_LACONIC_BOND_ID }}
CERC_REGISTRY_DEPLOYER_LRN: ${{ vars.CERC_REGISTRY_DEPLOYER_LRN }}
CERC_REGISTRY_DEPLOYMENT_HOSTNAME: ${{ vars.CERC_REGISTRY_DEPLOYMENT_HOSTNAME }}-crypt
CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_USER_KEY }}
CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_BOND_ID }}
CERC_REGISTRY_DEPLOYMENT_REQUEST_PAYMENT_TO: ${{ secrets.CICD_VAASL_DEPLOYMENT_REQUEST_PAYMENT_TO }}
jobs:
cns_publish:
runs-on: ubuntu-latest
steps:
- name: "Clone project repository"
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: "Enable Yarn"
run: corepack enable
- name: "Install registry CLI"
run: |
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
npm install -g @cerc-io/laconic-registry-cli
- name: "Install jq and gpg"
run: apt -y update && apt -y install jq gpg
- name: "Install laconic-so"
run: |
curl -LO https://git.vdb.to/cerc-io/stack-orchestrator/releases/download/latest/laconic-so
chmod +x ./laconic-so
mv ./laconic-so /usr/bin/laconic-so
- name: "Request Deployment w/ Encrypted Config"
run: scripts/request-app-deployment-encrypted.sh

View File

@ -2,6 +2,10 @@ name: Publish ApplicationRecord to Registry
on:
release:
types: [published]
push:
branches:
- main
- '*'
env:
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_VAASL_LACONIC_USER_KEY }}

View File

@ -1,2 +0,0 @@
1
2

View File

@ -1,7 +1,7 @@
{
"name": "@cerc-io/webapp-hello-world",
"version": "0.1.3",
"repository": "https://git.vdb.to/cerc-io/webapp-hello-world",
"name": "@lcn-demo/webapp-hello-world-payments",
"version": "0.1.6",
"repository": "https://git.vdb.to/zramsay/webapp-hello-world-payment",
"scripts": {
"dev": "next dev",
"build": "next build",

View File

@ -20,11 +20,11 @@ rcd_app_version=$(jq -r '.version' package.json | sed 's/null//')
cat <<EOF > "$CONFIG_FILE"
services:
registry:
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:26657}'
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:9473/api}'
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic-08062024}
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-https://laconicd.laconic.com}'
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://laconicd.laconic.com/api}'
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
gas: 900000
fees: 900000alnt
fees: 1900000alnt
EOF
next_ver=$(laconic -c $CONFIG_FILE registry record list --type ApplicationRecord --all --name "$rcd_name" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$CERC_REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}')

View File

@ -1,43 +0,0 @@
#!/bin/bash
set -e
CONFIG_FILE=`mktemp`
ENV_FILE=`mktemp`
rcd_name=$(jq -r '.name' package.json | sed 's/null//' | sed 's/^@//')
rcd_app_version=$(jq -r '.version' package.json | sed 's/null//')
cat <<EOF > "$CONFIG_FILE"
services:
registry:
userKey: ${CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY}
bondId: ${CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID}
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:26657}'
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:9473/api}'
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic-08062024}
gas: 900000
fees: 900000alnt
EOF
if [ -z "$CERC_REGISTRY_APP_LRN" ]; then
authority=$(echo "$rcd_name" | cut -d'/' -f1 | sed 's/@//')
app=$(echo "$rcd_name" | cut -d'/' -f2-)
CERC_REGISTRY_APP_LRN="lrn://$authority/applications/$app"
fi
cat >$ENV_FILE <<EOF
CERC_TEST_WEBAPP_CONFIG1="this is an encrypted string"
CERC_TEST_WEBAPP_CONFIG2="this is also an encrypted string"
CERC_WEBAPP_DEBUG="$CERC_REGISTRY_APP_LRN - CRYPT"
EOF
laconic-so request-webapp-deployment \
--laconic-config $CONFIG_FILE \
--deployer $CERC_REGISTRY_DEPLOYER_LRN \
--app $CERC_REGISTRY_APP_LRN \
--env-file $ENV_FILE \
--dns $CERC_REGISTRY_DEPLOYMENT_HOSTNAME \
--make-payment auto
rm -f $ENV_FILE $CONFIG_FILE

View File

@ -11,9 +11,9 @@ rcd_app_version=$(jq -r '.version' package.json | sed 's/null//')
cat <<EOF > "$CONFIG_FILE"
services:
registry:
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:26657}'
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-http://testnet-a-1.dev.vaasl.io:9473/api}'
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic-08062024}
rpcEndpoint: '${CERC_REGISTRY_RPC_ENDPOINT:-https://laconicd.laconic.com}'
gqlEndpoint: '${CERC_REGISTRY_GQL_ENDPOINT:-https://laconicd.laconic.com/api}'
chainId: ${CERC_REGISTRY_CHAIN_ID:-laconic_9000-1}
gas: 900000
fees: 900000alnt
EOF
@ -25,7 +25,7 @@ if [ -z "$CERC_REGISTRY_APP_LRN" ]; then
fi
PAYMENT_TX=$(laconic -c $CONFIG_FILE registry tokens send \
--address $CERC_REGISTRY_DEPLOYMENT_REQUEST_PAYMENT_TO \
--address laconic13eq42rat3aurnfj6pu32yl00zyhl8sent97efe \
--user-key "${CERC_REGISTRY_DEPLOYMENT_REQUEST_USER_KEY}" \
--bond-id "${CERC_REGISTRY_DEPLOYMENT_REQUEST_BOND_ID}" \
--type alnt \
@ -45,7 +45,7 @@ record:
application: "$CERC_REGISTRY_APP_LRN@$rcd_app_version"
dns: "$CERC_REGISTRY_DEPLOYMENT_HOSTNAME"
deployment: "$CERC_REGISTRY_DEPLOYMENT_LRN"
to: $CERC_REGISTRY_DEPLOYMENT_REQUEST_PAYMENT_TO
to: laconic13eq42rat3aurnfj6pu32yl00zyhl8sent97efe
payment: $PAYMENT_TX
config:
env: