summarylogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 66885942e1c969e4c06b6510bea5b70dcf42a840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
include:
  - project: 'common/gitlab-helper'
    ref: master
    file: 'container-helper.yml'
  - project: 'common/gitlab-helper'
    ref: master
    file: 'deploy-helper.yml'
    
variables:
  BUILD_AND_TEST_IMAGE: "build-and-test"

workflow:
  rules:
    # don't create pipeline if the commit message starts with WIP
    - if: $CI_COMMIT_MESSAGE =~ /^WIP/
      when: never
    # don't create pipeline if we're merging from master or version branches
    - if: $CI_MERGE_REQUEST_IID && $CI_COMMIT_REF_NAME =~ /^(master|VER_\d+_\d+)$/
      when: never
    - if: $CI_MERGE_REQUEST_IID
    - if: $CI_COMMIT_REF_NAME =~ /^(master|VER_\d+_\d+)$/
    - if: $CI_COMMIT_TAG
    - if: $CI_PIPELINE_SOURCE =~ /^(trigger|pipeline|web|api|merge_request_event)$/

.rules_templates:
  rules:
    - if: &on_master $CI_COMMIT_REF_NAME =~ /^master$/

include:
  - project: "common/gitlab-helper"
    ref: master
    file: "ci-helper.yml"

workflow: !reference [ .common, workflow ]

variables:
  PKG_NAME: "clockify-desktop"

stages:
  - build
  - test
  - deploy

build-clockify-desktop:
  extends: .arch-build
  image: ${CI_REGISTRY}/common/gitlab-helper/archlinux-yay:master
  needs: []

test-clockify-desktop:
  extends: .arch-test
  image: ${CI_REGISTRY}/common/gitlab-helper/archlinux-yay:master
  needs: ["build-clockify-desktop"]
  after_script:
    # This is not a very sophisticated test but at least checks the binary is 
    # in place and there are all shared libs found in the system
    - |
      if [[ -n $(ldd /opt/Clockify/clockify | grep "not found") ]]; then
        ldd /opt/Clockify/clockify | grep "not found"
        exit 1
      fi

deploy-clockify-desktop:
  extends: .arch-deploy