Skip to content

Commit

Permalink
Build pipeline
Browse files Browse the repository at this point in the history
* start CI

* test build ci

* add prereq

* switch to DOCKER_XX vars

* hack

* -u -p

* docker user

* doc tabarnak

* debug

* debug

* tab

* remove echo on pipeline

* move build on master trigger
  • Loading branch information
julienstroheker authored Jan 30, 2020
1 parent 4eaac93 commit 7e18337
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build
on:
push:
branches:
- master
jobs:
build:
name: Building ${{ matrix.image }}
runs-on: ubuntu-latest
strategy:
matrix:
image: ['worker','publisher','client']
steps:
- uses: actions/checkout@v2
- name: Build Docker image
env: # Or as an environment variable
FTH_REGISTRY_PASSWORD: ${{ secrets.FTH_REGISTRY_PASSWORD }}
FTH_REGISTRY_USERNAME: ${{ secrets.FTH_REGISTRY_USERNAME }}
run: |
make build-${{ matrix.image }}-image
make push-mutable-${{ matrix.image }}-image
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ info: info-ihaq
@echo

registry-login: registry-login
@echo ${FTH_REGISTRY_USERNAME}
@echo ${FTH_REGISTRY_PASSWORD}
@docker login -u ${FTH_REGISTRY_USERNAME} -p ${FTH_REGISTRY_PASSWORD}

# Run go fmt against code
Expand Down Expand Up @@ -128,7 +130,7 @@ build-publisher-binaries-with-container:
$(DEV_ENV_CMD) make build-publisher-binaries

.PHONY: build-publisher-image
build-publisher-image: build-base-ubuntu-image
build-publisher-image: build-base-ubuntu-image build-publisher-binaries
cp bin/ihaq-publisher images/publisher/ihaq-publisher
docker build -t $(FTH_REGISTRY)/ihaq-publisher:$(IHAQ_VERSION) images/publisher

Expand All @@ -154,7 +156,7 @@ build-worker-binaries-with-container:
$(DEV_ENV_CMD) make build-worker-binaries

.PHONY: build-worker-image
build-worker-image: build-base-ubuntu-image
build-worker-image: build-base-ubuntu-image build-worker-binaries
cp bin/ihaq-worker images/worker/ihaq-worker
docker build -t $(FTH_REGISTRY)/ihaq-worker:$(IHAQ_VERSION) images/worker

Expand Down

0 comments on commit 7e18337

Please sign in to comment.