diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 4452f2286..18ff7a379 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -300,77 +300,10 @@ jobs:
repository: ${{ github.repository }}
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
- # ##############################################################################
- # # JOB: KUBERNETES DEPLOY ACTUAL/LATEST VERSION ######################################
- # ##############################################################################
- # kubernetes_deploy:
- # # see example https://github.com/do-community/example-doctl-action
- # # see example https://github.com/do-community/example-doctl-action/blob/main/.github/workflows/workflow.yaml
- # name: Kubernetes deploy of latest version to stage.ocelot.social cluster at DigitalOcean
- # runs-on: ubuntu-latest
- # needs: [upload_to_dockerhub]
- # steps:
- # ##########################################################################
- # # CHECKOUT CODE ##########################################################
- # ##########################################################################
- # - name: Checkout code
- # uses: actions/checkout@v3
- # ##########################################################################
- # # SET ENVS ###############################################################
- # ##########################################################################
- # - name: ENV - VERSION
- # run: echo "VERSION=$(node -p -e "require('./package.json').version")" >> $GITHUB_ENV
- # - name: ENV - BUILD_VERSION
- # run: echo "BUILD_VERSION=${VERSION}-${GITHUB_RUN_NUMBER}" >> $GITHUB_ENV
- # ##########################################################################
- # # Install DigitalOceans doctl and set kubeconfig #########################
- # ##########################################################################
- # - name: Install doctl
- # uses: digitalocean/action-doctl@v2
- # with:
- # token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- # - name: Save DigitalOcean kubeconfig with short-lived credentials
- # run: doctl kubernetes cluster kubeconfig save --expiry-seconds 600 cluster-stage-ocelot-social
- # ##########################################################################
- # # Deploy new Docker images to DigitalOcean Kubernetes cluster ############
- # ##########################################################################
- # # - name: Deploy 'latest' to DigitalOcean Kubernetes
- # # run: |
- # # kubectl -n default set image deployment/ocelot-webapp container-ocelot-webapp=ocelotsocialnetwork/webapp:latest
- # # kubectl -n default rollout restart deployment/ocelot-webapp
- # # kubectl -n default set image deployment/ocelot-backend container-ocelot-backend=ocelotsocialnetwork/backend:latest
- # # kubectl -n default rollout restart deployment/ocelot-backend
- # # kubectl -n default set image deployment/ocelot-maintenance container-ocelot-maintenance=ocelotsocialnetwork/maintenance:latest
- # # kubectl -n default rollout restart deployment/ocelot-maintenance
- # # kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=ocelotsocialnetwork/neo4j-community:latest
- # # kubectl -n default rollout restart deployment/ocelot-neo4j
- # - name: Deploy actual version '$BUILD_VERSION' to DigitalOcean Kubernetes
- # run: |
- # kubectl -n default set image deployment/ocelot-webapp container-ocelot-webapp=ocelotsocialnetwork/webapp:$BUILD_VERSION
- # kubectl -n default rollout restart deployment/ocelot-webapp
- # kubectl -n default set image deployment/ocelot-backend container-ocelot-backend=ocelotsocialnetwork/backend:$BUILD_VERSION
- # kubectl -n default rollout restart deployment/ocelot-backend
- # kubectl -n default set image deployment/ocelot-maintenance container-ocelot-maintenance=ocelotsocialnetwork/maintenance:$BUILD_VERSION
- # kubectl -n default rollout restart deployment/ocelot-maintenance
- # kubectl -n default set image deployment/ocelot-neo4j container-ocelot-neo4j=ocelotsocialnetwork/neo4j-community:$BUILD_VERSION
- # kubectl -n default rollout restart deployment/ocelot-neo4j
- # # because this step 'kubectl -n default rollout status deployment/* --timeout=600s' does not work as expected
- # # and we need the pods to be up again for cleaning and seeding the Neo4j database and the backend.
- # # !!! this is not a perfect solution !!!
- # # deployments are regularly up again after 3 minutes and 10 seconds
- # - name: Sleep for 4 minutes, means 240 seconds
- # run: sleep 240s
- # shell: bash
- # - name: Verify deployment and wait for the pods of each deployment to get ready for cleaning and seeding of the database
- # run: |
- # kubectl -n default rollout status deployment/ocelot-backend --timeout=600s
- # kubectl -n default rollout status deployment/ocelot-neo4j --timeout=600s
- # kubectl -n default rollout status deployment/ocelot-maintenance --timeout=600s
- # kubectl -n default rollout status deployment/ocelot-webapp --timeout=600s
- # - name: Run migrations for Neo4j database via backend for staging
- # run: |
- # kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "yarn prod:migrate up"
- # - name: Reset and seed Neo4j database via backend for staging
- # # db cleaning and seeding is only possible in production if env 'PRODUCTION_DB_CLEAN_ALLOW=true' is set in deployment
- # run: |
- # kubectl -n default exec -it $(kubectl -n default get pods | grep ocelot-backend | awk '{ print $1 }') -- /bin/sh -c "node --experimental-repl-await dist/db/clean.js && node --experimental-repl-await dist/db/seed.js"
\ No newline at end of file
+ - name: Repository Dispatch stage.ocelot.social
+ uses: peter-evans/repository-dispatch@v2
+ with:
+ token: ${{ secrets.OCELOT_PUBLISH_EVENT_PAT }} # this token is required to access the other repository
+ event-type: trigger-build-success
+ repository: 'Ocelot-Social-Community/stage.ocelot.social'
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "VERSION": "${VERSION}", "BUILD_DATE": "${BUILD_DATE}", "BUILD_COMMIT": "${BUILD_COMMIT}", "BUILD_VERSION": "${BUILD_VERSION}"}'
\ No newline at end of file
diff --git a/deployment/scripts/cluster.upgrade.sh b/deployment/scripts/cluster.upgrade.sh
index 2502a778a..1aec2cf18 100755
--- a/deployment/scripts/cluster.upgrade.sh
+++ b/deployment/scripts/cluster.upgrade.sh
@@ -7,7 +7,13 @@ SCRIPT_DIR=$(dirname $SCRIPT_PATH)
# configuration
CONFIGURATION=${CONFIGURATION:-"example"}
KUBECONFIG=${KUBECONFIG:-${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubeconfig.yaml}
-VALUES=${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubernetes/values.yaml
+VALUES=${SCRIPT_DIR}/../configurations/${CONFIGURATION}/kubernetes/values.
+DOCKERHUB_OCELOT_TAG=${DOCKERHUB_OCELOT_TAG:-"latest"}
# upgrade with helm
-helm --kubeconfig=${KUBECONFIG} upgrade ocelot --values ${VALUES} ${SCRIPT_DIR}/../src/kubernetes/ --debug --timeout 10m
\ No newline at end of file
+helm --kubeconfig=${KUBECONFIG} upgrade ocelot \
+ --values ${VALUES} \
+ --set appVersion="${DOCKERHUB_OCELOT_TAG}"
+ ${SCRIPT_DIR}/../src/kubernetes/ \
+ --debug \
+ --timeout 10m
\ No newline at end of file
diff --git a/webapp/components/Button/JoinLeaveButton.vue b/webapp/components/Button/JoinLeaveButton.vue
index 9bcb5042a..152039eb0 100644
--- a/webapp/components/Button/JoinLeaveButton.vue
+++ b/webapp/components/Button/JoinLeaveButton.vue
@@ -6,6 +6,7 @@
:icon="icon"
:filled="isMember && !hovered"
:danger="isMember && hovered"
+ v-tooltip="tooltip"
@mouseenter.native="onHover"
@mouseleave.native="hovered = false"
@click.prevent="toggle"
@@ -24,6 +25,7 @@ export default {
group: { type: Object, required: true },
userId: { type: String, required: true },
isMember: { type: Boolean, required: true },
+ isNonePendingMember: { type: Boolean, required: true },
disabled: { type: Boolean, default: false },
loading: { type: Boolean, default: false },
},
@@ -35,17 +37,33 @@ export default {
},
computed: {
icon() {
- if (this.isMember && this.hovered) {
- return 'close'
- } else {
- return this.isMember ? 'check' : 'plus'
+ if (this.isMember) {
+ if (this.isNonePendingMember) {
+ return this.hovered ? 'close' : 'check'
+ } else {
+ return this.hovered ? 'close' : 'question-circle'
+ }
}
+ return 'plus'
},
label() {
if (this.isMember) {
- return this.$t('group.joinLeaveButton.iAmMember')
- } else {
- return this.$t('group.joinLeaveButton.join')
+ if (this.isNonePendingMember) {
+ return this.hovered
+ ? this.$t('group.joinLeaveButton.leave')
+ : this.$t('group.joinLeaveButton.iAmMember')
+ } else {
+ return this.$t('group.joinLeaveButton.pendingMember')
+ }
+ }
+ return this.$t('group.joinLeaveButton.join')
+ },
+ tooltip() {
+ return {
+ content: this.$t('group.joinLeaveButton.tooltip'),
+ placement: 'right',
+ show: this.isMember && !this.isNonePendingMember && this.hovered,
+ trigger: this.isMember && !this.isNonePendingMember ? 'hover' : 'manual',
}
},
},
diff --git a/webapp/components/ContributionForm/ContributionForm.vue b/webapp/components/ContributionForm/ContributionForm.vue
index 0428b2e23..8863fbc8a 100644
--- a/webapp/components/ContributionForm/ContributionForm.vue
+++ b/webapp/components/ContributionForm/ContributionForm.vue
@@ -41,7 +41,7 @@
{{ formData.title.length }}/{{ formSchema.title.max }}