Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
holashchand committed Aug 17, 2024
1 parent a431ef9 commit b879c50
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 7 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,27 @@ jobs:
docker image ls
docker system df
build-node:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
platform: [linux/amd64]
include:
- name: identity-service
os: ubuntu-latest
platform: linux/amd64
- name: credential-schema
os: ubuntu-latest
platform: linux/amd64
- name: credentials-service
os: ubuntu-latest
platform: linux/amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup containerd driver type
run: |
echo '{ "features": { "containerd-snapshotter": true } }' | sudo tee /etc/docker/daemon.json
export BUILDX_EXPERIMENTAL=1
sudo systemctl restart docker
docker info -f '{{ .DriverStatus }}'
docker info
Expand All @@ -107,14 +122,15 @@ jobs:
uses: actions/cache@v4
with:
path: /tmp/docker-layer-cache
key: ${{ runner.os }}-docker-cache-node
key: ${{ runner.os }}-docker-cache-node-${{ matrix.name }}
restore-keys: |
${{ runner.os }}-docker-cache-node
${{ runner.os }}-docker-cache-node-${{ matrix.name }}
- name: Build Node Services
env:
CACHE_SRC: type=local,src=/tmp/docker-layer-cache
CACHE_DST: type=local,dest=/tmp/docker-layer-cache
run: make build-node
PLATFORM: ${{ matrix.platform }}
run: make -C services/${{ matrix.name }}/ docker
- name: Publish build artifacts
run: make publish-builds
- name: Check space after tests
Expand Down
2 changes: 1 addition & 1 deletion services/credential-schema/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ IMAGE:=local/sunbird-rc-credential-schema
.PHONY: docker publish test

docker:
@docker build --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .
@docker buildx build --platform=$$PLATFORM --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .

publish:
@docker push $(IMAGE)
Expand Down
2 changes: 1 addition & 1 deletion services/credentials-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ IMAGE:=local/sunbird-rc-credentials-service
.PHONY: docker publish test

docker:
@docker build --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .
@docker buildx build --platform=$$PLATFORM --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .
publish:
@docker push $(IMAGE)
test:
Expand Down
2 changes: 1 addition & 1 deletion services/identity-service/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ IMAGE:=local/sunbird-rc-identity-service
.PHONY: docker publish test run unseal

docker:
@docker build --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .
@docker buildx build --platform=$$PLATFORM --cache-from=$$CACHE_SRC --cache-to=$$CACHE_DST -t $(IMAGE) .
publish:
@docker push $(IMAGE)
test:
Expand Down

0 comments on commit b879c50

Please sign in to comment.