|
|
|
|
@ -243,6 +243,86 @@ jobs: |
|
|
|
|
name: build |
|
|
|
|
path: /tmp/Rocket.Chat.tar.gz |
|
|
|
|
|
|
|
|
|
build-gh-docker: |
|
|
|
|
name: 🚢 Build Docker Images for Testing |
|
|
|
|
needs: [build, release-versions] |
|
|
|
|
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') |
|
|
|
|
runs-on: ubuntu-20.04 |
|
|
|
|
|
|
|
|
|
env: |
|
|
|
|
RC_DOCKERFILE: ${{ matrix.platform == 'alpine' && needs.release-versions.outputs.rc-dockerfile-alpine || needs.release-versions.outputs.rc-dockerfile }} |
|
|
|
|
RC_DOCKER_TAG: ${{ matrix.platform == 'alpine' && needs.release-versions.outputs.rc-docker-tag-alpine || needs.release-versions.outputs.rc-docker-tag }} |
|
|
|
|
DOCKER_TAG: ${{ needs.release-versions.outputs.gh-docker-tag }} |
|
|
|
|
LOWERCASE_REPOSITORY: ${{ needs.release-versions.outputs.lowercase-repo }} |
|
|
|
|
SERVICES_PUBLISH: 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service' |
|
|
|
|
|
|
|
|
|
strategy: |
|
|
|
|
fail-fast: false |
|
|
|
|
matrix: |
|
|
|
|
platform: ['official', 'alpine'] |
|
|
|
|
|
|
|
|
|
steps: |
|
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
|
|
|
|
|
- name: Login to GitHub Container Registry |
|
|
|
|
uses: docker/login-action@v2 |
|
|
|
|
with: |
|
|
|
|
registry: ghcr.io |
|
|
|
|
username: ${{ secrets.CR_USER }} |
|
|
|
|
password: ${{ secrets.CR_PAT }} |
|
|
|
|
|
|
|
|
|
- name: Restore build |
|
|
|
|
uses: actions/download-artifact@v3 |
|
|
|
|
with: |
|
|
|
|
name: build |
|
|
|
|
path: /tmp/build |
|
|
|
|
|
|
|
|
|
- name: Unpack build |
|
|
|
|
run: | |
|
|
|
|
cd /tmp/build |
|
|
|
|
tar xzf Rocket.Chat.tar.gz |
|
|
|
|
rm Rocket.Chat.tar.gz |
|
|
|
|
|
|
|
|
|
- uses: dtinth/setup-github-actions-caching-for-turbo@v1 |
|
|
|
|
|
|
|
|
|
- name: Setup NodeJS |
|
|
|
|
uses: ./.github/actions/setup-node |
|
|
|
|
with: |
|
|
|
|
node-version: ${{ needs.release-versions.outputs.node-version }} |
|
|
|
|
cache-modules: true |
|
|
|
|
install: true |
|
|
|
|
|
|
|
|
|
- run: yarn build |
|
|
|
|
|
|
|
|
|
- name: Build Docker images |
|
|
|
|
run: | |
|
|
|
|
args=(rocketchat) |
|
|
|
|
|
|
|
|
|
if [[ '${{ matrix.platform }}' = 'alpine' ]]; then |
|
|
|
|
args+=($SERVICES_PUBLISH) |
|
|
|
|
fi; |
|
|
|
|
|
|
|
|
|
docker compose -f docker-compose-ci.yml build "${args[@]}" |
|
|
|
|
|
|
|
|
|
- name: Publish Docker images to GitHub Container Registry |
|
|
|
|
run: | |
|
|
|
|
args=(rocketchat) |
|
|
|
|
|
|
|
|
|
if [[ '${{ matrix.platform }}' = 'alpine' ]]; then |
|
|
|
|
args+=($SERVICES_PUBLISH) |
|
|
|
|
fi; |
|
|
|
|
|
|
|
|
|
docker compose -f docker-compose-ci.yml push "${args[@]}" |
|
|
|
|
|
|
|
|
|
- name: Rename official Docker tag to GitHub Container Registry |
|
|
|
|
if: matrix.platform == 'official' |
|
|
|
|
run: | |
|
|
|
|
IMAGE_NAME_BASE="ghcr.io/${LOWERCASE_REPOSITORY}/rocket.chat:${DOCKER_TAG}" |
|
|
|
|
|
|
|
|
|
echo "Push Docker image: ${IMAGE_NAME_BASE}" |
|
|
|
|
docker tag ${IMAGE_NAME_BASE}.official $IMAGE_NAME_BASE |
|
|
|
|
docker push $IMAGE_NAME_BASE |
|
|
|
|
|
|
|
|
|
checks: |
|
|
|
|
needs: [release-versions, packages-build] |
|
|
|
|
|
|
|
|
|
@ -261,13 +341,12 @@ jobs: |
|
|
|
|
|
|
|
|
|
test-api: |
|
|
|
|
name: 🔨 Test API (CE) |
|
|
|
|
needs: [checks, build, release-versions] |
|
|
|
|
needs: [checks, build-gh-docker, release-versions] |
|
|
|
|
|
|
|
|
|
uses: ./.github/workflows/ci-test-e2e.yml |
|
|
|
|
with: |
|
|
|
|
type: api |
|
|
|
|
release: ce |
|
|
|
|
publish-container: true |
|
|
|
|
node-version: ${{ needs.release-versions.outputs.node-version }} |
|
|
|
|
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }} |
|
|
|
|
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }} |
|
|
|
|
@ -281,7 +360,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
test-ui: |
|
|
|
|
name: 🔨 Test UI (CE) |
|
|
|
|
needs: [checks, build, release-versions] |
|
|
|
|
needs: [checks, build-gh-docker, release-versions] |
|
|
|
|
|
|
|
|
|
uses: ./.github/workflows/ci-test-e2e.yml |
|
|
|
|
with: |
|
|
|
|
@ -307,7 +386,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
test-api-ee: |
|
|
|
|
name: 🔨 Test API (EE) |
|
|
|
|
needs: [checks, build, release-versions] |
|
|
|
|
needs: [checks, build-gh-docker, release-versions] |
|
|
|
|
|
|
|
|
|
uses: ./.github/workflows/ci-test-e2e.yml |
|
|
|
|
with: |
|
|
|
|
@ -315,7 +394,6 @@ jobs: |
|
|
|
|
release: ee |
|
|
|
|
transporter: 'nats://nats:4222' |
|
|
|
|
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }} |
|
|
|
|
publish-container: true |
|
|
|
|
mongodb-version: "['4.4']" |
|
|
|
|
node-version: ${{ needs.release-versions.outputs.node-version }} |
|
|
|
|
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }} |
|
|
|
|
@ -330,7 +408,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
test-ui-ee: |
|
|
|
|
name: 🔨 Test UI (EE) |
|
|
|
|
needs: [checks, build, release-versions] |
|
|
|
|
needs: [checks, build-gh-docker, release-versions] |
|
|
|
|
|
|
|
|
|
uses: ./.github/workflows/ci-test-e2e.yml |
|
|
|
|
with: |
|
|
|
|
|