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

Commit

Permalink
Iss1719 (#59)
Browse files Browse the repository at this point in the history
* Build buildutils executable from this workflow now too

Signed-off-by: Jade Carino <[email protected]>

* Fix order condition

Signed-off-by: Jade Carino <[email protected]>

* Run make again in the third job

Signed-off-by: Jade Carino <[email protected]>

* Fixed mistake

Signed-off-by: Jade Carino <[email protected]>

* Add PR num to end of binary name

Signed-off-by: Jade Carino <[email protected]>

---------

Signed-off-by: Jade Carino <[email protected]>
  • Loading branch information
jadecarino authored Jul 16, 2024
1 parent 648dd70 commit bb8d4fd
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 45 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
docker run --rm galasabld-amd64:${{ env.IMAGE_TAG }}
- name: Build and push galsabld image
- name: Build and push galasabld image
uses: docker/build-push-action@v5
with:
context: .
Expand All @@ -74,7 +74,6 @@ jobs:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}


build-push-galasabld-ibm:
name: Build and push galasabld-ibm artefact
runs-on: ubuntu-latest
Expand Down Expand Up @@ -142,7 +141,7 @@ jobs:

- name: Build openapi2beans using the Makefile
run: |
make all -C openapi2beans/
make all -C openapi2beans
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down Expand Up @@ -189,12 +188,24 @@ jobs:
build-push-buildutils-executables:
name: Build and push buildutils repository executables
runs-on: ubuntu-latest
needs: [build-push-galasabld, build-push-openapi2beans]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build galasabld using the Makefile
run: |
make all
- name: Build openapi2beans using the Makefile
run: |
make all -C openapi2beans
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand Down
96 changes: 56 additions & 40 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,48 +8,64 @@ env:
IMAGE_TAG: ${{ github.event.number }}

jobs:
build-galasabld:
name: Build galasabld
runs-on: ubuntu-latest
build-upload-galasabld:
name: Build galasabld
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'linux','arch':'amd64'},{'name':'windows','arch':'amd64'},{'name':'darwin','arch':'amd64'},{'name':'darwin','arch':'arm64'},{'name':'linux','arch':'s390x'}]

steps:
- name: Checkout code
uses: actions/checkout@v4
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build galasabld using the Makefile
run: |
make all
- name: Build and test galasabld image
run: |
docker build -t galasabld:${{env.IMAGE_TAG}} --build-arg platform=linux-amd64 -f dockerfiles/galasabld/dockerfile.galasabld .
docker run --rm galasabld:${{env.IMAGE_TAG}}
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build galasabld using the Makefile
run: |
make all
- name: Build and test galasabld image
run: |
docker build -t galasabld:${{env.IMAGE_TAG}} --build-arg platform=linux-amd64 -f dockerfiles/galasabld/dockerfile.galasabld .
docker run --rm galasabld:${{env.IMAGE_TAG}}
- name: Push galasabld executables
uses: actions/upload-artifact@v4
with:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}-${{ github.event.number }}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}

build-upload-openapi2beans:
name: Build openapi2beans
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'darwin','arch':'arm64'},{'name':'darwin','arch':'x86_64'},{'name':'linux','arch':'x86_64'}]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build and test openapi2beans using the Makefile
run: |
make all -C openapi2beans/
- name: Build and test openapi2beans image
run: |
docker build -t openapi2beans:${{env.IMAGE_TAG}} --build-arg platform=linux-x86_64 -f dockerfiles/openapi2beans/dockerfile.openapi2beans .
docker run --rm openapi2beans:${{env.IMAGE_TAG}}
build-openapi2beans:
name: Build openapi2beans
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build and test openapi2beans using the Makefile
run: |
make all -C openapi2beans/
- name: Build and test openapi2beans image
run: |
docker build -t openapi2beans:${{env.IMAGE_TAG}} --build-arg platform=linux-x86_64 -f dockerfiles/openapi2beans/dockerfile.openapi2beans .
docker run --rm openapi2beans:${{env.IMAGE_TAG}}
- name: Push openapi2beans executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}-${{ github.event.number }}
path: openapi2beans/bin/openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}
2 changes: 1 addition & 1 deletion dockerfiles/dockerfile.buildutils
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM harbor.galasa.dev/docker_proxy_cache/library/httpd:2.4.59

RUN rm -v /usr/local/apache2/htdocs/*
COPY /dockerfiles/httpdconf/httpd.conf /usr/local/apache2/conf/httpd.conf
COPY dockerfiles/httpdconf/httpd.conf /usr/local/apache2/conf/httpd.conf

COPY bin/ /usr/local/apache2/htdocs/
COPY openapi2beans/bin/ /usr/local/apache2/htdocs/

0 comments on commit bb8d4fd

Please sign in to comment.