Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
dionisio-bot[bot] authored Nov 22, 2024
1 parent 1eca1fb commit d80cb71
Show file tree
Hide file tree
Showing 1,084 changed files with 10,601 additions and 11,794 deletions.
5 changes: 0 additions & 5 deletions .changeset/clean-flies-collect.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/curvy-flies-greet.md

This file was deleted.

13 changes: 0 additions & 13 deletions .changeset/fair-colts-remain.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/forty-gorillas-kneel.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/light-terms-ring.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/nervous-rivers-fry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/old-coins-bow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/real-jeans-worry.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/serious-mice-film.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/smart-radios-reflect.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/spicy-spiders-search.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/two-guests-tan.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/weak-trees-exercise.md

This file was deleted.

91 changes: 91 additions & 0 deletions .github/actions/build-docker-image/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 'Build Docker image'
description: 'Build Rocket.Chat Docker image'

inputs:
root-dir:
required: true
docker-tag:
required: true
release:
required: true
username:
required: false
password:
required: false
deno-version:
required: true
type: string

outputs:
image-name:
value: ${{ steps.build-image.outputs.image-name }}

runs:
using: composite
steps:
# - shell: bash
# name: Free disk space
# run: |
# sudo swapoff -a
# sudo rm -f /swapfile
# sudo apt clean
# docker rmi $(docker image ls -aq)
# df -h

- shell: bash
id: build-image
run: |
cd ${{ inputs.root-dir }}
LOWERCASE_REPOSITORY=$(echo "${{ github.repository_owner }}" | tr "[:upper:]" "[:lower:]")
IMAGE_NAME_BASE="ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${{ inputs.docker-tag }}"
IMAGE_NAME="${IMAGE_NAME_BASE}.${{ inputs.release }}"
echo "Build Docker image ${IMAGE_NAME}"
DOCKER_PATH="${GITHUB_WORKSPACE}/apps/meteor/.docker"
if [[ '${{ inputs.release }}' = 'preview' ]]; then
DOCKER_PATH="${DOCKER_PATH}-mongo"
fi;
DOCKERFILE_PATH="${DOCKER_PATH}/Dockerfile"
if [[ '${{ inputs.release }}' = 'debian' ]]; then
DOCKERFILE_PATH="${DOCKERFILE_PATH}.${{ inputs.release }}"
fi;
echo "Copy Dockerfile for release: ${{ inputs.release }}"
cp $DOCKERFILE_PATH ./Dockerfile
if [ -e ${DOCKER_PATH}/entrypoint.sh ]; then
cp ${DOCKER_PATH}/entrypoint.sh .
fi;
echo "Build ${{ inputs.release }} Docker image"
docker build --build-arg DENO_VERSION=${{ inputs.deno-version }} -t $IMAGE_NAME .
echo "image-name-base=${IMAGE_NAME_BASE}" >> $GITHUB_OUTPUT
echo "image-name=${IMAGE_NAME}" >> $GITHUB_OUTPUT
- name: Login to GitHub Container Registry
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ inputs.username }}
password: ${{ inputs.password }}

- name: Publish image
shell: bash
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop'
run: |
echo "Push Docker image: ${{ steps.build-image.outputs.image-name }}"
docker push ${{ steps.build-image.outputs.image-name }}
if [[ '${{ inputs.release }}' = 'official' ]]; then
echo "Push release official without variant"
docker tag ${{ steps.build-image.outputs.image-name }} ${{ steps.build-image.outputs.image-name-base }}
docker push ${{ steps.build-image.outputs.image-name-base }}
fi;
4 changes: 2 additions & 2 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ inputs:
platform:
required: false
description: 'Platform'
default: 'alpine'
type: string
build-containers:
required: false
description: 'Containers to build along with Rocket.Chat'
Expand Down Expand Up @@ -84,7 +84,7 @@ runs:
- run: yarn build
if: inputs.setup == 'true'
shell: bash
- if: ${{ inputs.platform == 'alpine' }}
- if: ${{ inputs.platform == 'official' }}
uses: actions/cache@v3
with:
path: /tmp/build/matrix-sdk-crypto.linux-x64-musl.node
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup NodeJS
uses: ./.github/actions/setup-node
with:
node-version: 20.18.0
node-version: 20.17.0
deno-version: 1.37.1
cache-modules: true
install: true
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ on:
rc-docker-tag:
required: true
type: string
rc-dockerfile-debian:
required: true
type: string
rc-docker-tag-debian:
required: true
type: string
gh-docker-tag:
required: true
type: string
Expand Down Expand Up @@ -77,16 +83,16 @@ jobs:
test:
runs-on: ubuntu-20.04
env:
RC_DOCKERFILE: ${{ inputs.rc-dockerfile }}.${{ (matrix.mongodb-version == '7.0' && 'debian' && false) || 'alpine' }}
RC_DOCKER_TAG: ${{ inputs.rc-docker-tag }}.${{ (matrix.mongodb-version == '7.0' && 'debian' && false) || 'alpine' }}
RC_DOCKERFILE: ${{ matrix.mongodb-version == '7.0' && inputs.rc-dockerfile-debian || inputs.rc-dockerfile }}
RC_DOCKER_TAG: ${{ matrix.mongodb-version == '7.0' && inputs.rc-docker-tag-debian || inputs.rc-docker-tag }}

strategy:
fail-fast: false
matrix:
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
shard: ${{ fromJSON(inputs.shard) }}

name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }}) - ${{ (matrix.mongodb-version == '7.0' && 'Debian' && false) || 'Alpine (Official)' }}
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }}) - ${{ matrix.mongodb-version == '7.0' && 'Debian' || 'Alpine (Official)' }}

steps:
- name: Collect Workflow Telemetry
Expand Down Expand Up @@ -204,7 +210,7 @@ jobs:
path: |
~/.cache/ms-playwright
# This is the version of Playwright that we are using, if you are willing to upgrade, you should update this.
key: playwright-1.48.2
key: playwright-1.40.1

- name: Install Playwright
if: inputs.type == 'ui' && steps.cache-playwright.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -299,11 +305,7 @@ jobs:
include-hidden-files: true

- name: Show server logs if E2E test failed
if: failure() && inputs.release == 'ee'
run: docker compose -f docker-compose-ci.yml logs

- name: Show server logs if E2E test failed
if: failure() && inputs.release != 'ee'
if: failure()
run: docker compose -f docker-compose-ci.yml logs rocketchat

- name: Extract e2e:ee:coverage
Expand Down
Loading

0 comments on commit d80cb71

Please sign in to comment.