Browse Source

github workflow: fix locating dockerfile

Mokhtar Naamani 4 years ago
parent
commit
9af897a530

+ 2 - 1
.dockerignore

@@ -1,2 +1,3 @@
 **target*
-**node_modules*
+**node_modules*
+.tmp/

+ 3 - 6
.github/workflows/run-network-tests.yml

@@ -7,16 +7,13 @@ on:
 jobs:
   run_network_tests:
     name: Network Integration Tests
-    if: github.event.label.name == 'run-network-tests' || github.event.action == null
+    if: contains(github.event.pull_request.labels.*.name, 'run-network-tests') || github.event.action == null
     runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        node-version: [12.x]
     steps:
       - uses: actions/checkout@v1
       - uses: actions/setup-node@v1
         with:
-          node-version: ${{ matrix.node-version }}
+          node-version: '12.x'
       - name: Install packages and dependencies
         run: yarn install --frozen-lockfile
       - name: Ensure tests are runnable
@@ -24,6 +21,6 @@ jobs:
       - name: Configure block production to 2000ms (fatser tests)
         run: ./scripts/alter-block-creation-time.sh
       - name: Build and start chain
-        run: cd devops/dockerfiles/node-and-runtime/ && ls -l && docker-compose up -d
+        run: docker-compose --file devops/dockerfiles/node-and-runtime/docker-compose.yml up -d
       - name: Execute network tests
         run: yarn workspace joystream-testing test

+ 1 - 0
devops/dockerfiles/node-and-runtime/docker-compose-no-build.yml

@@ -1,6 +1,7 @@
 version: "3"
 services:
   node:
+    # if image is missing it will be pulled from remote repo
     image: joystream/node
     container_name: joystream-node
     command: --dev --alice --validator --unsafe-ws-external --rpc-cors=all

+ 4 - 3
devops/dockerfiles/node-and-runtime/docker-compose.yml

@@ -2,12 +2,13 @@ version: "3"
 services:
   node:
     image: joystream/node
-    # Build image if not found
+    # Build image if not found. To prevent build run docker-compose with "--no-build" arg
     build:
       # context is relative to the compose file
       context: ../../../
-      # dockerfile is relative to working dir
-      dockerfile: ./Dockerfile
+      # dockerfile is relative to the context. thats retarted!
+      # ideally docker and compose file should be placed 
+      dockerfile: devops/dockerfiles/node-and-runtime/Dockerfile
     container_name: joystream-node
     command: --dev --alice --validator --unsafe-ws-external --rpc-cors=all
     ports: