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

Release 0.1.3 #39

Merged
merged 14 commits into from
Jul 2, 2023
Merged
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ ruby '3.1.4'

gem 'awesome_print'
gem 'app_version', github: "afaraldo/app_version", branch: "master"
gem 'semantic'

gem 'gammo'
gem 'pry'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ GEM
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
semantic (1.6.1)
sprockets (4.2.0)
concurrent-ruby (~> 1.0)
rack (>= 2.2.4, < 4)
Expand Down Expand Up @@ -339,6 +340,7 @@ DEPENDENCIES
rails (~> 7.0.5)
rspec-rails (~> 6.0.3)
selenium-webdriver
semantic
sprockets-rails
stimulus-rails
thor
Expand Down
8 changes: 5 additions & 3 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
sample: bundle exec ruby ./cli sample
# projer: bundle exec ruby ./cli proj
leafer: bundle exec ruby ./cli leaf
# leafer2: bundle exec ruby ./cli leaf2
# leafer3: bundle exec ruby ./cli leaf3
# leafer4: bundle exec ruby ./cli leaf4
measure: bundle exec ruby ./cli measure

pkvsample: bundle exec ruby ./cli pkvsample
# packageversioner: bundle exec ruby ./cli packageversion
# versionleafer: bundle exec ruby ./cli versionleaf
# measver: bundle exec ruby ./cli measureversion
3 changes: 3 additions & 0 deletions app/models/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Version < ApplicationRecord
belongs_to :package
end
4 changes: 4 additions & 0 deletions app/models/version_measurement.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class VersionMeasurement < ApplicationRecord
belongs_to :package
belongs_to :version
end
6 changes: 3 additions & 3 deletions config/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

major: 0
minor: 1
patch: 2
patch: 3
# meta: rc.1
# milestone: 4
build: 244
build: 260

committer: Kingdon Barrett
build_date: 2023-06-27
build_date: 2023-07-02



Expand Down
11 changes: 11 additions & 0 deletions db/migrate/20230702152802_create_versions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class CreateVersions < ActiveRecord::Migration[7.0]
def change
create_table :versions do |t|
t.references :package, null: false, foreign_key: true
t.string :version
t.integer :download_count

t.timestamps
end
end
end
12 changes: 12 additions & 0 deletions db/migrate/20230702152809_create_version_measurements.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class CreateVersionMeasurements < ActiveRecord::Migration[7.0]
def change
create_table :version_measurements do |t|
t.references :package, null: false, foreign_key: true
t.references :version, null: false, foreign_key: true
t.integer :count
t.datetime :measured_at

t.timestamps
end
end
end
25 changes: 24 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

220 changes: 219 additions & 1 deletion deploy/bases/crds/crds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ spec:
type: "string"
minimum: 1
conditions:
description: Conditions holds the conditions for the Leaf
items:
properties:
lastTransitionTime:
Expand Down Expand Up @@ -202,7 +203,114 @@ spec:
type: string
observedGeneration:
description: ObservedGeneration is the last observed generation of
the Project object.
the Leaf object.
format: int64
type: integer
type: object
type: object
served: true
storage: true
subresources:
status: {}
---
apiVersion: "apiextensions.k8s.io/v1"
kind: "CustomResourceDefinition"
metadata:
name: "packageversions.example.com"
spec:
group: "example.com"
names:
plural: "packageversions"
singular: "packageversion"
kind: "PackageVersion"
shortNames:
- pkv
scope: "Namespaced"
versions:
- additionalPrinterColumns:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
- jsonPath: .status.conditions[?(@.type=="Ready")].status
name: Ready
type: string
- jsonPath: .status.conditions[?(@.type=="Ready")].message
name: Status
type: string
name: "v1alpha1"
schema:
openAPIV3Schema:
required: ["spec"]
properties:
spec:
required: ["projectName", "packageName"]
properties:
projectName:
type: "string"
minimum: 1
packageName:
type: "string"
minimum: 1
type: object
status:
properties:
count:
type: "string"
minimum: 1
lastUpdate:
type: "string"
minimum: 1
conditions:
description: Conditions holds the conditions for the PackageVersion
items:
properties:
lastTransitionTime:
format: date-time
type: string
message:
description: message is a human readable message indicating
details about the transition. This may be an empty string.
maxLength: 32768
type: string
observedGeneration:
description: observedGeneration represents the .metadata.generation
that the condition was set based upon.
format: int64
minimum: 0
type: integer
reason:
description: reason contains a programmatic identifier
maxLength: 1024
minLength: 1
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
type: string
status:
description: status of the condition, one of True, False, Unknown.
enum:
- "True"
- "False"
- Unknown
type: string
type:
maxLength: 316
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
type: string
required:
- lastTransitionTime
- message
- reason
- status
- type
type: object
type: array
lastHandledReconcileAt:
description: LastHandledReconcileAt holds the value of the most recent
reconcile request value, so a change of the annotation value can
be detected.
type: string
observedGeneration:
description: ObservedGeneration is the last observed generation of
the PackageVersion object.
format: int64
type: integer
type: object
Expand All @@ -211,3 +319,113 @@ spec:
storage: true
subresources:
status: {}
# ---
# apiVersion: "apiextensions.k8s.io/v1"
# kind: "CustomResourceDefinition"
# metadata:
# name: "versionleaves.example.com"
# spec:
# group: "example.com"
# names:
# plural: "versionleaves"
# singular: "versionleaf"
# kind: "VersionLeaf"
# shortNames:
# - vl
# scope: "Namespaced"
# versions:
# - additionalPrinterColumns:
# - jsonPath: .metadata.creationTimestamp
# name: Age
# type: date
# - jsonPath: .status.conditions[?(@.type=="Ready")].status
# name: Ready
# type: string
# - jsonPath: .status.conditions[?(@.type=="Ready")].message
# name: Status
# type: string
# name: "v1alpha1"
# schema:
# openAPIV3Schema:
# required: ["spec"]
# properties:
# spec:
# required: ["projectName", "packageName", "version"]
# properties:
# projectName:
# type: "string"
# minimum: 1
# packageName:
# type: "string"
# minimum: 1
# version:
# type: "string"
# minimum: 1
# type: object
# status:
# properties:
# count:
# type: "string"
# minimum: 1
# lastUpdate:
# type: "string"
# minimum: 1
# conditions:
# description: Conditions holds the conditions for the VersionLeaf
# items:
# properties:
# lastTransitionTime:
# format: date-time
# type: string
# message:
# description: message is a human readable message indicating
# details about the transition. This may be an empty string.
# maxLength: 32768
# type: string
# observedGeneration:
# description: observedGeneration represents the .metadata.generation
# that the condition was set based upon.
# format: int64
# minimum: 0
# type: integer
# reason:
# description: reason contains a programmatic identifier
# maxLength: 1024
# minLength: 1
# pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
# type: string
# status:
# description: status of the condition, one of True, False, Unknown.
# enum:
# - "True"
# - "False"
# - Unknown
# type: string
# type:
# maxLength: 316
# pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
# type: string
# required:
# - lastTransitionTime
# - message
# - reason
# - status
# - type
# type: object
# type: array
# lastHandledReconcileAt:
# description: LastHandledReconcileAt holds the value of the most recent
# reconcile request value, so a change of the annotation value can
# be detected.
# type: string
# observedGeneration:
# description: ObservedGeneration is the last observed generation of
# the VersionLeaf object.
# format: int64
# type: integer
# type: object
# type: object
# served: true
# storage: true
# subresources:
# status: {}
2 changes: 1 addition & 1 deletion deploy/bases/cron/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
containers:
- name: stathcr
image: ghcr.io/kingdonb/stats-tracker-ghcr:canary
imagePullPolicy: Always
imagePullPolicy: IfNotPresent
#args:
# - "-v=3"
# - --privateKeyPath=/etc/secret-volume/privatekey.pem
Expand Down
Loading