local appr = import "appr.libsonnet"; function( params={} ) appr.package({ package: { name: "quay/quay-ci-app", author: "Antoine Legrand", version: std.split(importstr "VERSION", "\n")[0], description: "quay", license: "MIT", expander: "jinja2" }, variables: { stack_path: "ci_stack", config: (import "templates/config.libsonnet")($.variables), namespace: "default", tag: "master", image: "quay.io/quay/quay-ci:%s" % $.variables.tag, docker_user: 'changeme', docker_pass: 'changeme', domain: 'quay-%s.k8s.devtable.com' % $.variables.tag, ingress: { class: 'nginx', tls: "kubernetes.io/tls-acme-stg", domains: std.split($.variables.domain, ","), annotations: {} }, license: null, db: { user: 'quay', password: 'quay', name: 'quay', }, } + (import "params.json"), resources: appr.compact([ { template: (importstr "templates/quay-dev-initdb-job.yaml"), }, ]), deploy: [ { name: "quay/postgres-app", variables: { user: $.variables.db.user, dbname: $.variables.db.name, password: $.variables.db.password } }, { name: "quay/quay-app", variables: $.variables }, # Deploy the initdb script {name: "$self"}, ], }, params)