Skip to content

Commit

Permalink
use docker-action
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandro Koll committed Feb 17, 2020
1 parent 2141722 commit f0b537e
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 191 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/master.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build from master

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Lint
uses: actions-contrib/golangci-lint@master
with:
args: run
- name: Docker Image
run: |
docker login -u metalstackci -p ${{ secrets.DOCKER_HUB_TOKEN }}
docker build -f Dockerfile.console -t metalstack/metal-console .
docker push metalstack/metal-console
docker build -f Dockerfile.bmcproxy -t metalstack/bmc-proxy} .
docker push metalstack/bmc-proxy
docker build -f Dockerfile.bmcreverseproxy -t metalstack/bmc-reverse-proxy .
docker push metalstack/bmc-reverse-proxy
29 changes: 29 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Test

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Lint
uses: actions-contrib/golangci-lint@master
with:
args: run
- name: Branch name
run: echo running on branch ${GITHUB_REF##*/}
- name: Build the Docker images
run: |
export GITHUB_TAG_NAME=${GITHUB_REF##*/}
docker login -u metalstackci -p ${{ secrets.DOCKER_HUB_TOKEN }}
docker build -f Dockerfile.console -t metalstack/metal-console:${GITHUB_TAG_NAME} .
docker push metalstack/metal-console:${GITHUB_TAG_NAME}
docker build -f Dockerfile.bmcproxy -t metalstack/bmc-proxy:${GITHUB_TAG_NAME} .
docker push metalstack/bmc-proxy:${GITHUB_TAG_NAME}
docker build -f Dockerfile.bmcreverseproxy -t metalstack/bmc-reverse-proxy:${GITHUB_TAG_NAME} .
docker push metalstack/bmc-reverse-proxy:${GITHUB_TAG_NAME}
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bin
.vscode
metal-api
.idea
Dockerfile
docker-make.yaml
19 changes: 0 additions & 19 deletions .gitlab-ci.yml

This file was deleted.

2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The first one, called `metal-console`, is an SSH server listening on port `5222`
It accepts SSH requests with machine IDs as user and opens an SSH connection to the corresponding machine.
Example usage:
```
ssh -p 5222 <machine-ID>@metal.test.fi-ts.io
ssh -p 5222 <machine-ID>@<mgmt-host>
```

First, it fetches the corresponding IPMI data and SSH public key(s) from `metal-api` for the requested machine as well as the address of the management service that is responsible for all machines of the requested machines partition. It then opens a connection to that management service and copies all stdin, stdout and stderr traffic to both directions.
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.bmcproxy
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM registry.fi-ts.io/cloud-native/go-builder:latest as builder
FROM metalstack/builder:latest as builder

FROM alpine:3.10

LABEL maintainer="FI-TS Devops <[email protected]>"

RUN apk add \
ipmitool \
libvirt-client
Expand Down
12 changes: 0 additions & 12 deletions Dockerfile.bmcproxy.dev

This file was deleted.

1 change: 0 additions & 1 deletion Dockerfile.bmcreverseproxy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM nginx:1.17
LABEL maintainer FI-TS Devops <[email protected]>

COPY nginx.conf /etc/nginx/
COPY server.crt /etc/ssl/certs/
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.console
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FROM registry.fi-ts.io/cloud-native/go-builder:latest as builder
FROM metalstack/builder:latest as builder

FROM alpine:3.10

LABEL maintainer="FI-TS Devops <[email protected]>"

COPY host-key ca.crt client.crt client.pem /
COPY --from=builder /work/bin/metal-console /

Expand Down
9 changes: 0 additions & 9 deletions Dockerfile.console.dev

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: default
default: release;

COMMONDIR := $(or ${COMMONDIR},../common)
COMMONDIR := $(or ${COMMONDIR},../builder)

include $(COMMONDIR)/Makefile.inc

Expand Down
7 changes: 0 additions & 7 deletions devBuild.sh

This file was deleted.

9 changes: 0 additions & 9 deletions devStart.sh

This file was deleted.

3 changes: 0 additions & 3 deletions devTest.sh

This file was deleted.

57 changes: 0 additions & 57 deletions docker-compose.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions docker-make.bmcproxy.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions docker-make.bmcreverseproxy.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions docker-make.console.yaml

This file was deleted.

0 comments on commit f0b537e

Please sign in to comment.