0
votes

I have just set up CI for a new project that I am working on, my tests run and complete successfully, but when Semaphore attempts to upload my code to my Amazon Elastic Beanstalk instance, I get the error:

The version of application code on Elastic Beanstalk does not match the version that Semaphore sent in this deployment. Please check your AWS Elastic Beanstalk Console for more information.

With the JSON object printed:

{
"Environments": [
    {
        "ApplicationName": "my-app-server", 
        "EnvironmentName": "myappserver", 
        "VersionLabel": "Sample Application", 
        "Status": "Ready", 
        "EnvironmentLinks": [], 
        "EnvironmentId": "my_environment_id", 
        "EndpointURL": "my_server_ip", 
        "SolutionStackName": "64bit Amazon Linux 2016.03 v2.1.0 running Node.js", 
        "CNAME": "my_cname", 
        "Health": "Red", 
        "AbortableOperationInProgress": false, 
        "Tier": {
            "Version": " ", 
            "Type": "Standard", 
            "Name": "WebServer"
        }, 
        "HealthStatus": "Degraded", 
        "DateUpdated": "2016-04-14T16:10:46.905Z", 
        "DateCreated": "2016-04-14T15:44:41.965Z"
    }
]

}

NOTE: I have left out some details to hide the identity of my EB instance.

I am unsure as to why I am getting this error as I am deploying to a blank Elastic Beanstalk instance running Node.js. Surely if I have not configured an environment, the deployment should hit EB and install itself successfully?

I followed the semaphore guide found here to attempt to deploy my application.

1
Can you share the events from your AWS console? Your HealthStatus is Degraded, so there should be some info about why that happened. You should also check the logs at the AWS console, that’s where you’ll most likely find the source of the problem. Btw that error message that Semaphore shows you is because deploy wasn't successfully updated your application code.rastasheep
@rastasheep I have an slight idea as to what the problem is. Semaphore CI is sending the node code with node version 4.3.2, but Elastic beanstalk only supports up to 4.3.0. I've looked at other version that EB supports, but Semaphore is ALWAYS .2 of a version ahead. I deployed my code manually and everything runs fine. Any ideas?Halfpint
If you need some specific node version you can easily switch or install particular one with additional command in your deployment for example nvm install 4.3.0rastasheep
But elastic beanstalk does not support the versions compatible with semaphoreHalfpint
I understand, but you can install any version on semaphore "manually" by adding command that i've mentioned aboce.rastasheep

1 Answers

0
votes

This is an old post, but I just ran into this issue which seemed to just be a generic EB deployment issue where this error message is misleading. I have custom commands that run from a .ebextentions file and when one of these commands fails, I get the error:

The version of application code on Elastic Beanstalk does not match the version that Semaphore sent in this deployment