diff --git a/.circleci/config.yml b/.circleci/config.yml index 44ec98450..ed8076483 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ workflows: context: main-builds filters: branches: - only: cristi/ci-test + only: cristi/ci-k8s-tor jobs: test_server: @@ -90,13 +90,21 @@ jobs: command: env SPECKLE_SERVER_PACKAGE=preview-service ./.circleci/build.sh - run: name: Deploy - command: ./.circleci/deploy.sh + command: | + ./.circleci/deploy.sh + if [[ "$CIRCLE_TAG" =~ ^v.* ]]; then + env K8S_CLUSTER=TOR1 K8S_NAMESPACE=${K8S_NAMESPACE_TOR1_1_RELEASE} ./.circleci/deploy_in_new_setup.sh + else + env K8S_CLUSTER=TOR1 K8S_NAMESPACE=${K8S_NAMESPACE_TOR1_1_LATEST} ./.circleci/deploy_in_new_setup.sh + fi - run: name: Test deployment command: | ./utils/test-deployment/install_prerequisites.sh - SPECKLE_SERVER=https://latest.speckle.dev if [[ "$CIRCLE_TAG" =~ ^v.* ]]; then - SPECKLE_SERVER=https://speckle.xyz + ./utils/test-deployment/run_tests.py https://speckle.xyz + ./utils/test-deployment/run_tests.py ${SPECKLE_URL_TOR1_1_RELEASE} + else + ./utils/test-deployment/run_tests.py https://latest.speckle.dev + ./utils/test-deployment/run_tests.py ${SPECKLE_URL_TOR1_1_LATEST} fi - ./utils/test-deployment/run_tests.py $SPECKLE_SERVER diff --git a/.circleci/deploy_in_new_setup.sh b/.circleci/deploy_in_new_setup.sh new file mode 100755 index 000000000..b0b4a20c0 --- /dev/null +++ b/.circleci/deploy_in_new_setup.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +set -e + +K8S_CLUSTER_CERTIFICATE_VARIABLE=K8S_${K8S_CLUSTER}_CERTIFICATE +K8S_CLUSTER_CERTIFICATE=${!K8S_CLUSTER_CERTIFICATE_VARIABLE} + +K8S_TOKEN_VARIABLE=K8S_${K8S_CLUSTER}_TOKEN +K8S_TOKEN=${!K8S_TOKEN_VARIABLE} + +K8S_SERVER_VARIABLE=K8S_${K8S_CLUSTER}_SERVER +K8S_SERVER=${!K8S_SERVER_VARIABLE} + +# K8S_NAMESPACE + +IMAGE_VERSION_TAG=$CIRCLE_SHA1 + +if [[ "$CIRCLE_TAG" =~ ^v.* ]]; then + IMAGE_VERSION_TAG=$CIRCLE_TAG +fi + +echo "$K8S_CLUSTER_CERTIFICATE" | base64 --decode > k8s_cert.crt + +# Update deployments +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + set image deployment/speckle-frontend main=$DOCKER_IMAGE_TAG-frontend:$IMAGE_VERSION_TAG + +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + set image deployment/speckle-server main=$DOCKER_IMAGE_TAG-server:$IMAGE_VERSION_TAG + +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + set image deployment/speckle-preview-service main=$DOCKER_IMAGE_TAG-preview-service:$IMAGE_VERSION_TAG + + +# Wait for rollout to complete +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + rollout status -w deployment/speckle-frontend --timeout=3m + +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + rollout status -w deployment/speckle-server --timeout=3m + +./kubectl \ + --kubeconfig=/dev/null \ + --server=$K8S_SERVER \ + --certificate-authority=k8s_cert.crt \ + --token=$K8S_TOKEN \ + --namespace=$K8S_NAMESPACE \ + rollout status -w deployment/speckle-preview-service --timeout=3m diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..eef98c031 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 2.2.+ | :white_check_mark: | +| < 2.2 | :x: | + +## Reporting a Vulnerability + +Hi! If you've found something off, we'd be more than happy if you would report it via security@speckle.systems. We will work together with you to correctly identify the cause and implement a fix. Thanks for helping make Speckle safer! diff --git a/packages/frontend/src/components/dialogs/ServerInviteDialog.vue b/packages/frontend/src/components/dialogs/ServerInviteDialog.vue index d04b7ccbb..189fc4e08 100644 --- a/packages/frontend/src/components/dialogs/ServerInviteDialog.vue +++ b/packages/frontend/src/components/dialogs/ServerInviteDialog.vue @@ -20,7 +20,11 @@ :rules="validation.emailRules" label="email" > - + Send invite @@ -32,6 +36,7 @@