Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Ridwan Hidayat
go-wisata
Commits
e240029d
Commit
e240029d
authored
2 years ago
by
Deny Febriawan
Browse files
Options
Download
Email Patches
Plain Diff
Update .gitlab-ci.yml
parent
a3109277
main
No related merge requests found
Pipeline
#1778
failed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+9
-23
.gitlab-ci.yml
with
9 additions
and
23 deletions
+9
-23
.gitlab-ci.yml
View file @
e240029d
# This file is a template, and might need editing before it works on your project.
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Composer.gitlab-ci.yml
stages
:
-
main
# Publishes a tag/branch to Composer Packages of the current project
publish
:
image
:
curlimages/curl:latest
stage
:
build
variables
:
URL
:
"
$CI_SERVER_PROTOCOL://$CI_SERVER_HOST:$CI_SERVER_PORT/api/v4/projects/$CI_PROJECT_ID/packages/composer?job_token=$CI_JOB_TOKEN"
# upload job, see https://lftp.yar.ru/lftp-man.html
main
:
stage
:
main
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
-
apt-get update -qq && apt-get install -y -qq lftp
-
lftp -c "set ftp:ssl-allow no; open -u $USER,$PASSWD $HOST; mirror -Rnev --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/ "
only
:
-
main
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help