diff --git a/.gitea/workflows/deploy-frontend.yaml b/.gitea/workflows/deploy-frontend.yaml index 40cd5b6d..ccf0f048 100644 --- a/.gitea/workflows/deploy-frontend.yaml +++ b/.gitea/workflows/deploy-frontend.yaml @@ -3,7 +3,7 @@ name: Deploy Snowball frontend on: push: branches: - - main + - ag-frontend-ci jobs: deploy: @@ -43,7 +43,7 @@ jobs: - name: Run Deploy Script env: REGISTRY_BOND_ID: ${{ secrets.REGISTRY_BOND_ID }} - DEPLOYER_LRN: ${{ secrets.DEPLOYER_LRN }} - AUTHORITY: ${{ secrets.AUTHORITY }} + DEPLOYER_LRN: lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io + AUTHORITY: laconic-deploy run: | packages/deployer/deploy-frontend.sh diff --git a/packages/deployer/deploy-frontend.sh b/packages/deployer/deploy-frontend.sh index b210d8bd..3d4b9582 100755 --- a/packages/deployer/deploy-frontend.sh +++ b/packages/deployer/deploy-frontend.sh @@ -5,6 +5,8 @@ echo "Using REGISTRY_BOND_ID: $REGISTRY_BOND_ID" echo "Using DEPLOYER_LRN: $DEPLOYER_LRN" echo "Using AUTHORITY: $AUTHORITY" +exit 0 + # Repository URL REPO_URL="https://git.vdb.to/cerc-io/snowballtools-base" @@ -122,8 +124,8 @@ record: dns: deploy config: env: - LACONIC_HOSTED_CONFIG_server_url: https://deploy-backend.apps.vaasl.io - LACONIC_HOSTED_CONFIG_github_clientid: Ov23liaet4yc0KX0iM1c + LACONIC_HOSTED_CONFIG_server_url: https://deploy-backend.laconic.com + LACONIC_HOSTED_CONFIG_github_clientid: Ov23li4NtYybQlF6u5Dk LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: laconic-templates/test-progressive-web-app LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: laconic-templates/image-upload-pwa-example LACONIC_HOSTED_CONFIG_wallet_connect_id: 63cad7ba97391f63652161f484670e15 diff --git a/packages/deployer/deploy-frontend.staging.sh b/packages/deployer/deploy-frontend.vaasl.sh similarity index 59% rename from packages/deployer/deploy-frontend.staging.sh rename to packages/deployer/deploy-frontend.vaasl.sh index 09ebb820..b210d8bd 100755 --- a/packages/deployer/deploy-frontend.staging.sh +++ b/packages/deployer/deploy-frontend.vaasl.sh @@ -1,5 +1,10 @@ #!/bin/bash +source .env +echo "Using REGISTRY_BOND_ID: $REGISTRY_BOND_ID" +echo "Using DEPLOYER_LRN: $DEPLOYER_LRN" +echo "Using AUTHORITY: $AUTHORITY" + # Repository URL REPO_URL="https://git.vdb.to/cerc-io/snowballtools-base" @@ -12,63 +17,33 @@ PACKAGE_VERSION=$(jq -r '.version' ../frontend/package.json) # Current date and time for note CURRENT_DATE_TIME=$(date -u) -CONFIG_FILE=config.staging.yml -REGISTRY_BOND_ID="098c906850b87412f02200e41f449bc79e055eab77acfef32c0b22443bb46661" +CONFIG_FILE=config.yml # Reference: https://git.vdb.to/cerc-io/test-progressive-web-app/src/branch/main/scripts # Get latest version from registry and increment application-record version -NEW_APPLICATION_VERSION=$(yarn --silent laconic -c $CONFIG_FILE registry record list --type ApplicationRecord --all --name "staging-snowballtools-base-frontend" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') +NEW_APPLICATION_VERSION=$(yarn --silent laconic -c $CONFIG_FILE registry record list --type ApplicationRecord --all --name "deploy-frontend" 2>/dev/null | jq -r -s ".[] | sort_by(.createTime) | reverse | [ .[] | select(.bondId == \"$REGISTRY_BOND_ID\") ] | .[0].attributes.version" | awk -F. -v OFS=. '{$NF += 1 ; print}') if [ -z "$NEW_APPLICATION_VERSION" ] || [ "1" == "$NEW_APPLICATION_VERSION" ]; then # Set application-record version if no previous records were found NEW_APPLICATION_VERSION=0.0.1 fi -# Generate application-deployment-request.yml -cat >./staging-records/application-deployment-request.yml <./staging-records/application-record.yml <./records/application-record.yml <./records/application-deployment-request.yml <