Skip to content

Commit

Permalink
chore: another approach to building and uploading the image (#115)
Browse files Browse the repository at this point in the history
Co-authored-by: charly-bg <[email protected]>
  • Loading branch information
marianogoldman and charly-bg authored Aug 22, 2024
1 parent 1960784 commit 47f0aa1
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
55 changes: 33 additions & 22 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ jobs:

runs-on: ubuntu-latest
steps:
- name: Remove unused Haskell GHC CodeQL
run: |
sudo apt-get remove -y ghc haskell-platform
sudo apt-get autoremove -y
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/local/bin/ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
- uses: actions/checkout@v4
with:
submodules: recursive
Expand All @@ -28,32 +36,20 @@ jobs:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
- name: Build Image
id: build-image
uses: redhat-actions/buildah-build@v2
with:
context: .
push: ${{ github.ref == 'refs/heads/main' }}
tags: quay.io/decentraland/${{ matrix.service_name }}:next,quay.io/decentraland/${{ matrix.service_name }}:${{ github.sha }}
#load: true
# cache-from: type=gha
# cache-to: type=gha,mode=max
image: ${{ matrix.service_name }}
layers: true
tags: next ${{ github.sha }} ${{ inputs.docker-tag }}
dockerfiles: |
./Dockerfile
build-args: |
COMMIT_HASH=${{ github.sha }}
UNITY_DOCKER_IMAGE=${{ matrix.unity_docker_image }}
PLATFORM_TARGET=${{ matrix.platform_target }}
- name: Create $(pwd)/tmp/Unity/Unity_lic.ulf
run: mkdir -p $(pwd)/tmp/Unity && echo "$UNITY_2021_ULF" > $(pwd)/tmp/Unity/Unity_lic.ulf
env:
Expand All @@ -64,20 +60,35 @@ jobs:
docker run \
-v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \
-v $(pwd):/app \
quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \
quay.io/decentraland/${{ matrix.service_name }}:next \
sh -c "cd /app ; ls -la ; chmod +x ci-editmode-test.sh ; ./ci-editmode-test.sh"
- name: Run test conversion of urn:decentraland:off-chain:base-avatars:brown_pants
run: |
docker run \
-v $(pwd)/tmp/Unity:/root/.local/share/unity3d/Unity \
quay.io/decentraland/${{ matrix.service_name }}@${{ steps.docker_build.outputs.digest }} \
quay.io/decentraland/${{ matrix.service_name }}:next \
node --trace-warnings --abort-on-uncaught-exception --unhandled-rejections=strict dist/test-conversion.js \
--baseUrl https://peer.decentraland.org/content \
--pointer urn:decentraland:off-chain:base-avatars:brown_pants \
--outDir /tmp-ab \
--logFile /tmp-ab/log.txt
- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
if: ${{ github.ref == 'refs/heads/main' }}
with:
image: ${{ steps.build-image.outputs.image }}
tags: ${{ steps.build-image.outputs.tags }}
registry: quay.io/decentraland
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Print image url
run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
if: ${{ github.ref == 'refs/heads/main' }}

- name: Trigger deployment
id: deploy
uses: decentraland/dcl-deploy-action@main
Expand Down
1 change: 0 additions & 1 deletion consumer-server/src/adapters/README.md

This file was deleted.

1 change: 0 additions & 1 deletion consumer-server/src/logic/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions consumer-server/src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ export const metricDeclarations = {
...getDefaultHttpMetrics(),
...logsMetricsDeclarations,
...queueMetrics,
test_ping_counter: {
help: 'Count calls to ping',
type: IMetricsComponent.CounterType,
labelNames: ['pathname']
},
ab_converter_exit_codes: {
help: 'Counter of exit codes of asset bundle conversions',
type: IMetricsComponent.CounterType,
Expand Down

0 comments on commit 47f0aa1

Please sign in to comment.