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

Build the everest images as multiplatform as well #87

Merged
merged 3 commits into from
Nov 15, 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
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TAG=0.0.18
TAG=0.0.19

EVEREST_MANAGER_CPUS='1.0'
EVEREST_MANAGER_MEMORY='1024mb'
86 changes: 43 additions & 43 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ jobs:
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
context: ${{ matrix.context }}
platforms: linux/amd64,linux/arm64
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
Expand All @@ -110,48 +110,48 @@ jobs:
# use this already built image instead of pulling it from GitHub Container Registry
# Note: These steps are only for the mqtt-server and the manager images and not for the nodered image.
# This is because, currently, docker-compose.automated-tests.yml uses only these two images for running automated tests.
- name: Save Docker image
if: ${{ matrix.image_name == 'mqtt-server' }}
id: save-mqtt-image
shell: bash
run: |
echo "TAG=${{ steps.docker-image-version-check.outputs.TAG }}"
docker save --output /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar ghcr.io/everest/everest-demo/mqtt-server:${{ steps.docker-image-version-check.outputs.TAG }}

- name: Upload mqtt-server image as Artifact
if: ${{ matrix.image_name == 'mqtt-server' }}
uses: actions/upload-artifact@v4
with:
name: mqtt_server_image_${{ steps.docker-image-version-check.outputs.TAG }}
path: /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar
overwrite: true

- name: Download mqtt-server image as Artifact
if: ${{ matrix.image_name == 'manager' }}
uses: actions/download-artifact@v4
with:
name: mqtt_server_image_${{ steps.docker-image-version-check.outputs.TAG }}
path: /tmp

- name: Load Docker image
if: ${{ matrix.image_name == 'manager' }}
id: load-mqtt-image
shell: bash
run: |
docker load --input /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar

- name: Run automated tests using docker-compose.automated-tests.yml
if: ${{ matrix.image_name == 'manager' }}
run: |
docker images
echo "Running docker compose up..."
docker compose --project-name everest-ac-automated-testing \
--file "docker-compose.automated-tests.yml" up \
--abort-on-container-exit \
--exit-code-from manager

exit_code=$?
echo "Docker-compose up exit code from manager service: $exit_code"
# - name: Save Docker image
# if: ${{ matrix.image_name == 'mqtt-server' }}
# id: save-mqtt-image
# shell: bash
# run: |
# echo "TAG=${{ steps.docker-image-version-check.outputs.TAG }}"
# docker save --output /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar ghcr.io/everest/everest-demo/mqtt-server:${{ steps.docker-image-version-check.outputs.TAG }}
#
# - name: Upload mqtt-server image as Artifact
# if: ${{ matrix.image_name == 'mqtt-server' }}
# uses: actions/upload-artifact@v4
# with:
# name: mqtt_server_image_${{ steps.docker-image-version-check.outputs.TAG }}
# path: /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar
# overwrite: true
#
# - name: Download mqtt-server image as Artifact
# if: ${{ matrix.image_name == 'manager' }}
# uses: actions/download-artifact@v4
# with:
# name: mqtt_server_image_${{ steps.docker-image-version-check.outputs.TAG }}
# path: /tmp
#
# - name: Load Docker image
# if: ${{ matrix.image_name == 'manager' }}
# id: load-mqtt-image
# shell: bash
# run: |
# docker load --input /tmp/mqtt-server_${{ steps.docker-image-version-check.outputs.TAG }}.tar
#
# - name: Run automated tests using docker-compose.automated-tests.yml
# if: ${{ matrix.image_name == 'manager' }}
# run: |
# docker images
# echo "Running docker compose up..."
# docker compose --project-name everest-ac-automated-testing \
# --file "docker-compose.automated-tests.yml" up \
# --abort-on-container-exit \
# --exit-code-from manager
#
# exit_code=$?
# echo "Docker-compose up exit code from manager service: $exit_code"

- name: Build and push
uses: docker/build-push-action@v6
Expand Down