-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (66 loc) · 3.01 KB
/
build-and-push-dev-docker-image.yml
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
name: Publish docker developer image
on:
push:
tags:
- v*.*.*
workflow_dispatch:
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Extract version
run: echo VERSION=${GITHUB_REF#refs/*/} >> $GITHUB_ENV
- name: Check output
env:
VERSION: ${{ env.VERSION }}
run: |
echo $VERSION
echo ${{ env.VERSION }}
ls
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'zulu'
- name: Setup maven settings.xml
uses: whelk-io/maven-settings-xml-action@v20
with:
repositories: '[{"id": "central", "name":"Maven Central", "url": "https://repo1.maven.org/maven2", "releases": {"enabled": "true"}, "snapshots": {"enabled": "false"}}, {"id": "SSE", "name":"SSE", "url": "https://projects.sse.uni-hildesheim.de/qm/maven/", "releases": {"enabled": "true"}, "snapshots": {"enabled": "true"}}, {"id": "bintray", "name":"bintray", "url": "https://jcenter.bintray.com", "releases": {"enabled": "true"}, "snapshots": {"enabled": "false"}}]'
- name: Install the platform basics
run: |
cd ./platform/tools/Install
mvn --batch-mode --update-snapshots package -DskipTests
- name: Build the test app through tests
run: |
cd ./platform/configuration/configuration
mvn --batch-mode --update-snapshots package -Dtest="IvmlSimpleMeshTests"
cd ../../..
- name: Instantiate the platform, prepare container building
run: |
cd ./platform/tools/Install
sed -i 's/String platformServer = "147.172.178.145";/String platformServer = "172.19.0.22";\nartifactsFolder="\/root\/\/platform\/artifacts";/g' src/main/easy/TechnicalSetup.ivml
sed -i 's/containerGeneration = true;/containerGeneration = false;/g' src/main/easy/TechnicalSetup.ivml
sed -i 's/platformContainerGeneration = true;/platformContainerGeneration = false;/g' src/main/easy/TechnicalSetup.ivml
echo "Using configuration:"
cat src/main/easy/TechnicalSetup.ivml
mvn install
cp -r container/DevContainer/* gen
cp ../../configuration/configuration/gen/tests/SimpleMesh/SimpleMeshTestingApp/target/SimpleMeshTestingApp-0.1.0-SNAPSHOT-bin.jar gen
echo "Base directory for container creation:"
ls gen
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_PW }}
- name: Build and push platform
uses: docker/build-push-action@v2
with:
build-args: VERSION=${{ env.VERSION }}
push: true
tags: iipecosphere/dev-container:latest
context: ./platform/tools/Install/gen/
file: ./platform/tools/Install/container/DevContainer/Dockerfile