Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
forks
psy
psysh
Commits
870fb605
Commit
870fb605
authored
3 years ago
by
Sergey Latyshkov
Browse files
Options
Download
Patches
Plain Diff
[
ITDEPT-148
] Adding CI
parent
636ea9b9
bv0.1.7
v0.1.7
No related merge requests found
Pipeline
#28232
passed with stage
in 15 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+20
-0
.gitlab-ci.yml
with
20 additions
and
0 deletions
+20
-0
.gitlab-ci.yml
0 → 100644
+
20
−
0
View file @
870fb605
publish
:
image
:
curlimages/curl:latest
stage
:
build
rules
:
-
if
:
$CI_COMMIT_TAG
variables
:
URL
:
"
$CI_SERVER_PROTOCOL://$CI_SERVER_HOST:$CI_SERVER_PORT/api/v4/projects/$CI_PROJECT_ID/packages/composer?job_token=$CI_JOB_TOKEN"
script
:
-
version=$([[ -z "$CI_COMMIT_TAG" ]] && echo "branch=$CI_COMMIT_REF_NAME" || echo "tag=$CI_COMMIT_TAG")
-
insecure=$([ "$CI_SERVER_PROTOCOL" = "http" ] && echo "--insecure" || echo "")
-
response=$(curl -s -w "\n%{http_code}" $insecure --data $version $URL)
-
code=$(echo "$response" | tail -n 1)
-
body=$(echo "$response" | head -n 1)
# Output state information
-
if [ $code -eq 201 ]; then
echo "Package created - Code $code - $body";
else
echo "Could not create package - Code $code - $body";
exit 1;
fi
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets