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

Commit

Permalink
Build buildutils executable from this workflow now too (#57)
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Carino <[email protected]>
  • Loading branch information
jadecarino authored Jul 16, 2024
1 parent 44a4242 commit b3b7ca4
Show file tree
Hide file tree
Showing 3 changed files with 718 additions and 115 deletions.
273 changes: 158 additions & 115 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,67 +12,67 @@ env:

jobs:
build-push-galasabld:
name: Build and push galasabld artefacts
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'}]
name: Build and push galasabld artefacts
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: |
echo $REGISTRY
make all
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build galasabld using the Makefile
run: |
echo $REGISTRY
make all
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for galasabld image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasabld-amd64
- name: Build galasabld image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/galasabld/dockerfile.galasabld
build-args: platform=linux-amd64
load: true
tags: galasabld-amd64:${{ env.IMAGE_TAG }}
- name: Test galasabld image
run: |
docker run --rm galasabld-amd64:${{ env.IMAGE_TAG }}
- name: Build and push galsabld image
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/galasabld/dockerfile.galasabld
build-args: platform=linux-amd64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
- name: Push galasabld executables
uses: actions/upload-artifact@v4
with:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for galasabld image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/galasabld-amd64

- name: Build galasabld image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/galasabld/dockerfile.galasabld
build-args: platform=linux-amd64
load: true
tags: galasabld-amd64:${{ env.IMAGE_TAG }}

- name: Test galasabld image
run: |
docker run --rm galasabld-amd64:${{ env.IMAGE_TAG }}
- name: Build and push galsabld image
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/galasabld/dockerfile.galasabld
build-args: platform=linux-amd64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Push galasabld executables
uses: actions/upload-artifact@v4
with:
name: galasabld-${{matrix.config.name}}-${{matrix.config.arch}}
path: bin/galasabld-${{matrix.config.name}}-${{matrix.config.arch}}


build-push-galasabld-ibm:
Expand Down Expand Up @@ -125,64 +125,107 @@ jobs:
labels: ${{ steps.metadata.outputs.labels }}

build-push-openapi2beans:
name: Build and push openapi2beans artefacts
runs-on: ubuntu-latest
strategy:
matrix:
config: [{'name':'darwin','arch':'arm64'},{'name':'darwin','arch':'x86_64'},{'name':'linux','arch':'x86_64'}]
name: Build and push openapi2beans artefacts
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
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
- name: Build openapi2beans using the Makefile
run: |
make all -C openapi2beans/
- name: Setup up Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Build openapi2beans using the Makefile
run: |
make all -C openapi2beans/
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for openapi2beans image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/openapi2beans

- name: Build openapi2beans image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/openapi2beans/dockerfile.openapi2beans
build-args: platform=linux-x86_64
load: true
tags: openapi2beans:${{ env.IMAGE_TAG }}

- name: Test openapi2beans image
run: |
docker run --rm openapi2beans:${{ env.IMAGE_TAG }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for openapi2beans image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/openapi2beans

- name: Build openapi2beans image for testing
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/openapi2beans/dockerfile.openapi2beans
build-args: platform=linux-x86_64
load: true
tags: openapi2beans:${{ env.IMAGE_TAG }}

- name: Test openapi2beans image
run: |
docker run --rm openapi2beans:${{ env.IMAGE_TAG }}
- name: Build and push openapi2beans image
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/openapi2beans/dockerfile.openapi2beans
build-args: platform=linux-x86_64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Push openapi2beans executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}
path: openapi2beans/bin/openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}

- name: Build and push openapi2beans image
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/openapi2beans/dockerfile.openapi2beans
build-args: platform=linux-x86_64
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}

- name: Push openapi2beans executables
uses: actions/upload-artifact@v4
with:
name: openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}
path: openapi2beans/bin/openapi2beans-${{matrix.config.name}}-${{matrix.config.arch}}

build-push-buildutils-executables:
name: Build and push buildutils repository executables
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 galasabld using the Makefile
# run: |
# echo $REGISTRY
# 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:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata for buildutils-executables image
id: metadata
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/buildutils-executables

- name: Build and push buildutils-executables image
uses: docker/build-push-action@v5
with:
context: .
file: dockerfiles/dockerfile.buildutils
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
7 changes: 7 additions & 0 deletions dockerfiles/dockerfile.buildutils
Original file line number Diff line number Diff line change
@@ -0,0 +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 bin/ /usr/local/apache2/htdocs/
COPY openapi2beans/bin/ /usr/local/apache2/htdocs/
Loading

0 comments on commit b3b7ca4

Please sign in to comment.