Commit 4981caa2 authored by Luc Didry's avatar Luc Didry

[CI] Add .gitlab-ci.yml

parent f3bac83e
Pipeline #97133 passed with stage
in 47 seconds
*swp
blib/*
Makefile.old
Makefile
MYMETA.*
App-padconsole*.tar.gz
stages:
- test
- tags
### Tests
##
#
test:
image: hatsoftwares/padconsole:latest
stage: test
retry: 2
except:
- tags
script:
- cpanm -q --installdeps .
- perl Makefile.PL
- make
- make test
- make install
### Publish tag changelog
##
#
publish_changelog:
image: hatsoftwares/curl-jq:latest
stage: tags
script:
- export PROJECT_API_URL="https://framagit.org/api/v4/projects/${CI_PROJECT_ID}"
- export DESCRIPTION_URL="${PROJECT_API_URL}/repository/tags/${CI_COMMIT_TAG}/release"
- 'export HEADER="Private-Token: ${GITLAB_API_TOKEN}"'
- sed -n '/^'$CI_COMMIT_TAG'[[:space:]]/,/^[^\t]/p' Changes | sed -e 's/^[^\t].*//' -e 's/\t//g' | sed '/^[[:space:]]*$/d' > /tmp/text
- if [[ ! -z $GITLAB_API_TOKEN ]]; then curl -s --request POST --data-urlencode "description@/tmp/text" --header "${HEADER}" "${DESCRIPTION_URL}"; fi
only:
- tags
### Toot tag
##
#
pouet-it:
image: hatsoftwares/pouet-it-from-ci:latest
stage: tags
script:
- cd /opt/pouet-it-from-ci
- export project="$(echo $CI_PROJECT_NAME | perl -p -e 's/(?:^(.)|-(.))/\U$1\U$2/g')"
- export MESSAGE=$(echo -e "Je viens de sortir "'#'"${project} en version ${CI_COMMIT_TAG} !""\n${CI_PROJECT_URL}/tags/${CI_COMMIT_TAG}")
- carton exec ./pouet-it-from-ci.pl
only:
- tags
......@@ -5,4 +5,4 @@ Makefile.PL
MANIFEST This list of files
padconsole
README
test.pl
t/test.t
requires 'Etherpad', '>= 1.2.13.1';
requires 'Term::ReadLine';
requires 'Config::YAML';
requires 'URI::Escape';
requires 'DateTime';
requires 'Browser::Open';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment