Skip to content

Commit

Permalink
don't push java and rust for now
Browse files Browse the repository at this point in the history
  • Loading branch information
StuartHarris committed Feb 10, 2025
1 parent 2876fb4 commit 6e7950f
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 42 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/java-containers-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,14 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run:
echo "💡 The ${{ github.repository }} repository has been cloned to
the runner."
- name: get google-cloud-sdk-gke-gcloud-auth-plugin
uses: cobraz/setup-gke-gcloud-auth-plugin@v1
- name: Authenticate with GCR
run: |
echo ${{ secrets.GCR_KEY }} | base64 --decode > gcr-key.json
gcloud auth activate-service-account --key-file=gcr-key.json
gcloud auth configure-docker
gcloud container clusters get-credentials platform-poc-407113-cluster --location europe-west2 --project platform-poc-407113
# - name: get google-cloud-sdk-gke-gcloud-auth-plugin
# uses: cobraz/setup-gke-gcloud-auth-plugin@v1
# - name: Authenticate with GCR
# run: |
# echo ${{ secrets.GCR_KEY }} | base64 --decode > gcr-key.json
# gcloud auth activate-service-account --key-file=gcr-key.json
# gcloud auth configure-docker
# gcloud container clusters get-credentials platform-poc-407113-cluster --location europe-west2 --project platform-poc-407113
- uses: actions/setup-java@v3
with:
java-version: "17"
Expand All @@ -46,10 +43,10 @@ jobs:
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Run Maven package and push images
run: mvn clean package -Djib.to.tags=${{ steps.vars.outputs.sha_short }}
- name: Use Helm
uses: azure/setup-helm@v1
with:
version: "v3.13.2"
- name: run helm upgrade
run: ./helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}
- run: echo "🍏 Job's status is ${{ job.status }}."
# - name: Use Helm
# uses: azure/setup-helm@v1
# with:
# version: "v3.13.2"
# - name: run helm upgrade
# run: ./helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}
# - run: echo "🍏 Job's status is ${{ job.status }}."
45 changes: 21 additions & 24 deletions .github/workflows/rust-containers-k8s.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,24 @@ jobs:
steps:
- name: Check out repository code
uses: actions/checkout@v4
- run:
echo "💡 The ${{ github.repository }} repository has been cloned to
the runner."
- name: get google-cloud-sdk-gke-gcloud-auth-plugin
uses: cobraz/setup-gke-gcloud-auth-plugin@v1

- name: Authenticate with GCR
run: |
echo ${{ secrets.GCR_KEY_RUST }} | base64 --decode > gcr-key.json
gcloud auth activate-service-account --key-file=gcr-key.json
gcloud auth configure-docker europe-west2-docker.pkg.dev
gcloud container clusters get-credentials platform-poc-rust-cluster --location europe-west2 --project platform-poc-rust
- name: Build and push Docker images
run: ./scripts/build_and_push.sh

- name: Set short sha
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: run helm upgrade
run: ./scripts/helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}

- run: echo "🍏 Job's status is ${{ job.status }}."
# - name: get google-cloud-sdk-gke-gcloud-auth-plugin
# uses: cobraz/setup-gke-gcloud-auth-plugin@v1

# - name: Authenticate with GCR
# run: |
# echo ${{ secrets.GCR_KEY_RUST }} | base64 --decode > gcr-key.json
# gcloud auth activate-service-account --key-file=gcr-key.json
# gcloud auth configure-docker europe-west2-docker.pkg.dev
# gcloud container clusters get-credentials platform-poc-rust-cluster --location europe-west2 --project platform-poc-rust

# - name: Build and push Docker images
# run: ./scripts/build_and_push.sh
- name: Build Docker images
run: ./scripts/build.sh

# - name: Set short sha
# id: vars
# run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

# - name: run helm upgrade
# run: ./scripts/helm_upgrade.sh ${{ steps.vars.outputs.sha_short }}
19 changes: 19 additions & 0 deletions rust-containers-k8s/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash

set -euo pipefail

host=europe-west2-docker.pkg.dev
project=platform-poc-rust
repository=registry
sha="$(git rev-parse --short HEAD)"

for service in *-service; do
tag="${host}/${project}/${repository}/${service}:${sha}"

pushd "$service"

echo "Building $service"
docker build --tag "$tag" .

popd
done

0 comments on commit 6e7950f

Please sign in to comment.