Repository navigation
90 lines (81 loc) · 2.59 KB
/
Copy pathmanager.yml
File metadata and controls
90 lines (81 loc) · 2.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: CI/CD
on:
push:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
PLATFORM: linux/amd64,linux/aarch64
jobs:
test_ui:
runs-on: ubuntu-latest
needs: [image_manager]
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.8
- name: install openremote-cli
run: |
pip3 install openremote-cli
openremote-cli -V -t
- name: deploy openremote stack on localhost and run UI test
run: |
wget -nc https://raw.githubusercontent.com/openremote/openremote/master/docker-compose.yml
docker-compose up -d
sleep 60
docker ps
# Login to manager and add weather agent asset
or-test-http-rest --dnsname localhost --password secret -vv
timeout-minutes: 30
image_manager:
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: install buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
install: true
- name: available platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: login to docker hub
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKERHUB_USER }}" --password-stdin
- name: Download build artifacts
uses: actions/download-artifact@v2
with:
name: dist-build
- name: build and push images
run: |
docker build --push --platform $PLATFORM -t openremote/manager:latest manager/build/install/manager
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: grant execute permission for gradlew
run: chmod +x gradlew
- name: build with Gradle
run: ./gradlew installDist
- name: Share build artifacts
uses: actions/upload-artifact@v2
with:
name: dist-build
path: |
manager/build
deployment/build
!dist/**/*.md
retention-days: 1