Git Product home page Git Product logo

vsts-tomcat's Introduction

vsts-tomcat

This is the source code repository of Apache Tomcat extension for Visual Studio Team Services. This extension contains VSTS build tasks for deploying apps to Tomcat.

Working with this repo

(assuming node is installed)

Once:

$ npm install
$ npm install gulp -g
$ npm install tfx-cli -g

Build:

$ gulp build

Test:

$ gulp test

Package (vsix will be generated at _build/package):

$ gulp package

vsts-tomcat's People

Contributors

chperich avatar chshrikh avatar davidstaheli avatar jessehouwing avatar krishnaadityab avatar microsoft-github-policy-service[bot] avatar niadak avatar roopeshnair avatar vincent1173 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsts-tomcat's Issues

Tomcat 8.0.44 Doesn't seem to support this

The Latest Tomcat Web App is based on 8.0.44 in Azure Marketplace.
I managed to get the Tomcat Manager access, and cURL APIs enabled.

Unfortunately the "Deploy to Apache Tomcat Task" seems to perform an unsupported call:

==============================================================================
2017-07-29T16:02:19.7357780Z Task : Deploy to Apache Tomcat
2017-07-29T16:02:19.7357780Z Description : Deploy application to a Tomcat server.
2017-07-29T16:02:19.7357780Z Version : 0.1.3
2017-07-29T16:02:19.7357780Z Author : Microsoft Corporation
2017-07-29T16:02:19.7357780Z Help : More Information
2017-07-29T16:02:19.7357780Z ==============================================================================
2017-07-29T16:02:20.5877548Z [command]C:\Program Files\Git\usr\bin*curl.exe --stderr - --fail -o d:\a_temp\tomcatResponse_1501344140562.txt -u YYYYY:XXXX -T d:\a\r1\a\damage-report-artifacts\damage-report\damage-report.war http://REMOVED.azurewebsites.net/manager/text/deploy?path=/damage-report&update=true*
2017-07-29T16:02:21.2362504Z % Total % Received % Xferd Average Speed Time Time Time Current

2017-07-29T16:02:21.8310876Z curl: (22) The requested URL returned error: 404 Not Found
2017-07-29T16:02:21.8460877Z ##[error]Error: C:\Program Files\Git\usr\bin\curl.exe failed with return code: 22

When I reproduce it locally (from my windows desktop) I get the same error, checking it in Fiddler revealed that update=true option is not recognized.

Removing it doesn't help either. Interestingly enough using Tomcat Manager I was not able to deploy my WAR file.

I simply FTP it over.
Disappointing..

Not found curl: null

Hello guys,

Let me explain what I am doing, I am using this task. The problem comes when the agent tries to deploy my .war in my Tomcat. My Tomcat is a docker container that I have already configured the manager, I have set the roles etc. It is running in my localhost:8080. So, the logs says this "Not found curl: null". I checked the capabilities of my agent and it has this capability also in the path.
I have already attached an image but I will add the path here

path:C:_tools\jdk-17.0.5.8-hotspot\bin;C:\Python39\Scripts;C:\Python39;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\dotnet;C:\Program Files\Git\cmd;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\nodejs;C:\maven\apache-maven-3.8.6\bin;C:\Program Files\Git\mingw64\bin\curl.exe;C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Microsoft\WindowsApps

capability curl.

The issue reported is this "Not found curl: null" in my pipeline
image

Please I am desperate, I dont know if I am doing something wrong. Please I need help

Thank you so much!

curl.exe failed with return code: 7

Trying to use this task and I get the following error. Any suggestions on what needs to be changed in order to run the task successfully? Thanks

password is exposed in the log of the pipeline

It happens even though I have password taken from the variable that I have marked as secret.

Here's the YAML version of the step in my deployment pipeline:

steps:
- task: ms-vscs-rm.apachetomcat.tomcatdeployment-task.TomcatDeployment@1
  displayName: 'Deploy application to a Tomcat server - ew.war'
  inputs:
    TomcatUrl: 'http://tomcat-server'
    Username: '$(TOMCAT_ADMIN_USERNAME)'
    Password: '$(TOMCAT_ADMIN_PASSWORD)'
    Warfile: '$(System.DefaultWorkingDirectory)/_NEDB-NG/ew.war/ew.war'
    Context: /ew

and here are the variables (set in build pipeline):

2021-11-25_15-45

The deployment step still lists it, along with other curl paramaters: (instead of <EDITED> I can see my password).

2021-11-25T13:46:38.8162892Z ##[section]Starting: Deploy application to a Tomcat server - ew.war
2021-11-25T13:46:38.8171102Z ==============================================================================
2021-11-25T13:46:38.8171444Z Task         : Deploy to Apache Tomcat
2021-11-25T13:46:38.8171685Z Description  : Deploy application to a Tomcat server.
2021-11-25T13:46:38.8171925Z Version      : 1.0.0
2021-11-25T13:46:38.8172140Z Author       : Microsoft Corporation
2021-11-25T13:46:38.8172413Z…admin:<EDITED> -T /home/agent.admin/build-agent/_work/r2/a/_NEDB-NG/ew.war/ew.war http://tomcat-server/manager/text/deploy?path=/ew/&update=true
2021-11-25T13:46:38.9221092Z   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
2021-11-25T13:46:38.9221794Z                                  Dload  Upload   Total   Spent    Left  Speed
2021-11-25T13:46:38.9222092Z 
2021-11-25T13:46:40.7077245Z   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0

Improve error descriptions for tomcat deployment task

I use the "Deploy to Tomcat" task to deploy a .war file to a Linux VM on azure. I realized that the task creates a new folder on the target environment. The folder name equals the {filename} of the uploaded war-file.
Since my filename was "ROOT.war" the task tries to create/copy the file into the ROOT folder of the Linux host, which is not possible.

It took me a while to figure that out, because the error message of the task was
curl: (55) Send failure: Connection reset by peer
##[error]Error: C:\Program Files\Git\usr\bin\curl.exe failed with return code: 55

Is it possible to provide better or more detailed feedback?

Regards,
Karsten

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.