Skip to content

Commit

Permalink
moved api docker image creation inside abstract action and removed se…
Browse files Browse the repository at this point in the history
…parate api container assembly job
  • Loading branch information
angelo.andreussi committed Apr 19, 2024
1 parent b96e326 commit bd6bc85
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 17 deletions.
10 changes: 9 additions & 1 deletion .github/actions/runTestsTaggedAs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ inputs:
description: true if this suite needs docker images, false otherwise
required: false
default: 'true'
needs-api-docker-image:
description: true if this suite needs the rest-api docker image, false otherwise
required: false
default: 'false'
#outputs:
runs:
using: "composite"
Expand All @@ -28,7 +32,7 @@ runs:
with:
path: ~/.m2/repository
key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache
- name: Cache Maven repository
- name: Cache Maven repository #TODO: is this duplicated with the step above??
uses: actions/cache@v3
with:
path: ~/.m2/repository
Expand All @@ -37,6 +41,10 @@ runs:
if: ${{ inputs.needs-docker-images == 'true' }}
run: mvn clean install -pl ${APP_PROJECTS} && mvn clean install -Pdocker -f assembly/pom.xml -pl '!:kapua-assembly-api' #api container not used in the tests at all se we don't need to build it here
shell: bash
- name: Docker rest-api image creation
if: ${{ inputs.needs-api-docker-image == 'true' }}
run: mvn clean install -Pdocker -pl :kapua-assembly-api
shell: bash
- name: Dns look-up containers needed for tests - message-broker
if: ${{ inputs.needs-docker-images == 'true' }}
run: echo "127.0.0.1 message-broker" | sudo tee -a /etc/hosts
Expand Down
18 changes: 2 additions & 16 deletions .github/workflows/kapua-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,6 @@ jobs:
- run: docker images -a # used as log (should show only github environment standard docker images; if kapua images are present, something is wrong)
- run: mvn -B ${BUILD_OPTS} -DskipTests clean install -T 1C
- run: bash <(curl -s https://codecov.io/bash)
assembly-api-container:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3 # Checks out a copy of the repository on the ubuntu-latest machine
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- name: Cache Maven repository #retrieve maven artifacts for the console building
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ github.run_id }}-${{ github.run_number }}-maven-cache
- run: mvn clean install -Pdocker -pl :kapua-assembly-java-base,:kapua-assembly-jetty-base,:kapua-assembly-api
test-brokerAcl:
needs: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -334,6 +318,7 @@ jobs:
with:
tag: '@rest_auth'
needs-docker-images: 'true'
needs-api-docker-image: 'true'
test-api-corsfilter:
needs: test-endpoint # test suite dependent on the endpoint service (if it has failings it's useless to perform these tests)
runs-on: ubuntu-latest
Expand All @@ -345,6 +330,7 @@ jobs:
with:
tag: '@rest_cors'
needs-docker-images: 'true'
needs-api-docker-image: 'true'
junit-tests:
needs: build
runs-on: ubuntu-latest
Expand Down

0 comments on commit bd6bc85

Please sign in to comment.