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

Commit

Permalink
Merge pull request #176 from galasa-dev/obr-galasabld-image
Browse files Browse the repository at this point in the history
Build OBR and galasabld combo image
  • Loading branch information
jadecarino authored Sep 13, 2024
2 parents c148a7d + fb06a89 commit 8d6ddab
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 10 deletions.
57 changes: 48 additions & 9 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,20 +163,20 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build and push OBR image
id: build
id: build-obr
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.obr
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: ${{ steps.metadata.outputs.labels }}
tags: ${{ steps.metadata-obr.outputs.tags }}
labels: ${{ steps.metadata-obr.outputs.labels }}
build-args: |
dockerRepository=${{ env.REGISTRY }}
tag=${{ env.BRANCH }}
Expand All @@ -189,6 +189,45 @@ jobs:
run: |
docker run --env ARGOCD_AUTH_TOKEN=${{ env.ARGOCD_AUTH_TOKEN }} --rm -v ${{ github.workspace }}:/var/workspace ghcr.io/galasa-dev/argocdcli:main app wait ${{ env.BRANCH }}-maven-repos --resource apps:Deployment:obr-${{ env.BRANCH }} --health --server argocd.galasa.dev
# To build an image with the Uber OBR and galasabld executable inside.
# This is needed during releases.
- name: Checkout buildutils
uses: actions/checkout@v4
with:
repository: ${{ env.NAMESPACE }}/buildutils
path: buildutils
ref: ${{ env.BRANCH }}

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

- name: Build galasabld using the Makefile
working-directory: buildutils
run: |
make all
- name: Extract metadata for OBR and galasabld image
id: metadata-obr-galasabld
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: ${{ env.REGISTRY }}/${{ env.NAMESPACE }}/obr-and-galasabld-executable

- name: Build and push OBR and galasabld image
id: build-obr-galasabld
uses: docker/build-push-action@v5
with:
context: buildutils
file: obr/dockerfiles/dockerfile.obrgalasabld
push: true
tags: ${{ steps.metadata-obr-galasabld.outputs.tags }}
labels: ${{ steps.metadata-obr-galasabld.outputs.labels }}
build-args: |
dockerRepository=${{ env.REGISTRY }}
tag=${{ env.BRANCH }}
platform=linux-amd64
build-obr-javadocs:
name: Build OBR javadocs using galasabld image and maven
runs-on: ubuntu-latest
Expand Down Expand Up @@ -297,20 +336,20 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

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

- name: Build and push Javadoc site image
id: build-javadocsite
id: build-javadoc-site
uses: docker/build-push-action@v5
with:
context: obr
file: obr/dockerfiles/dockerfile.javadocsite
push: true
tags: ${{ steps.metadata-javadocsite.outputs.tags }}
labels: ${{ steps.metadata-javadocsite.outputs.labels }}
tags: ${{ steps.metadata-javadoc-site.outputs.tags }}
labels: ${{ steps.metadata-javado-csite.outputs.labels }}

- name: Recycle javadocsite application in ArgoCD
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
context: obr
file: obr/dockerfiles/dockerfile.javadocsite
load: true
tags: javadocsite:test
tags: javadoc-site:test

- name: Build Javadoc Maven repo image for testing
uses: docker/build-push-action@v5
Expand Down
10 changes: 10 additions & 0 deletions dockerfiles/dockerfile.obrgalasabld
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
ARG dockerRepository
ARG tag

# During a release, we need to be able to execute galasabld commands from inside the OBR image
FROM ${dockerRepository}/galasa-dev/obr-maven-artefacts:${tag}

ARG platform
COPY bin/galasabld-${platform} /bin/galasabld

ENTRYPOINT ["/bin/galasabld"]

0 comments on commit 8d6ddab

Please sign in to comment.