From 18e31b7c3d6f34b3903c43edda52710739194e71 Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 17:06:32 +0100 Subject: [PATCH 1/7] Testing CI for Flash. --- .github/workflows/ci.yml | 77 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e24ff75af..3ffa2ad0b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,54 @@ env: BUILD_TYPE: Debug jobs: + dockertest: + #needs: parse + if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Build images for current master + if: ${{ github.ref == 'refs/heads/master' }} + id: docker_build + run: | + docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . + docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . + docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache . + docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . + docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . + docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest + + - name: Build images for Flash + if: ${{ github.ref == 'refs/heads/release/Flash' }} + id: docker_build + run: | + docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . + docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . + docker build -t codecompass:web-flash -t modelcpp/codecompass:web-sqlite-flash --file docker/web/Dockerfile --no-cache . + docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-pgsql-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . + docker build -t codecompass:web-flash -t modelcpp/codecompass:web-pgsql-flash --file docker/web/Dockerfile --no-cache . + docker tag modelcpp/codecompass:runtime-pgsql-flash modelcpp/codecompass:flash + + tarballtest: + #needs: parse + if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + runs-on: ubuntu-20.04 + + steps: + - name: Update apt-get + run: sudo apt-get update + + - name: Install curl + run: sudo apt-get install curl + + - name: Trigget GitLab CI + run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=master https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline + + + build: strategy: matrix: @@ -401,14 +449,15 @@ jobs: docker: needs: parse - if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref == 'refs/heads/master' }} + if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 - - name: Build images + - name: Build images for current master + if: ${{ github.ref == 'refs/heads/master' }} id: docker_build run: | docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . @@ -418,6 +467,17 @@ jobs: docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest + - name: Build images for Flash + if: ${{ github.ref == 'refs/heads/release/Flash' }} + id: docker_build + run: | + docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . + docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . + docker build -t codecompass:web-flash -t modelcpp/codecompass:web-sqlite-flash --file docker/web/Dockerfile --no-cache . + docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-pgsql-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . + docker build -t codecompass:web-flash -t modelcpp/codecompass:web-pgsql-flash --file docker/web/Dockerfile --no-cache . + docker tag modelcpp/codecompass:runtime-pgsql-flash modelcpp/codecompass:flash + - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -425,6 +485,7 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Push images + if: ${{ github.ref == 'refs/heads/master' }} run: | docker push modelcpp/codecompass:dev docker push modelcpp/codecompass:runtime-sqlite @@ -433,9 +494,19 @@ jobs: docker push modelcpp/codecompass:web-pgsql docker push modelcpp/codecompass:latest + - name: Push images + if: ${{ github.ref == 'refs/heads/release/Flash' }} + run: | + docker push modelcpp/codecompass:dev-flash + docker push modelcpp/codecompass:runtime-sqlite-flash + docker push modelcpp/codecompass:runtime-pgsql-flash + docker push modelcpp/codecompass:web-sqlite-flash + docker push modelcpp/codecompass:web-pgsql-flash + docker push modelcpp/codecompass:flash + tarball: needs: parse - if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref == 'refs/heads/master' }} + if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} runs-on: ubuntu-20.04 steps: From 31b51bb4330fab711efb610e058358f87f0e2791 Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 17:07:44 +0100 Subject: [PATCH 2/7] Testing CI for Flash. --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ffa2ad0b..470e4398b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - name: Build images for current master if: ${{ github.ref == 'refs/heads/master' }} - id: docker_build + id: docker_build_test run: | docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . @@ -28,7 +28,7 @@ jobs: - name: Build images for Flash if: ${{ github.ref == 'refs/heads/release/Flash' }} - id: docker_build + id: docker_build_flash_test run: | docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . @@ -458,7 +458,7 @@ jobs: - name: Build images for current master if: ${{ github.ref == 'refs/heads/master' }} - id: docker_build + id: docker_build_master run: | docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . @@ -469,7 +469,7 @@ jobs: - name: Build images for Flash if: ${{ github.ref == 'refs/heads/release/Flash' }} - id: docker_build + id: docker_build_flash run: | docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . From 6e0cc9b5308347f52ec11d37b6b5d028d6306e86 Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 19:14:19 +0100 Subject: [PATCH 3/7] Testing CI for Flash. --- .github/workflows/ci.yml | 79 ++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 470e4398b..8d2ad97ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,50 +8,38 @@ env: jobs: dockertest: #needs: parse - if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} runs-on: ubuntu-20.04 steps: - name: Checkout uses: actions/checkout@v2 + - name: Branch name slug + uses: rlespinasse/github-slug-action@v4 + + - name: Branch name substring + uses: bhowell2/github-substring-action + id: branch_substring_test + with: + value: ${{ env.GITHUB_REPOSITORY_SLUG }}" + index_of_str: "release" + fail_if_not_found: false + default_return_value: "" + - name: Build images for current master - if: ${{ github.ref == 'refs/heads/master' }} + if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true) }} id: docker_build_test run: | - docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . + export BRANCH=steps.branch_substring.outputs.substring + echo $BRANCH + docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest - - name: Build images for Flash - if: ${{ github.ref == 'refs/heads/release/Flash' }} - id: docker_build_flash_test - run: | - docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . - docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . - docker build -t codecompass:web-flash -t modelcpp/codecompass:web-sqlite-flash --file docker/web/Dockerfile --no-cache . - docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-pgsql-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . - docker build -t codecompass:web-flash -t modelcpp/codecompass:web-pgsql-flash --file docker/web/Dockerfile --no-cache . - docker tag modelcpp/codecompass:runtime-pgsql-flash modelcpp/codecompass:flash - - tarballtest: - #needs: parse - if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} - runs-on: ubuntu-20.04 - - steps: - - name: Update apt-get - run: sudo apt-get update - - - name: Install curl - run: sudo apt-get install curl - - - name: Trigget GitLab CI - run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=master https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline - build: @@ -456,28 +444,31 @@ jobs: - name: Checkout uses: actions/checkout@v2 + - name: Branch name slug + uses: rlespinasse/github-slug-action@v4 + + - name: Branch name substring + uses: bhowell2/github-substring-action + id: branch_substring + with: + value: ${{ env.GITHUB_REPOSITORY_SLUG }}" + index_of_str: "release" + fail_if_not_found: false + default_return_value: "" + - name: Build images for current master - if: ${{ github.ref == 'refs/heads/master' }} - id: docker_build_master + if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true) }} + id: docker_build run: | - docker build -t codecompass:dev -t modelcpp/codecompass:dev --file docker/dev/Dockerfile . + export BRANCH=steps.branch_substring.outputs.substring + echo $BRANCH + docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest - - name: Build images for Flash - if: ${{ github.ref == 'refs/heads/release/Flash' }} - id: docker_build_flash - run: | - docker build -t codecompass:dev-flash -t modelcpp/codecompass:dev-flash --file docker/dev/Dockerfile . - docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-sqlite-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . - docker build -t codecompass:web-flash -t modelcpp/codecompass:web-sqlite-flash --file docker/web/Dockerfile --no-cache . - docker build -t codecompass:runtime-flash -t modelcpp/codecompass:runtime-pgsql-flash --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . - docker build -t codecompass:web-flash -t modelcpp/codecompass:web-pgsql-flash --file docker/web/Dockerfile --no-cache . - docker tag modelcpp/codecompass:runtime-pgsql-flash modelcpp/codecompass:flash - - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -516,5 +507,5 @@ jobs: - name: Install curl run: sudo apt-get install curl - - name: Trigget GitLab CI + - name: Trigger GitLab CI run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=master https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline From 4d22ff440d3774068905e16c8057c32a00cfc832 Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 19:16:55 +0100 Subject: [PATCH 4/7] Testing CI for Flash. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d2ad97ed..9cab713ad 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ env: jobs: dockertest: #needs: parse - if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} runs-on: ubuntu-20.04 steps: @@ -19,7 +19,7 @@ jobs: uses: rlespinasse/github-slug-action@v4 - name: Branch name substring - uses: bhowell2/github-substring-action + uses: bhowell2/github-substring-action@v1.0.0 id: branch_substring_test with: value: ${{ env.GITHUB_REPOSITORY_SLUG }}" From 6b11ae5c50b0d6e7e738bc3f72704cd719344f33 Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 19:21:09 +0100 Subject: [PATCH 5/7] Testing CI for Flash. --- .github/workflows/ci.yml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9cab713ad..82003d0a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,16 +22,17 @@ jobs: uses: bhowell2/github-substring-action@v1.0.0 id: branch_substring_test with: - value: ${{ env.GITHUB_REPOSITORY_SLUG }}" + value: ${{ env.GITHUB_REF_SLUG }} index_of_str: "release" fail_if_not_found: false default_return_value: "" - name: Build images for current master - if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true) }} + if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} id: docker_build_test run: | - export BRANCH=steps.branch_substring.outputs.substring + echo ${{ steps.branch_substring_test.outputs.substring }} + export BRANCH=${{ steps.branch_substring_test.outputs.substring }} echo $BRANCH docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . @@ -448,7 +449,7 @@ jobs: uses: rlespinasse/github-slug-action@v4 - name: Branch name substring - uses: bhowell2/github-substring-action + uses: bhowell2/github-substring-action@v1.0.0 id: branch_substring with: value: ${{ env.GITHUB_REPOSITORY_SLUG }}" @@ -457,10 +458,13 @@ jobs: default_return_value: "" - name: Build images for current master - if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true) }} + if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} id: docker_build run: | - export BRANCH=steps.branch_substring.outputs.substring + echo steps.branch_substring.outputs.substring + echo $(echo steps.branch_substring.outputs.substring) + echo ${echo steps.branch_substring.outputs.substring} + export BRANCH=$(steps.branch_substring.outputs.substring) echo $BRANCH docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . From bb94dbcbe897a3a67d51533f2ba54ca269dffadd Mon Sep 17 00:00:00 2001 From: intjftw Date: Fri, 21 Jan 2022 22:01:36 +0100 Subject: [PATCH 6/7] Preparing CI for Flash release. --- .github/workflows/ci.yml | 89 +++++++++------------------------------- 1 file changed, 19 insertions(+), 70 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82003d0a9..b6a0ca4d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,43 +6,6 @@ env: BUILD_TYPE: Debug jobs: - dockertest: - #needs: parse - if: ${{ github.repository == 'mcserep/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} - runs-on: ubuntu-20.04 - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Branch name slug - uses: rlespinasse/github-slug-action@v4 - - - name: Branch name substring - uses: bhowell2/github-substring-action@v1.0.0 - id: branch_substring_test - with: - value: ${{ env.GITHUB_REF_SLUG }} - index_of_str: "release" - fail_if_not_found: false - default_return_value: "" - - - name: Build images for current master - if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} - id: docker_build_test - run: | - echo ${{ steps.branch_substring_test.outputs.substring }} - export BRANCH=${{ steps.branch_substring_test.outputs.substring }} - echo $BRANCH - docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . - docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . - docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache . - docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . - docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . - docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest - - - build: strategy: matrix: @@ -438,7 +401,7 @@ jobs: docker: needs: parse - if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true) }} runs-on: ubuntu-20.04 steps: @@ -452,26 +415,21 @@ jobs: uses: bhowell2/github-substring-action@v1.0.0 id: branch_substring with: - value: ${{ env.GITHUB_REPOSITORY_SLUG }}" + value: ${{ env.GITHUB_REF_SLUG }} index_of_str: "release" fail_if_not_found: false default_return_value: "" - name: Build images for current master if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} - id: docker_build run: | - echo steps.branch_substring.outputs.substring - echo $(echo steps.branch_substring.outputs.substring) - echo ${echo steps.branch_substring.outputs.substring} - export BRANCH=$(steps.branch_substring.outputs.substring) - echo $BRANCH - docker build -t codecompass:dev$BRANCH -t modelcpp/codecompass:dev$BRANCH --file docker/dev/Dockerfile . - docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . - docker build -t codecompass:web -t modelcpp/codecompass:web-sqlite --file docker/web/Dockerfile --no-cache . - docker build -t codecompass:runtime -t modelcpp/codecompass:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . - docker build -t codecompass:web -t modelcpp/codecompass:web-pgsql --file docker/web/Dockerfile --no-cache . - docker tag modelcpp/codecompass:runtime-pgsql modelcpp/codecompass:latest + export BRANCH=${{ steps.branch_substring.outputs.substring }} + docker build -t codecompass$BRANCH:dev -t modelcpp/codecompass$BRANCH:dev --file docker/dev/Dockerfile . + docker build -t codecompass$BRANCH:runtime -t modelcpp/codecompass$BRANCH:runtime-sqlite --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=sqlite . + docker build -t codecompass$BRANCH:web -t modelcpp/codecompass$BRANCH:web-sqlite --file docker/web/Dockerfile --no-cache . + docker build -t codecompass$BRANCH:runtime -t modelcpp/codecompass$BRANCH:runtime-pgsql --file docker/runtime/Dockerfile --no-cache --build-arg CC_DATABASE=pgsql . + docker build -t codecompass$BRANCH:web -t modelcpp/codecompass$BRANCH:web-pgsql --file docker/web/Dockerfile --no-cache . + docker tag modelcpp/codecompass$BRANCH:runtime-pgsql modelcpp/codecompass$BRANCH:latest - name: Login to DockerHub uses: docker/login-action@v1 @@ -480,28 +438,19 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} - name: Push images - if: ${{ github.ref == 'refs/heads/master' }} - run: | - docker push modelcpp/codecompass:dev - docker push modelcpp/codecompass:runtime-sqlite - docker push modelcpp/codecompass:runtime-pgsql - docker push modelcpp/codecompass:web-sqlite - docker push modelcpp/codecompass:web-pgsql - docker push modelcpp/codecompass:latest - - - name: Push images - if: ${{ github.ref == 'refs/heads/release/Flash' }} + if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} run: | - docker push modelcpp/codecompass:dev-flash - docker push modelcpp/codecompass:runtime-sqlite-flash - docker push modelcpp/codecompass:runtime-pgsql-flash - docker push modelcpp/codecompass:web-sqlite-flash - docker push modelcpp/codecompass:web-pgsql-flash - docker push modelcpp/codecompass:flash + export BRANCH=${{ steps.branch_substring.outputs.substring }} + docker push modelcpp/codecompass$BRANCH:dev + docker push modelcpp/codecompass$BRANCH:runtime-sqlite + docker push modelcpp/codecompass$BRANCH:runtime-pgsql + docker push modelcpp/codecompass$BRANCH:web-sqlite + docker push modelcpp/codecompass$BRANCH:web-pgsql + docker push modelcpp/codecompass$BRANCH:latest tarball: needs: parse - if: ${{ github.repository == 'Ericsson/CodeCompass' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release') == true) }} + if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref_name == 'master' }} runs-on: ubuntu-20.04 steps: @@ -512,4 +461,4 @@ jobs: run: sudo apt-get install curl - name: Trigger GitLab CI - run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=master https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline + run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=${{ github.ref_name }} https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline From a6d64d797e429f033b3ff6c9f5dc2919f01ec121 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Cser=C3=A9p?= Date: Sat, 22 Jan 2022 01:46:06 +0100 Subject: [PATCH 7/7] Update .github/workflows/ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6a0ca4d7..fb634f9bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -420,7 +420,7 @@ jobs: fail_if_not_found: false default_return_value: "" - - name: Build images for current master + - name: Build images if: ${{ github.ref_name == 'master' || startsWith(github.ref_name, 'release') == true }} run: | export BRANCH=${{ steps.branch_substring.outputs.substring }}