Skip to content

Commit

Permalink
feat: move packages to separate files (#117)
Browse files Browse the repository at this point in the history
Fixes #108
  • Loading branch information
agaffney authored Mar 13, 2024
1 parent 45cf83e commit 96a9de8
Show file tree
Hide file tree
Showing 12 changed files with 183 additions and 172 deletions.
28 changes: 28 additions & 0 deletions packages/cardano-node/cardano-node-8.7.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: cardano-node
version: 8.7.3
description: Cardano node software by Input Output Global
installSteps:
- docker:
containerName: cardano-node
image: ghcr.io/blinklabs-io/cardano-node:8.7.3
env:
CARDANO_NODE_SOCKET_PATH: /ipc/node.socket
NETWORK: '{{ .Context.Network }}'
binds:
- '{{ .Paths.ContextDir }}/node-ipc:/ipc'
- '{{ .Paths.DataDir }}/data:/data'
ports:
- "3001"
pullOnly: false
- file:
binary: true
filename: cardano-cli
content: |
#!/bin/bash
docker exec -ti {{ .Package.Name }}-cardano-node cardano-cli $@
tags:
- docker
- linux
- darwin
- amd64
- arm64
20 changes: 20 additions & 0 deletions packages/mithril-client/mithril-client-0.5.17.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: mithril-client
version: 0.5.17
description: Mithril client by Input Output Global
installSteps:
- docker:
containerName: mithril-client
image: ghcr.io/blinklabs-io/mithril-client:0.5.17-1
pullOnly: true
- file:
binary: false
filename: mithril-client
content: |
#!/bin/bash
docker run --rm -ti ghcr.io/blinklabs-io/mithril-client:0.5.17 $@
tags:
- docker
- linux
- darwin
- amd64
- arm64
20 changes: 20 additions & 0 deletions packages/mithril-client/mithril-client-0.7.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: mithril-client
version: 0.7.0
description: Mithril client by Input Output Global
installSteps:
- docker:
containerName: mithril-client
image: ghcr.io/blinklabs-io/mithril-client:0.7.0-1
pullOnly: true
- file:
binary: false
filename: mithril-client
content: |
#!/bin/bash
docker run --rm -ti ghcr.io/blinklabs-io/mithril-client:0.7.0-1 $@
tags:
- docker
- linux
- darwin
- amd64
- arm64
30 changes: 30 additions & 0 deletions packages/ogmios/ogmios-v6.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: ogmios
version: v6.1.0
description: Ogmios, a WebSocket & HTTP server for Cardano, providing a bridge between Cardano nodes and clients.
installSteps:
- docker:
containerName: ogmios
image: cardanosolutions/ogmios:v6.1.0
command:
- ogmios
- --log-level
- info
- --host
- 0.0.0.0
- --port
- "1337"
- --node-socket
- /ipc/node.socket
- --node-config
- /config/mainnet/cardano-node/config.json
binds:
- '{{ .Paths.ContextDir }}/node-ipc:/ipc'
ports:
- "1337"
pullOnly: false
tags:
- docker
- linux
- darwin
- amd64
- arm64
9 changes: 9 additions & 0 deletions packages/test-packageA/test-packageA-1.0.2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
name: test-packageA
version: 1.0.2
tags:
- docker
- linux
- darwin
- amd64
- arm64
postInstallNotes: Notes for {{ .Package.Name }}
13 changes: 13 additions & 0 deletions packages/test-packageA/test-packageA-1.0.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test-packageA
version: 1.0.3
tags:
- docker
- linux
- darwin
- amd64
- arm64
postInstallNotes: Notes for {{ .Package.Name }}
outputs:
- name: foo
description: the 'foo' description
value: '{{ .Package.Name }}'
8 changes: 8 additions & 0 deletions packages/test-packageA/test-packageA-2.1.3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: test-packageA
version: 2.1.3
tags:
- docker
- linux
- darwin
- amd64
- arm64
25 changes: 25 additions & 0 deletions packages/test-packageB/test-packageB-0.1.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: test-packageB
version: 0.1.0
installSteps:
- condition: eq .Package.ShortName "test-packageB"
file:
binary: false
filename: test-file1
content: test1
- condition: eq .Package.ShortName "test-packageZ"
file:
binary: false
filename: test-file2
content: test2
dependencies:
- test-packageA[fooA,-fooB] < 2.0.0, >= 1.0.2
tags:
- docker
- linux
- darwin
- amd64
- arm64
postInstallNotes: |-
Values:
{{ toPrettyJson . }}
1 change: 1 addition & 0 deletions pkgmgr/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func NewDefaultConfig() (Config, error) {
runtime.GOOS,
runtime.GOARCH,
},
RegistryUrl: "https://github.com/blinklabs-io/cardano-up/archive/refs/heads/main.zip",
}
return ret, nil
}
3 changes: 3 additions & 0 deletions pkgmgr/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ var ErrContainerAlreadyExists = errors.New("specified container already exists")
// ErrContainerNotExists is returned when querying a container by name that doesn't exist
var ErrContainerNotExists = errors.New("specified container does not exist")

// ErrNoRegistryConfigured is returned when no registry is configured
var ErrNoRegistryConfigured = errors.New("no package registry is configured")

func NewUnknownNetworkError(networkName string) error {
return fmt.Errorf(
"unknown network %q",
Expand Down
2 changes: 1 addition & 1 deletion pkgmgr/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ func (p Package) services(cfg Config, context string) ([]*DockerService, error)
}

type PackageInstallStep struct {
Condition string `yaml:"condition"`
Condition string `yaml:"condition,omitempty"`
Docker *PackageInstallStepDocker `yaml:"docker,omitempty"`
File *PackageInstallStepFile `yaml:"file,omitempty"`
}
Expand Down
Loading

0 comments on commit 96a9de8

Please sign in to comment.