Skip to content

Commit 2065688

Browse files
committed
CI: Trigger tarball build in GitLab automatically if GitHub Action tests succeeded.
1 parent fdcef40 commit 2065688

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ jobs:
245245

246246
steps:
247247
- uses: actions/checkout@v2
248-
248+
249249
- name: Update apt-get
250250
run: sudo apt-get update
251251

@@ -389,3 +389,18 @@ jobs:
389389
make -j $(nproc)
390390
cd ${{github.workspace}}/install/bin
391391
./CodeCompass_parser -d "sqlite:database=$HOME/xerces.sqlite" -w $HOME/ws_pgsql/ -n "Xerces-C" -i $HOME/xerces-c -i $HOME/build_xerces-c/compile_commands.json -j $(nproc)
392+
393+
tarball:
394+
needs: parse
395+
if: ${{ github.repository == 'Ericsson/CodeCompass' && github.ref == 'refs/heads/master' }}
396+
runs-on: ubuntu-20.04
397+
398+
steps:
399+
- name: Update apt-get
400+
run: sudo apt-get update
401+
402+
- name: Install curl
403+
run: sudo apt-get install curl
404+
405+
- name: Trigget GitLab CI
406+
run: curl -X POST -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=master https://gitlab.inf.elte.hu/api/v4/projects/85/trigger/pipeline

.gitlab/ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
workflow:
2+
rules:
3+
- if: '$CI_PIPELINE_SOURCE == "trigger"'
4+
when: always
5+
- if: '$CI_PIPELINE_SOURCE == "web"'
6+
when: always
7+
- when: never
8+
19
stages:
210
- prepare
311
- package
@@ -14,7 +22,6 @@ variables:
1422

1523
.tarball:
1624
stage: package
17-
when: manual
1825
allow_failure: false
1926
timeout: 12h
2027
tags: ["long-running"]
@@ -117,7 +124,6 @@ tarball ubuntu-16.04:
117124
.upload:
118125
stage: deploy
119126
image: ubuntu:20.04
120-
when: manual
121127
allow_failure: false
122128
variables:
123129
FILENAME: codecompass-$CI_COMMIT_BRANCH.tar.gz

0 commit comments

Comments
 (0)