How to upload to FTP from Travis CI
I need to upload all the files in the Travis root directory to an FTP server after my build steps are completed. Travis CI's documentation for custom deployment suggests using curl to send the files. Unfortunately curl FTP upload doesn't support globing, which makes a large amount of files practically impossible.
How can I make sure my whole directory, including all files and subdirs, are uploaded to FTP?
Is there an elegant way to do this or is it better to rely on tools like grunt for uploading to FTP?
curl ftp gruntjs travis-ci
add a comment |
I need to upload all the files in the Travis root directory to an FTP server after my build steps are completed. Travis CI's documentation for custom deployment suggests using curl to send the files. Unfortunately curl FTP upload doesn't support globing, which makes a large amount of files practically impossible.
How can I make sure my whole directory, including all files and subdirs, are uploaded to FTP?
Is there an elegant way to do this or is it better to rely on tools like grunt for uploading to FTP?
curl ftp gruntjs travis-ci
add a comment |
I need to upload all the files in the Travis root directory to an FTP server after my build steps are completed. Travis CI's documentation for custom deployment suggests using curl to send the files. Unfortunately curl FTP upload doesn't support globing, which makes a large amount of files practically impossible.
How can I make sure my whole directory, including all files and subdirs, are uploaded to FTP?
Is there an elegant way to do this or is it better to rely on tools like grunt for uploading to FTP?
curl ftp gruntjs travis-ci
I need to upload all the files in the Travis root directory to an FTP server after my build steps are completed. Travis CI's documentation for custom deployment suggests using curl to send the files. Unfortunately curl FTP upload doesn't support globing, which makes a large amount of files practically impossible.
How can I make sure my whole directory, including all files and subdirs, are uploaded to FTP?
Is there an elegant way to do this or is it better to rely on tools like grunt for uploading to FTP?
curl ftp gruntjs travis-ci
curl ftp gruntjs travis-ci
edited May 19 '17 at 7:52
Steven M. Vascellaro
5,48794090
5,48794090
asked Oct 27 '14 at 14:11
stephanlindauerstephanlindauer
522517
522517
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
The Travis doc says only that you should do this kind of stuffs in the after_success:
section. The specified command is just an example.
So, do what you want from your computer, then put the sequence of commands that you used in the after_success:
section.
In your case, creating an archive (with tar
) and then uploading it (with curl
or directly with ftp
) should work, if I correctly understood your needs.
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
add a comment |
Sometimes the below link will help. Its about FTP deployment in node_js app.
Travis build with nodejs en custom ftp
add a comment |
- Use the find command to add everything except for specific folders.
- Add the environment variables
SFTP_USER
andSFTP_PASSWORD
in the Settings menu.
This is my yml:
language: node_js
after_success:
- find . -type d ( -path "./.*" -o -path "./node_modules" ) -prune -o -name "*" -print -exec curl --ftp-create-dirs -T {} ftp://your.server.com/dir/ --user ${SFTP_USER}:${SFTP_PASSWORD} ;
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26589441%2fhow-to-upload-to-ftp-from-travis-ci%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
The Travis doc says only that you should do this kind of stuffs in the after_success:
section. The specified command is just an example.
So, do what you want from your computer, then put the sequence of commands that you used in the after_success:
section.
In your case, creating an archive (with tar
) and then uploading it (with curl
or directly with ftp
) should work, if I correctly understood your needs.
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
add a comment |
The Travis doc says only that you should do this kind of stuffs in the after_success:
section. The specified command is just an example.
So, do what you want from your computer, then put the sequence of commands that you used in the after_success:
section.
In your case, creating an archive (with tar
) and then uploading it (with curl
or directly with ftp
) should work, if I correctly understood your needs.
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
add a comment |
The Travis doc says only that you should do this kind of stuffs in the after_success:
section. The specified command is just an example.
So, do what you want from your computer, then put the sequence of commands that you used in the after_success:
section.
In your case, creating an archive (with tar
) and then uploading it (with curl
or directly with ftp
) should work, if I correctly understood your needs.
The Travis doc says only that you should do this kind of stuffs in the after_success:
section. The specified command is just an example.
So, do what you want from your computer, then put the sequence of commands that you used in the after_success:
section.
In your case, creating an archive (with tar
) and then uploading it (with curl
or directly with ftp
) should work, if I correctly understood your needs.
answered Oct 30 '14 at 17:01
Guillaume PascalGuillaume Pascal
7321817
7321817
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
add a comment |
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
@stephanlindauer : Please, let me know if my answer helped you, or if you need more help.
– Guillaume Pascal
Nov 4 '14 at 17:23
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
thanks for your answer. what i actually need is a way of uploading multiple files. if i just upload a tar then have the problem of not being able to trigger uncompressing that tar from my build job. the way i do things now is to just use grunt to upload all files to my ftp server.
– stephanlindauer
Nov 7 '14 at 11:33
add a comment |
Sometimes the below link will help. Its about FTP deployment in node_js app.
Travis build with nodejs en custom ftp
add a comment |
Sometimes the below link will help. Its about FTP deployment in node_js app.
Travis build with nodejs en custom ftp
add a comment |
Sometimes the below link will help. Its about FTP deployment in node_js app.
Travis build with nodejs en custom ftp
Sometimes the below link will help. Its about FTP deployment in node_js app.
Travis build with nodejs en custom ftp
edited May 23 '17 at 12:18
Community♦
11
11
answered Nov 10 '15 at 16:57
Joy George KunjikkuruJoy George Kunjikkuru
1,2201224
1,2201224
add a comment |
add a comment |
- Use the find command to add everything except for specific folders.
- Add the environment variables
SFTP_USER
andSFTP_PASSWORD
in the Settings menu.
This is my yml:
language: node_js
after_success:
- find . -type d ( -path "./.*" -o -path "./node_modules" ) -prune -o -name "*" -print -exec curl --ftp-create-dirs -T {} ftp://your.server.com/dir/ --user ${SFTP_USER}:${SFTP_PASSWORD} ;
add a comment |
- Use the find command to add everything except for specific folders.
- Add the environment variables
SFTP_USER
andSFTP_PASSWORD
in the Settings menu.
This is my yml:
language: node_js
after_success:
- find . -type d ( -path "./.*" -o -path "./node_modules" ) -prune -o -name "*" -print -exec curl --ftp-create-dirs -T {} ftp://your.server.com/dir/ --user ${SFTP_USER}:${SFTP_PASSWORD} ;
add a comment |
- Use the find command to add everything except for specific folders.
- Add the environment variables
SFTP_USER
andSFTP_PASSWORD
in the Settings menu.
This is my yml:
language: node_js
after_success:
- find . -type d ( -path "./.*" -o -path "./node_modules" ) -prune -o -name "*" -print -exec curl --ftp-create-dirs -T {} ftp://your.server.com/dir/ --user ${SFTP_USER}:${SFTP_PASSWORD} ;
- Use the find command to add everything except for specific folders.
- Add the environment variables
SFTP_USER
andSFTP_PASSWORD
in the Settings menu.
This is my yml:
language: node_js
after_success:
- find . -type d ( -path "./.*" -o -path "./node_modules" ) -prune -o -name "*" -print -exec curl --ftp-create-dirs -T {} ftp://your.server.com/dir/ --user ${SFTP_USER}:${SFTP_PASSWORD} ;
answered Nov 22 '18 at 3:14
Kemal AhmedKemal Ahmed
527
527
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f26589441%2fhow-to-upload-to-ftp-from-travis-ci%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown