Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: fix services container not building in build step #32075

Merged
merged 9 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions .github/actions/build-docker/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
required: false
description: 'Platform'
type: string
build-containers:
required: false
description: 'Containers to build along with Rocket.Chat'
type: string

runs:
using: composite
Expand Down Expand Up @@ -54,22 +58,14 @@ runs:
- name: Build Docker images
shell: bash
run: |
args=(rocketchat)

if [[ '${{ inputs.platform }}' = 'alpine' ]]; then
args+=($SERVICES_PUBLISH)
fi;
args=(rocketchat ${{ inputs.build-containers }})

docker compose -f docker-compose-ci.yml build "${args[@]}"

- name: Publish Docker images to GitHub Container Registry
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop')
shell: bash
run: |
args=(rocketchat)

if [[ '${{ inputs.platform }}' = 'alpine' ]]; then
args+=($SERVICES_PUBLISH)
fi;
args=(rocketchat ${{ inputs.build-containers }})

docker compose -f docker-compose-ci.yml push "${args[@]}"
8 changes: 8 additions & 0 deletions .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ jobs:
name: MongoDB ${{ matrix.mongodb-version }} (${{ matrix.shard }}/${{ inputs.total-shard }})

steps:
- 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: ${{ secrets.CR_USER }}
password: ${{ secrets.CR_PAT }}

- name: Launch MongoDB
uses: supercharge/[email protected]
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ jobs:
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
Expand All @@ -237,6 +236,7 @@ jobs:
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}

build-gh-docker:
name: 🚢 Build Docker Images for Production
Expand All @@ -248,7 +248,6 @@ jobs:
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
Expand All @@ -264,6 +263,7 @@ jobs:
CR_PAT: ${{ secrets.CR_PAT }}
node-version: ${{ needs.release-versions.outputs.node-version }}
platform: ${{ matrix.platform }}
build-containers: ${{ matrix.platform == 'alpine' && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }}

- name: Rename official Docker tag to GitHub Container Registry
if: matrix.platform == 'official'
Expand Down
Loading