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

New branch to investigate why CI/CD failing in PR #7

Open
wants to merge 143 commits into
base: merge-check
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
fe1b1fa
Bringing in changes from previous PR on Running automated tests via CICD
Jul 16, 2024
007ad27
Using artifacts to make mqtt server image accessible in manager matri…
Jul 19, 2024
f629ce7
New branch based off latest PR branch + Added test script to test.
Aug 7, 2024
43eb83a
Added suggested fixes after code review on 08/06/24
Aug 7, 2024
78be2b0
Update Dockerfile
MukuFlash03 Aug 12, 2024
b9605e7
Testing with EVEREST_VERSION=2024.7.0
Aug 12, 2024
6fb7a51
Debugging insufficient space issues
Sep 11, 2024
7bd13f9
Removing some parameters and checking if still passes build successfully
Sep 11, 2024
0b1273c
Removed BUILDKIT arg
Sep 11, 2024
817d8c6
Revert "Removed BUILDKIT arg"
Sep 11, 2024
600d760
Revert "Removing some parameters and checking if still passes build s…
Sep 11, 2024
e27cbf8
Revert "Debugging insufficient space issues"
Sep 11, 2024
922b223
Reapply "Debugging insufficient space issues"
Sep 11, 2024
5c5906a
Revert "Reapply "Debugging insufficient space issues""
Sep 11, 2024
e820a48
Reapply "Reapply "Debugging insufficient space issues""
Sep 11, 2024
bbf254a
Revert "Reapply "Reapply "Debugging insufficient space issues"""
Sep 11, 2024
35f0999
Expecting ev-cli cmake error for v2024.3.0
Sep 11, 2024
dab29b6
Updating previous latest SHA ID tag number
Sep 11, 2024
eb3ef83
Added missing '@' symbol
Sep 11, 2024
e80a625
Update Dockerfile
Sep 11, 2024
ad28816
Merge branch 'run-automated-tests' into run-automated-tests-check
Sep 24, 2024
95d7797
Original current working with EVEREST CORE 2024.3.0
Sep 24, 2024
3805705
Build-kit Image 8508f30 from 8 months ago
Sep 24, 2024
2de081e
Build-kit Image fbdf77f from 4 months ago
Sep 24, 2024
f364e0d
Build-kit Image 234ce02 from 3 months ago
Sep 24, 2024
ba726dd
Build-kit Image 8c5cd96 from 3 months ago
Sep 24, 2024
2b87201
Build-kit Image 8a9f554 from 2 months ago
Sep 24, 2024
6b9a4fd
Build-kit Image 5768fe9 from 2 months ago
Sep 24, 2024
4f99a20
Build-kit Image ff9a623 from 2 months ago
Sep 24, 2024
2c9e5e1
Build-kit Image ff9a623 from 4 months ago
Sep 24, 2024
ffd86bf
Build-kit Image ff9a623 from 4 months ago
Sep 24, 2024
b406b5c
Build-kit Image 7494bd6 from 4 months ago
Sep 24, 2024
30fefe1
Build-kit Image 7494bd6 from 9 months ago
Sep 24, 2024
3f86866
Build-kit Image 234ce02d from 3 months ago
Sep 24, 2024
363a445
Build-kit Image 234ce02d from 3 months ago
Sep 24, 2024
c7b9907
Build-kit Image 8c5cd96 from 3 months ago
Sep 24, 2024
f6cf195
Build-kit Image 8c5cd96 from 3 months ago
Sep 24, 2024
45cd35d
Build-kit Image 8c5cd96 from 2 months ago
Sep 24, 2024
a83a6f0
Build-kit Image 8c5cd96 from 2 months ago
Sep 24, 2024
9104edf
Build-kit Image 5768fe9 from 2 months ago
Sep 24, 2024
16aae01
Build-kit Image 5768fe9 from 2 months ago
Sep 24, 2024
78f2bd8
Build-kit Image ff9a623 from 2 months ago
Sep 24, 2024
b0f9fa9
Build-kit Image ff9a623 from 2 months ago
Sep 24, 2024
94c1a83
Build-kit Image 9d083e from 2 months ago
Sep 24, 2024
a765db3
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
ddb285f
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
1cafdc9
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
d65da68
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
4914b52
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
09946f6
Build-kit Image 9d083e from 4 months ago
Sep 24, 2024
e0353c5
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
21669bb
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
8a62b2e
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
da44b71
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
63e6a4e
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
d232433
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
9c8d887
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
4ec1fd4
Build-kit Image 0fec00d from 8 months ago
Sep 24, 2024
08d89dd
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
f267b09
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
1e1d252
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
fd48ee5
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
99f7289
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
403bb98
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
845a9cb
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
b9f262c
Build-kit Image 5eaebed from 3 months ago
Sep 24, 2024
d15e7be
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
684f8e8
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
c0093ec
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
4b85949
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
910d7a1
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
349f786
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
ee41d28
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
d0b3186
Build-kit Image 33de905 from 3 months ago
Sep 24, 2024
a8d8e1e
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
ac08394
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
f7aacbd
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
aa69e56
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
8d24ff2
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
6f57b78
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
5ab9fb9
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
c1bcdbf
Build-kit Image 578d092 from 2 months ago
Sep 24, 2024
6ef36ed
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
f441393
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
a88cd91
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
6270882
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
5ce7e5c
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
2a454bf
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
3008147
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
3dd5d2b
Build-kit Image c0fe423 from 2 months ago
Sep 24, 2024
446935e
Testing whether removing unused files in Github actions runner image …
Sep 25, 2024
266108d
Testing another buildkit version 1.3.3 to see if no space error avoided
Sep 25, 2024
d233359
Trying to fix the no space error c0fe423 (v.13.3) / 2024.7.0
Sep 25, 2024
bf837a5
Trying to fix the no space error c0fe423 (v.13.3) / 2024.7.0
Sep 25, 2024
20da1cb
Trying to fix the no space error 578d092 (v.1.3.1) / 2024.7.1
Sep 25, 2024
77a911d
Trying to fix the no space error 578d092 (v.1.3.1) / 2024.8.0
Sep 25, 2024
7e484ec
Trying to fix the no space error 5eaebed (v.1.2.0) / 2024.7.0
Sep 25, 2024
2a680da
Trying to fix the no space error 9d083eb (v.1.1.2) / 2024.7.1
Sep 25, 2024
5a2f427
Trying to fix the no space error 0fec00d (v.0.0.1) / 2024.7.1
Sep 25, 2024
49513eb
Trying to fix the no space error 0fec00d (v.0.0.1) / 2024.7.1
Sep 25, 2024
ee9b230
Build-kit Image 7494bd6 from 9 months ago
Sep 25, 2024
30f1a94
Build-kit Image 7494bd6 from 9 months ago
Sep 25, 2024
a8e3533
Build-kit Image 7494bd6 from 9 months ago
Sep 25, 2024
e17403a
Build-kit Image 7494bd6 from 9 months ago
Sep 25, 2024
87384b5
Build-kit Image 7494bd6 from 9 months ago
Sep 25, 2024
f610d8c
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
bb48ea7
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
6728b79
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
98d40e7
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
261dedc
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
29e66b1
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
12c4062
Build-kit Image 8508f30 from 8 months ago
Sep 25, 2024
1804e91
Build-kit Image fbdf77f from 4 months ago
Sep 25, 2024
10f0eef
Build-kit Image fbdf77f from 4 months ago
Sep 25, 2024
e78903a
Build-kit Image fbdf77f from 4 months ago
Sep 25, 2024
5f4e1e6
Build-kit Image fbdf77f from 4 months ago
Sep 25, 2024
d6aa721
Build-kit Image fbdf77f from 4 months ago
Sep 25, 2024
2eb23eb
Build-kit Image 234ce02 from 3 months ago
Sep 25, 2024
532a244
Build-kit Image 234ce02 from 3 months ago
Sep 25, 2024
f329b8c
Build-kit Image 234ce02 from 3 months ago
Sep 25, 2024
2b7dd2e
Build-kit Image 234ce02 from 3 months ago
Sep 25, 2024
7278a98
Build-kit Image 234ce02 from 3 months ago
Sep 25, 2024
2c7a977
Build-kit Image 8c5cd96 from 3 months ago
Sep 25, 2024
cad0e34
Build-kit Image 8c5cd96 from 3 months ago
Sep 25, 2024
7c8afd7
Build-kit Image 8c5cd96 from 3 months ago
Sep 25, 2024
318d0dc
Build-kit Image 8c5cd96 from 3 months ago
Sep 25, 2024
63e19ff
Build-kit Image 8c5cd96 from 3 months ago
Sep 25, 2024
8f7a864
Build-kit Image 8a9f554 from 2 months ago
Sep 25, 2024
2ea21dd
Build-kit Image 8a9f554 from 2 months ago
Sep 25, 2024
8fb4284
Build-kit Image 8a9f554 from 2 months ago
Sep 25, 2024
51fb60d
Build-kit Image 8a9f554 from 2 months ago
Sep 25, 2024
6526bf8
Build-kit Image 8a9f554 from 2 months ago
Sep 25, 2024
49405a8
Build-kit Image 5768fe9 from 2 months ago
Sep 25, 2024
6c3ee60
Build-kit Image 5768fe9 from 2 months ago
Sep 25, 2024
81462a9
Build-kit Image 5768fe9 from 2 months ago
Sep 25, 2024
7f3ea50
Build-kit Image 5768fe9 from 2 months ago
Sep 25, 2024
e59fa45
Build-kit Image 5768fe9 from 2 months ago
Sep 25, 2024
d3f5156
Build-kit Image ff9a623 from 2 months ago
Sep 25, 2024
f3eac26
Build-kit Image ff9a623 from 2 months ago
Sep 25, 2024
bd7aa94
Build-kit Image ff9a623 from 2 months ago
Sep 25, 2024
526b7ac
Build-kit Image ff9a623 from 2 months ago
Sep 25, 2024
a7bdb9e
Build-kit Image ff9a623 from 2 months ago
Sep 25, 2024
86b8d19
Build-kit Image c0fe423 from 2 months ago - Latest EV-core
Sep 25, 2024
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
74 changes: 68 additions & 6 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: cicd

on:
pull_request:
branches:
- main
branches: [ main, merge-check ]
# - main
push:
branches:
- main
Expand All @@ -21,17 +21,20 @@ jobs:
strategy:
matrix:
include:
- host_namespace: ghcr.io/everest/everest-demo
image_name: manager
context: ./manager
- host_namespace: ghcr.io/everest/everest-demo
image_name: mqtt-server
context: ./mosquitto
- host_namespace: ghcr.io/everest/everest-demo
image_name: nodered
context: ./nodered
- host_namespace: ghcr.io/everest/everest-demo
image_name: manager
context: ./manager

steps:
- name: Delete huge unnecessary tools folder
run: rm -rf /opt/hostedtoolcache

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -93,9 +96,68 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
context: ${{ matrix.context }}
push: false
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.image_name }}
cache-to: type=gha,mode=max,scope=${{ matrix.image_name }}

# Following four steps are specifically for running automated tests which includes loading the
# mqtt-server image from the GitHub Actions Cache so that the docker compose automated tests can
# 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: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
push: ${{ github.event_name != 'pull_request' }}
Expand Down
1 change: 1 addition & 0 deletions docker-compose.automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ services:
- MQTT_SERVER_ADDRESS=mqtt-server
working_dir: /ext/source/tests
entrypoint: "sh ./run-test.sh"
# entrypoint: "sh ./test-exit-code.sh failure"
sysctls:
- net.ipv6.conf.all.disable_ipv6=0
6 changes: 4 additions & 2 deletions manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM --platform=linux/x86_64 ghcr.io/everest/build-kit-alpine:latest
ARG BUILDKIT_VERSION=sha256:c0fe4236506c085687f58bdfe4865d973060185d33c270ab076fad320d4421b0
FROM --platform=linux/x86_64 ghcr.io/everest/build-kit-alpine@${BUILDKIT_VERSION}

ARG EVEREST_VERSION=2024.3.0
ARG EVEREST_VERSION=2024.9.0-rc1
ENV EVEREST_VERSION=${EVEREST_VERSION}

COPY install.sh ./
Expand All @@ -22,5 +23,6 @@ COPY config.json ./dist/share/everest/modules/OCPP201/config.json
COPY device_model_storage_maeve_sp1.db ./dist/share/everest/modules/OCPP201/device_model_storage.db

COPY run-test.sh /ext/source/tests/run-test.sh
COPY test-exit-code.sh /ext/source/tests/test-exit-code.sh

LABEL org.opencontainers.image.source=https://github.com/everest/everest-demo
11 changes: 11 additions & 0 deletions manager/test-exit-code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
TEST_TYPE=$1
exit_code=0
if [ "$TEST_TYPE" == "success" ]; then
exit_code=0
elif [ "$TEST_TYPE" == "failure" ]; then
exit_code=1
fi

echo "Exit Code from test-exit-code.sh: $exit_code"
exit $exit_code
Loading