Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Commit

Permalink
Add serialized entitlements to release metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
emosbaugh committed Aug 22, 2019
1 parent 52045a3 commit e95dcc8
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 20 deletions.
2 changes: 1 addition & 1 deletion integration/base/amazon-eks/expected/.ship/state.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v1": {
"config": {},
"contentSHA": "527545696c450ec581798c1601038d2d2e6bd908fee62565fc83b804dc60826a",
"contentSHA": "7f07828110e7afe3336ce139768c3f52faaf70bb365245c8709537f321f344e2",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/basic-stateless/expected/.ship/state.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v1": {
"config": {},
"contentSHA": "6b1f9bdfd91e63e1d9edb8b4c0cf755cd04e9c3d740614a8bbb63f73b2368c48",
"contentSHA": "99b3e6669a45267266de25d67dde741d2bdc4bff6a81c01edd0200292d59a132",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/basic/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"config": {
"test_option": "abc123_test-option-value"
},
"contentSHA": "6b1f9bdfd91e63e1d9edb8b4c0cf755cd04e9c3d740614a8bbb63f73b2368c48",
"contentSHA": "99b3e6669a45267266de25d67dde741d2bdc4bff6a81c01edd0200292d59a132",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"t2_option": "abc123_abc123",
"t3_option": "abc123_abc123 + abc123"
},
"contentSHA": "7c1aefcd8b8db99572df196fb9d9fde61040a8c9bc4c2c89c479d62e9c243b6d",
"contentSHA": "14a1a67ed97cf68b65d8e4a5b6ed6d62e640e913805a9a9240238cffb45a62ee",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/config-chain/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"t2_option": "abc123_abc123",
"t3_option": "abc123_abc123 + abc123"
},
"contentSHA": "7c1aefcd8b8db99572df196fb9d9fde61040a8c9bc4c2c89c479d62e9c243b6d",
"contentSHA": "14a1a67ed97cf68b65d8e4a5b6ed6d62e640e913805a9a9240238cffb45a62ee",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/default-values/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"namespace": "Alpha",
"scheduler": ""
},
"contentSHA": "fa5030e0eac3e253027361298a9194be4a5e39b41de1f4ad5dea10ea6e20edc9",
"contentSHA": "ca14f075f45c9eccc8e32667a25b43cb99bb93afcae778a33dbea5e84ffb65e0",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/docker/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"config": {
"test_option": "abc123_test-option-value"
},
"contentSHA": "db472b85ff0e9092e8a0e8d9f99426a16dd01914c6dc57d1aa3468b384efdfd7",
"contentSHA": "fc9012f04acb08596cd148406c326eaaba3753132657467e318f9e6d8452c989",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/helm-nginx/expected/.ship/state.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v1": {
"config": {},
"contentSHA": "aba681edb8abd09e6bf579c6b7067ad497400f9df083c47bc40031ab6d8d5e22",
"contentSHA": "f187348fb06d0fa75c3c87121610bfc620657bab3abff4037fe1379da3630015",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
2 changes: 1 addition & 1 deletion integration/base/web/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"methodType": "GET",
"resourceURL": "https://raw.githubusercontent.com/replicatedhq/test-charts/5bf016aac1786cb74c678c3419bb8623f0388f8d/web-asset/web-asset"
},
"contentSHA": "758973a817c37127f2ad68fe01a25a377a294a68b73ff7f5a367f7a03ba30bfc",
"contentSHA": "9ffcb08705479c37b7a39bb6604d5fd872f2dcbfa612968518b3b7fd2664a97d",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"v1": {
"config": {},
"upstream": "__upstream__",
"contentSHA": "a682a4883b682d147acbdd00e90e058574ee8abb611c461fde9ab9241899feeb",
"contentSHA": "c13ef9e0026b0a6c0da9a04462b85fa32b8da1fe7e3941484533972135658dac",
"metadata": {
"applicationType": "replicated.app",
"customerID": "__customerID__",
Expand Down
2 changes: 1 addition & 1 deletion integration/init_app/basic/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"v1": {
"config": {},
"upstream": "__upstream__",
"contentSHA": "37cbc1ee09877a15e0546122aef478713fbbc687d46b0fde0177928e2f4337d5",
"contentSHA": "3a635f19cc72cadac5cf9329e41d746563e1dba62c0622d4a86b51c48af88d8a",
"metadata": {
"applicationType": "replicated.app",
"customerID": "__customerID__",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sequence": 0,
"version": "0.0.1"
},
"contentSHA": "301ee57127cff107fdbac348de7bd64ccc0bf44e0f866f5f4ada2800f60387ce",
"contentSHA": "53d28fa04cb44b9c3e68375030ea8f8b7f18491b5b82382b9236d3c4adb53fc7",
"upstreamContents": {
"appRelease": {
"id": "oVSYJqtZnSew_8A3fFuwz0WPwn40zjn6",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"sequence": 0,
"version": "1.0.0-SNAPSHOT"
},
"contentSHA": "efe591f39f16444b5dd815d485f7ccf80d213f1678cd737a4c37eab1668d9c98",
"contentSHA": "759f734ed80b297851cc19d28c2bf0f598d97569a51b33ceaf866cf1fc16ddcb",
"upstreamContents": {
"appRelease": {
"id": "jDtI-DiraCbkN5euJHmbS3kIFw4N1Iw9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"option": "abc123"
},
"upstream": "__upstream__",
"contentSHA": "3df92698e596a2920fb4d437a4155052544142e0a247813d092aa32b5e921aff",
"contentSHA": "30d3d6aede4c3c5a7b4ae540f038d56b9328e895a8d77e448abcda90cc021d71",
"metadata": {
"applicationType": "replicated.app",
"customerID": "__customerID__",
Expand Down
2 changes: 1 addition & 1 deletion integration/init_app/helm-github/expected/.ship/state.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"v1": {
"config": {},
"contentSHA": "8ac80c107e69986c9dd4ca9f7eec75790a2582bd14f2fc67d516837636694fdf",
"contentSHA": "cc2a616f1b7f5df5ab51e0d4beb1daf3080bf6db805de91df0ef45096672b3c6",
"releaseName": "integration-replicated-app-helm-github",
"upstream": "__upstream__",
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"v1": {
"config": {},
"upstream": "__upstream__",
"contentSHA": "43b66ada3c5e0b44840a9a2fda7633a7253b19856d98a6fea578ea1e01960268",
"contentSHA": "6cc8fa0961b5e1fe05bb5846ac933cee8e9dd206357350bf24551b59b44d6bd2",
"metadata": {
"applicationType": "replicated.app",
"customerID": "__customerID__",
Expand Down
3 changes: 2 additions & 1 deletion integration/init_app/license-info/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"last_updated": "0001-01-01T00:00:00Z",
"customer_id": ""
},
"serialized": "{\"entitlements\":[],\"meta\":{\"customerID\":\"CKk--APIp5SkXA0Z5os1hne8Sr_McDmI\",\"lastUpdated\":\"0001-01-01T00:00:00Z\"}}",
"signature": "eVlVacoh3aPSx+EvhmD+B8vG3QicsaWkJ+9vcFReB2xRgPtNgedfQkS7bmJxNwCHZlcOXX/m1io5IkFFXPdW4mXvIRO/5p6xJWFj/icU1iHOBPYf6Q2pEC9+ylXAj8upyPPGGJc+MN5X83Sxk/JumRJPMCNoykwgixkai7NtiZgEjvyfMLPZhYwZ5MBNEv6CJ5NCCw7JO1Ga8G6CDa6E3NLsFJLLLcYUQO+7+hDb9IMxkynHJCoazJ1587fVUgeZ1QLt+mWdJoILn+ioDH4TJ0XZMWvLdRDoV6JTugs1O3O9qh3sMu5C2fow0i3Cnr+K8DsWDpazXTBQzd2ZIuUFf02CgCEF+0M/o9DMbpocePjmHufxZXcEl3jv8rMv5wa6civwRA9W8dbv+eepMf4ngcUP/hxz4WkCSTWT5Zf6+JngXYylDZta+/HnzRMczhG9Laaa+TRhm+fsxApQ4wORvdms3xwcxg35FTzUy4gMoSCLFiNjN7e/GZWsb9NYlFoI/sfhqVsNljFJlN4+XgqEGyU1tn4ggdBeQ9J4/E6NUkvu8+lWqfvNrapGNm2+3J7hAIvfpNo/sOXLGfbHjXu+hM3RWkxgvVKecqMeEAO0MSNZouIRMKmT/qHz15Ds7vww0lkRKQG2xcXFitLVCglcAe2ApriNTAY19MWBVVMUKfY=",
"values": [
{
Expand Down Expand Up @@ -75,6 +76,6 @@
"buildTime": "0001-01-01T00:00:00Z",
"dependencies": {}
},
"contentSHA": "c1e6486e6e3c2c4e49dac714aa8c151a024765575e20a8348541cf0833c70114"
"contentSHA": "21e1e1d408b05347ce52dd19915f6ac607d67f4afd7f69f7bdaac49a5c9a4a23"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ entitlements:
meta:
lastupdated: 0001-01-01T00:00:00Z
customerid: ""
signature: replaced signature
serialized: '{"entitlements":[],"meta":{"customerID":"CKk--APIp5SkXA0Z5os1hne8Sr_McDmI","lastUpdated":"0001-01-01T00:00:00Z"}}'
signature: eVlVacoh3aPSx+EvhmD+B8vG3QicsaWkJ+9vcFReB2xRgPtNgedfQkS7bmJxNwCHZlcOXX/m1io5IkFFXPdW4mXvIRO/5p6xJWFj/icU1iHOBPYf6Q2pEC9+ylXAj8upyPPGGJc+MN5X83Sxk/JumRJPMCNoykwgixkai7NtiZgEjvyfMLPZhYwZ5MBNEv6CJ5NCCw7JO1Ga8G6CDa6E3NLsFJLLLcYUQO+7+hDb9IMxkynHJCoazJ1587fVUgeZ1QLt+mWdJoILn+ioDH4TJ0XZMWvLdRDoV6JTugs1O3O9qh3sMu5C2fow0i3Cnr+K8DsWDpazXTBQzd2ZIuUFf02CgCEF+0M/o9DMbpocePjmHufxZXcEl3jv8rMv5wa6civwRA9W8dbv+eepMf4ngcUP/hxz4WkCSTWT5Zf6+JngXYylDZta+/HnzRMczhG9Laaa+TRhm+fsxApQ4wORvdms3xwcxg35FTzUy4gMoSCLFiNjN7e/GZWsb9NYlFoI/sfhqVsNljFJlN4+XgqEGyU1tn4ggdBeQ9J4/E6NUkvu8+lWqfvNrapGNm2+3J7hAIvfpNo/sOXLGfbHjXu+hM3RWkxgvVKecqMeEAO0MSNZouIRMKmT/qHz15Ds7vww0lkRKQG2xcXFitLVCglcAe2ApriNTAY19MWBVVMUKfY=
values:
- key: my_field
value: The default
Expand Down
1 change: 0 additions & 1 deletion integration/init_app/license-info/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ app_slug: "ship-integration-testing"
release_version: "0.0.1"
replacements:
"installed.*" : "installed: replaced datetime"
"signature.*" : "signature: replaced signature"
skip_cleanup: false
skip_edit: false
skip_init: true
2 changes: 1 addition & 1 deletion integration/update/app_basic/expected/.ship/state.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"v1": {
"config": {},
"upstream": "staging.replicated.app/some-cool-ci-tool?installation_id=3Z6uuPbVz6jTxRuXHn_l6UlYQz3hWz6-&customer_id=-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
"contentSHA": "37cbc1ee09877a15e0546122aef478713fbbc687d46b0fde0177928e2f4337d5",
"contentSHA": "3a635f19cc72cadac5cf9329e41d746563e1dba62c0622d4a86b51c48af88d8a",
"metadata": {
"applicationType": "replicated.app",
"customerID": "-Am-_6i5pw0u4AbspOwKN4lZUCn49u_G",
Expand Down
1 change: 1 addition & 0 deletions pkg/api/entitlements.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type Utilization struct {
// Entitlements is a signed object containing entitlments info+metadata
type Entitlements struct {
Meta Meta `json:"meta"`
Serialized string `json:"serialized"`
Signature string `json:"signature"`
Values []EntitlementValue `json:"values,omitempty"`
Utilizations []Utilization `json:"utilizations,omitempty"`
Expand Down

0 comments on commit e95dcc8

Please sign in to comment.