Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
add nomad address
Browse files Browse the repository at this point in the history
  • Loading branch information
darrylmendillo committed Dec 16, 2020
1 parent 3e8a4cb commit 52ba825
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
ARG VERSION="0.2.9"

FROM jrasell/levant:${VERSION} as deploy
FROM debian:10.6-slim as deploy
LABEL name="deploy"

ARG VERSION="0.2.9"
ARG BINARY="linux-amd64-levant"

RUN apt-get update && \
apt-get install -y \
wget

ADD entrypoint.sh /entrypoint.sh

ENTRYPOINT [ "/entrypoint.sh" ]
RUN wget https://github.com/hashicorp/levant/releases/download/${VERSION}/${BINARY} -O /usr/bin/levant &&\
chmod +x /usr/bin/levant
ENTRYPOINT [ "/entrypoint.sh" ]
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ Searches all subdirectories accoring to `config`. All matched files will be rend
- name: deploy
uses: pennsignals/[email protected]
with:
versiob: '0.2.6-rc.1' # required
version: '0.2.6-rc.1' # required
config: './deploy_config.yml' # required
nomad_addr: 'http://10.146.0.5:4646'
```
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ inputs:
config:
description: "deploy_config.yml file with all deployment settings"
required: true
nomad_addr:
description: "target nomad deployment address"
required: true

runs:
using: "docker"
image: "Dockerfile"
args:
- ${{ inputs.nomad_addr }}
- ${{ inputs.version }}
- ${{ inputs.config }}
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ services:
build: .
environment:
- INPUT_CONFIG=deploy_config.yml
- INPUT_VERSIOB=1.0.0
- INPUT_VERSION=1.0.0
- INPUT_NOMAD_ADDR=http://10.146.0.5:4646/
volumes:
- ./:/source
working_dir: /source
6 changes: 5 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/sh
#!/bin/bash

# echo all the variabls
echo "INPUT_ADDR: $INPUT_VERSION"
echo "INPUT_CONFIG: $INPUT_CONFIG"
echo "INPUT_NOMAD_ADDR: $INPUT_NOMAD_ADDR"

# export NOMAD_ADDR for deployment
export "NOMAD_ADDR=$INPUT_NOMAD_ADDR"

# use levant to deploy service nomad jobs as templates
for dir in */ ; do
Expand Down

0 comments on commit 52ba825

Please sign in to comment.