This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| gitlab_satis [2018/11/14 14:12] – [Configuration] admin | gitlab_satis [2018/11/14 15:54] (current) – [Optional] admin | ||
|---|---|---|---|
| Line 113: | Line 113: | ||
| <code ruby gitlab_pages_satis.rb> | <code ruby gitlab_pages_satis.rb> | ||
| # | # | ||
| + | |||
| + | #### Config begin | ||
| + | |||
| + | # Trigger Token, see Project -> Settings -> CI/CD -> Pipeline triggers | ||
| + | trigger_token=" | ||
| + | |||
| + | # Private Token, see User -> Access Tokens -> Personal Access Tokens | ||
| + | auth_token=" | ||
| + | |||
| + | # GitLab install | ||
| + | gitlab_url=" | ||
| + | |||
| + | # Satis Project id (integer, not the project name) | ||
| + | satis_project_id=" | ||
| + | |||
| + | #### Config end | ||
| require ' | require ' | ||
| Line 118: | Line 134: | ||
| payload = JSON.parse(STDIN.read) | payload = JSON.parse(STDIN.read) | ||
| - | |||
| # Only run this code in case we are dealing with tag_push event | # Only run this code in case we are dealing with tag_push event | ||
| Line 133: | Line 148: | ||
| File.delete(shaFile) if File.exist? | File.delete(shaFile) if File.exist? | ||
| File.write(shaFile, | File.write(shaFile, | ||
| + | |||
| + | # Check if composer files exists in project | ||
| + | project_id="# | ||
| + | composerExists = `curl -o /dev/null -s -w \" | ||
| # Trigger Pipeline | # Trigger Pipeline | ||
| - | if payloadBefore != payloadCurrent | + | if payloadBefore != payloadCurrent |
| - | | + | |
| end | end | ||
| end | end | ||
| </ | </ | ||