404 on PackageUpload route

When I try to push a package to the PackageUpload route (http://octopus-server/octopus/api/packages/raw) I get a 404 HTTP response with the error “The resource was not found on this server.”

I am using the @octopusdeploy/gulp-octo package.

Running Octopus 3.3.0-beta0001.

Hi,
Its great to see you trying out our new beta build and experimenting with some of its cool new features.
As for your 404 error, I suspect it is because you are providing the full PackageUpload route in the host field when configuring your gulp task. If you specify just the base path to your octopus deploy instance (e.g. http://my-octopus-server) then the push module will append the appropriate route to the upload location.
Perhaps we should make the error message and documentation more clear on this matter.

Let me know if you have any further questions around this feature, or the above steps fail to work.
Thanks again,
Rob

Sorry, my initial example was a little unclear. I was just specifying the eventual endpoint that the request ends up at.

Here is what the publish task looks like in our Gulpfile.

gulp.task('publish', () => {
    gulp.src('dist/**/*')
        .pipe(octo.pack('zip', {
            packagejson: path.join(__dirname, 'package.json'),
            id: 'my-project'
        }))
        .pipe(octo.push({
            host: 'http://my-server:9090/octopus',
            apiKey: 'API-XXXXXXXXXXXXXXXXXXXXXXXXX'
        }));
});

I did figure out the issue though. Our Octopus instance is running behind a URL path, which was not being respected in the URL generation on octopack.js.

I submitted a pull request to fix this issue.

Hi again,
With the tests in the PR i can now see what you are talking about. Thanks for taking the time to put it together. I have merged the changes in and bumped up the number so it should now be available through npm. One of the key advantages of providing these tools as open source is that we can get great contributions like this from the community that actually use it.
Please let us know what your experiences and thoughts are with doing these node deployments as they are a new feature and feedback from our users will enable us to make it even better in the future.
Thanks again, and I hope these changes allow you to continue with your work.
Cheers,
Rob

Thanks for getting that merged quickly!

I can’t see @octopusdeploy/gulp-octo@0.0.7 on npm yet, but I’ll give it a little while longer to propagate.