summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2019-08-21 09:27:32 +0000
committerThong Kuah <tkuah@gitlab.com>2019-08-21 09:27:32 +0000
commit086d4c8eb727fce1796a5363c7f4102e869c86a3 (patch)
tree700ec1bcdcd1a95a1692f7648225ba4b7ec1caf1
parentda1e8ee4420a8480785c351ad6edd1bcafd96d9b (diff)
parent92ac94c26e408842c6dfa44aae93e147a0f3d8f8 (diff)
downloadgitlab-ce-086d4c8eb727fce1796a5363c7f4102e869c86a3.tar.gz
Merge branch '56130-deployed_at' into 'master'
Replace finished_at with deployed_at for the internal API Deployment entity See merge request gitlab-org/gitlab-ce!32000
-rw-r--r--app/serializers/deployment_entity.rb2
-rw-r--r--app/serializers/deployment_serializer.rb2
-rw-r--r--changelogs/unreleased/56130-deployed_at.yml5
-rw-r--r--spec/fixtures/api/schemas/deployment.json4
-rw-r--r--spec/serializers/deployment_entity_spec.rb4
5 files changed, 11 insertions, 6 deletions
diff --git a/app/serializers/deployment_entity.rb b/app/serializers/deployment_entity.rb
index 6e91317eb20..d6466ad1cdd 100644
--- a/app/serializers/deployment_entity.rb
+++ b/app/serializers/deployment_entity.rb
@@ -18,7 +18,7 @@ class DeploymentEntity < Grape::Entity
end
expose :created_at
- expose :finished_at
+ expose :deployed_at
expose :tag
expose :last?
expose :user, using: UserEntity
diff --git a/app/serializers/deployment_serializer.rb b/app/serializers/deployment_serializer.rb
index 3fd3e1b9cc8..b48037dd53f 100644
--- a/app/serializers/deployment_serializer.rb
+++ b/app/serializers/deployment_serializer.rb
@@ -4,7 +4,7 @@ class DeploymentSerializer < BaseSerializer
entity DeploymentEntity
def represent_concise(resource, opts = {})
- opts[:only] = [:iid, :id, :sha, :created_at, :finished_at, :tag, :last?, :id, ref: [:name]]
+ opts[:only] = [:iid, :id, :sha, :created_at, :deployed_at, :tag, :last?, :id, ref: [:name]]
represent(resource, opts)
end
end
diff --git a/changelogs/unreleased/56130-deployed_at.yml b/changelogs/unreleased/56130-deployed_at.yml
new file mode 100644
index 00000000000..c53658de752
--- /dev/null
+++ b/changelogs/unreleased/56130-deployed_at.yml
@@ -0,0 +1,5 @@
+---
+title: Replace finished_at with deployed_at for the internal API Deployment entity
+merge_request: 32000
+author:
+type: other
diff --git a/spec/fixtures/api/schemas/deployment.json b/spec/fixtures/api/schemas/deployment.json
index 9216ad0060b..fe725b97c21 100644
--- a/spec/fixtures/api/schemas/deployment.json
+++ b/spec/fixtures/api/schemas/deployment.json
@@ -3,7 +3,7 @@
"required": [
"sha",
"created_at",
- "finished_at",
+ "deployed_at",
"iid",
"tag",
"last?",
@@ -12,7 +12,7 @@
],
"properties": {
"created_at": { "type": "string" },
- "finished_at": { "type": ["string", "null"] },
+ "deployed_at": { "type": ["string", "null"] },
"id": { "type": "integer" },
"iid": { "type": "integer" },
"last?": { "type": "boolean" },
diff --git a/spec/serializers/deployment_entity_spec.rb b/spec/serializers/deployment_entity_spec.rb
index c0ea2b3c389..1b19eac9a97 100644
--- a/spec/serializers/deployment_entity_spec.rb
+++ b/spec/serializers/deployment_entity_spec.rb
@@ -32,8 +32,8 @@ describe DeploymentEntity do
expect(subject).to include(:created_at)
end
- it 'exposes finished_at' do
- expect(subject).to include(:finished_at)
+ it 'exposes deployed_at' do
+ expect(subject).to include(:deployed_at)
end
context 'when the pipeline has another manual action' do