diff --git a/.github/actions/runTestsTaggedAs/action.yaml b/.github/actions/runTestsTaggedAs/action.yaml index ae7f57f2d61..bff9797814f 100644 --- a/.github/actions/runTestsTaggedAs/action.yaml +++ b/.github/actions/runTestsTaggedAs/action.yaml @@ -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" @@ -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 @@ -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 diff --git a/.github/workflows/kapua-ci.yaml b/.github/workflows/kapua-ci.yaml index d3a4478a0ae..8d55c30a9b4 100755 --- a/.github/workflows/kapua-ci.yaml +++ b/.github/workflows/kapua-ci.yaml @@ -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 @@ -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 @@ -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