Skip to content

Commit

Permalink
chore) Re-run bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdostert committed May 30, 2024
1 parent 560a46f commit 27d5395
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 67 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: build

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1

- name: Install Opctl
run: curl -L https://github.com/opctl/opctl/releases/download/0.1.45/opctl0.1.45.linux.tgz | sudo tar -xzv -C /usr/local/bin

- name: Build
run: opctl run build
15 changes: 2 additions & 13 deletions .opspec/build/op.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
name: build
description: builds the op
inputs:
srcDir:
dir:
default: .
outputs:
srcDir:
dir: {}
opspec: 0.1.6
run:
serial:
- op:
ref: test
inputs: { srcDir }
- op:
ref: github.com/opspec-pkgs/_.op.bootstrap#2.2.0
ref: github.com/opspec-pkgs/_.op.bootstrap#4.0.1
inputs:
srcDir:
outputs:
srcDir:
srcDir: $(../..)
29 changes: 14 additions & 15 deletions .opspec/provision-image/op.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,44 @@
name: provision-image
description: |
Provisions image for the op to [opspecpkgs docker hub org](https://hub.docker.com/u/opspecpkgs) w/ name `opspecpkgs/$(opDotYml.name):${opDotYml.version}`.
Provisions image for the op to [opspec-pkgs image registry](https://github.com/orgs/opspec-pkgs/packages) w/ name `$(opDotYml.name):${opDotYml.version}`.
> Before first use, a Dockerfile MUST be added to `.opspec/provision-image`
inputs:
dockerUsername:
githubUsername:
string:
constraints: { minLength: 1 }
description: user for logging in to docker hub
dockerPassword:
description: user for logging in to github
githubAccessToken:
string:
constraints: { minLength: 1 }
description: password for logging in to docker hub
description: accessToken for logging in to github
isSecret: true
srcDir:
dir:
default: .
opspec: 0.1.6
run:
serial:
- op:
ref: github.com/opspec-pkgs/yaml.parse#1.0.0
inputs: { yaml: $(srcDir/op.yml) }
outputs: { opDotYml: result }
inputs:
yaml: $(../../op.yml)
outputs:
result: $(opDotYml)
- container:
image: { ref: 'alpine:3.6' }
cmd: [sh, -ce, 'echo -n opspecpkgs/${opName#*/*/}:$(opDotYml.version) > /imageName']
cmd: [sh, -ce, 'echo -n ghcr.io/opspec-pkgs/${opName#*/*/}:$(opDotYml.version) > /imageName']
envVars:
opName: $(opDotYml.name)
files:
/imageName: $(imageName)
- op:
ref: github.com/opspec-pkgs/docker.image.build#2.1.0
inputs:
dockerfile: $(/Dockerfile)
dockerfile: $(./Dockerfile)
imageName:
outputs: { imageTar }
- op:
ref: github.com/opspec-pkgs/docker.image.push#2.1.0
inputs:
imageTar:
imageName:
username: $(dockerUsername)
password: $(dockerPassword)
registry: ghcr.io
username: $(githubUsername)
password: $(githubAccessToken)
25 changes: 8 additions & 17 deletions .opspec/release/op.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,24 @@ inputs:
string:
constraints: { minLength: 1 }
description: user for logging in to github
githubPassword:
githubAccessToken:
string:
constraints: { minLength: 1 }
description: password for logging in to github
description: accessToken for logging in to github
isSecret: true
srcDir:
dir:
default: .
outputs:
srcDir:
dir: {}
opspec: 0.1.6
run:
serial:
- op:
ref: build
inputs:
srcDir:
outputs:
srcDir:
- op:
ref: github.com/opspec-pkgs/yaml.parse#1.0.0
inputs: { yaml: $(srcDir/op.yml) }
outputs: { opDotYml: result }
inputs:
yaml: $(../../op.yml)
outputs:
result: $(opDotYml)
- op:
ref: github.com/opspec-pkgs/git.repo.resolve-commit#1.0.2
inputs: { dotGitDir: $(srcDir/.git) }
inputs: { dotGitDir: $(../../.git) }
outputs: { commit: }
- container:
image: { ref: 'alpine:3.6' }
Expand All @@ -46,7 +37,7 @@ run:
owner: opspec-pkgs
repo: $(opRepo)
loginUsername: $(githubUsername)
loginPassword: $(githubPassword)
loginPassword: $(githubAccessToken)
tag: $(opDotYml.version)
commitish: $(commit)
name: $(opDotYml.version)
8 changes: 2 additions & 6 deletions .opspec/test/op.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: test
description: tests the op
inputs:
srcDir:
dir:
default: .
opspec: 0.1.6
run:
op:
ref: github.com/opspec-pkgs/opspec.v0.1.6.op.validate#1.0.0
inputs: { op: $(srcDir) }
inputs:
op: $(../..)
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
[![Build Status](https://travis-ci.org/opspec-pkgs/postgresql.db.run.svg?branch=master)](https://travis-ci.org/opspec-pkgs/postgresql.db.run)
[![Build Status](https://github.com/opspec-pkgs/postgresql.db.run/workflows/build/badge.svg?branch=main)](https://github.com/opspec-pkgs/postgresql.db.run/actions?query=workflow%3Abuild+branch%3Amain)

<img src="icon.svg" alt="icon" height="100px">

# Problem statement

Runs a PostgeSQL database.

# Format

the op uses [![opspec 0.1.6](https://img.shields.io/badge/opspec-0.1.6-brightgreen.svg?colorA=6b6b6b&colorB=fc16be)](https://opspec.io/0.1.6) definition format

# Example usage

## Install
## Visualize

```shell
opctl op install github.com/opspec-pkgs/postgresql.db.run#1.0.3
opctl ui github.com/opspec-pkgs/postgresql.db.run#1.0.3
```

## Run
Expand All @@ -30,19 +26,18 @@ opctl run github.com/opspec-pkgs/postgresql.db.run#1.0.3
op:
ref: github.com/opspec-pkgs/postgresql.db.run#1.0.3
inputs:
# required
dbDataRootDir:
dbPassword:
dbSchema:
dbUsername:
### optional; uncomment to override default(s)
# dbHostname: postgresql-db
dbDataRootDir: # πŸ‘ˆ required; provide a value
dbPassword: # πŸ‘ˆ required; provide a value
dbSchema: # πŸ‘ˆ required; provide a value
dbUsername: # πŸ‘ˆ required; provide a value
## uncomment to override defaults
# dbHostname: "postgresql-db"
```

# Support

join us on
[![Slack](https://opctl-slackin.herokuapp.com/badge.svg)](https://opctl-slackin.herokuapp.com/)
[![Slack](https://img.shields.io/badge/slack-opctl-E01563.svg)](https://join.slack.com/t/opctl/shared_invite/zt-51zodvjn-Ul_UXfkhqYLWZPQTvNPp5w)
or
[open an issue](https://github.com/opspec-pkgs/postgresql.db.run/issues)

Expand All @@ -56,4 +51,4 @@ and [tagged](https://git-scm.com/book/en/v2/Git-Basics-Tagging); see
# Contributing

see
[project/CONTRIBUTING.md](https://github.com/opspec-pkgs/project/blob/master/CONTRIBUTING.md)
[project/CONTRIBUTING.md](https://github.com/opspec-pkgs/project/blob/main/CONTRIBUTING.md)

0 comments on commit 27d5395

Please sign in to comment.