Skip to content
.gitlab-ci.yml 713 B
Newer Older
Seblu's avatar
Seblu committed
---
Seblu's avatar
Seblu committed

makepkg:
  stage: build
Seblu's avatar
Seblu committed
  rules:
Seblu's avatar
Seblu committed
  - if: '$CI_COMMIT_TAG'
Seblu's avatar
Seblu committed
    when: always
Seblu's avatar
Seblu committed
  when: manual
Seblu's avatar
Seblu committed
  script:
Seblu's avatar
Seblu committed
  - seblu-x86_64-build
Seblu's avatar
Seblu committed
  artifacts:
Seblu's avatar
Seblu committed
    name: $CI_PROJECT_NAME-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA
Seblu's avatar
Seblu committed
    expire_in: 3 month
Seblu's avatar
Seblu committed
    paths:
Seblu's avatar
Seblu committed
    - config.x86_64
    - "*.pkg.tar.*"
Seblu's avatar
Seblu committed

commitpkg:
  stage: deploy
Seblu's avatar
Seblu committed
  rules:
Seblu's avatar
Seblu committed
  - if: '$CI_COMMIT_TAG'
Seblu's avatar
Seblu committed
    when: always
  when: manual
Seblu's avatar
Seblu committed
  script:
Seblu's avatar
Seblu committed
  - eval $(ssh-agent -s)
  # - trap "kill $SSH_AGENT_PID" 0
  # trap is broken in gitlab runner, see:
  # https://gitlab.com/gitlab-org/gitlab-runner/issues/3009
  # use a workaournd with sleep and kill:
  - sleep 300 && kill "$SSH_AGENT_PID" & disown
  - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null
  - seblu-push