summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2017-09-18 11:15:33 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-12-03 12:04:47 +0100
commit636376dd4d41856cc965718725f06bb8caacfd34 (patch)
tree5b1c61cd0b4d0d996268d97ab11ed58c1778b0fb
parente0f84130567dc34edf1ae75fcf595e24991d2fa9 (diff)
downloadgitlab-ce-636376dd4d41856cc965718725f06bb8caacfd34.tar.gz
WIP
-rw-r--r--app/models/ci/artifact.rb12
-rw-r--r--db/migrate/20170918072948_create_artifacts.rb8
-rw-r--r--spec/models/ci/artifact_spec.rb5
3 files changed, 25 insertions, 0 deletions
diff --git a/app/models/ci/artifact.rb b/app/models/ci/artifact.rb
new file mode 100644
index 00000000000..c66c560037e
--- /dev/null
+++ b/app/models/ci/artifact.rb
@@ -0,0 +1,12 @@
+module Ci
+ class Artifact < ActiveRecord::Base
+ belongs_to :build, class_name: "Ci::Build"
+ belongs_to :project, class_name: "Ci::Build"
+
+ enum type {
+ archive: 0,
+ metadata: 1,
+ trace: 2
+ }
+ end
+end
diff --git a/db/migrate/20170918072948_create_artifacts.rb b/db/migrate/20170918072948_create_artifacts.rb
new file mode 100644
index 00000000000..0b3241070ce
--- /dev/null
+++ b/db/migrate/20170918072948_create_artifacts.rb
@@ -0,0 +1,8 @@
+class CreateArtifacts < ActiveRecord::Migration
+ def change
+ create_table :artifacts do |t|
+
+ t.timestamps null: false
+ end
+ end
+end
diff --git a/spec/models/ci/artifact_spec.rb b/spec/models/ci/artifact_spec.rb
new file mode 100644
index 00000000000..438964fd787
--- /dev/null
+++ b/spec/models/ci/artifact_spec.rb
@@ -0,0 +1,5 @@
+require 'rails_helper'
+
+RSpec.describe Artifact, type: :model do
+ pending "add some examples to (or delete) #{__FILE__}"
+end