Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check hash of application to deploy before and after deployment #31

Open
Cosaquee opened this issue Jan 15, 2016 · 0 comments
Open

Check hash of application to deploy before and after deployment #31

Cosaquee opened this issue Jan 15, 2016 · 0 comments

Comments

@Cosaquee
Copy link
Contributor

Provider for jboss_deploy type should take into consideration the content hash and compare it to the calculated hash of target file to be deployed. If both hashes do not match, provider should redeploy the artifact with target one and change should be reported as different content, hash changed from '{md5}59381b178aeeb198ef8d69e85e41702aaec5d80' to '{md5}e6d07fd0403ea06c6531155d80e1614b'

Here are the example CLI command with output:

[domain@localhost:9999 /] /deployment=sample-app:read-resource()
{
    "outcome" => "success",
    "result" => {
        "content" => [{"hash" => bytes {
            0x59, 0x38, 0x1b, 0x17, 0x8a, 0xee, 0xb1, 0x98,
            0xef, 0x8d, 0x69, 0xe8, 0x5e, 0x41, 0x70, 0x2a,
            0x0a, 0xec, 0x5d, 0x80
        }}],
        "name" => "sample-app",
        "runtime-name" => "sample-app"
    }
}

Notice that you can read those byte in Ruby like that:

bytes = [0x59, 0x38, 0x1b, 0x17, 0x8a, 0xee, 0xb1, 0x98, 0xef, 0x8d, 0x69, 0xe8, 0x5e, 0x41, 0x70, 0x2a, 0x0a, 0xec, 0x5d, 0x80]              
bytes.map {|b| b.to_s(16) }.join('')
=> "59381b178aeeb198ef8d69e85e41702aaec5d80"
@Cosaquee Cosaquee added this to the v1.0.4 - WildOpal milestone Jan 15, 2016
@Cosaquee Cosaquee assigned Cosaquee and cardil and unassigned Cosaquee Jan 15, 2016
@Cosaquee Cosaquee removed the bug label Jan 15, 2016
@cardil cardil removed their assignment Jan 21, 2016
@cardil cardil modified the milestones: v1.0.4 - WildOpal, v1.1.0 - RiverBlue Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants