Skip to content

Commit

Permalink
Merge pull request #3806 from allegro/test-build-snapshot
Browse files Browse the repository at this point in the history
Allow building snapshots
  • Loading branch information
hipek8 authored May 9, 2024
2 parents 541c25d + 8689400 commit 5440253
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish snapshot

on:
workflow_dispatch:
inputs:
branch:
description: 'For which branch build snapshot?'
required: true

jobs:
publish:

runs-on: ubuntu-latest
environment: ci

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Publish docker snapshot
env:
RETRY_COUNT: 3
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}
export RALPH_VERSION=$(shell ./get_version.sh show)
until [ "$RETRY_COUNT" -le 0 ]
do
make publish-docker-snapshot-image && break
RETRY_COUNT=$((RETRY_COUNT-1))
echo "==== Publish docker failed. Remaining retries: $RETRY_COUNT ===="
done
docker logout
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ publish-docker-image: build-docker-image
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(RALPH_VERSION)
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:latest

publish-docker-snapshot-image: version = $(shell ./get_version.sh show)
publish-docker-snapshot-image: build-snapshot-docker-image
docker push $(DOCKER_REPO_NAME)/ralph:$(version)
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(version)

install-js:
npm install
./node_modules/.bin/gulp
Expand Down
2 changes: 2 additions & 0 deletions src/ralph/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ def only_true(request):
'function': 'DataCenterAssetAdmin.changelist_view'
},
]
ADMIN_SITE_HEADER = 'Ralph DEV'
ADMIN_SITE_TITLE = 'Ralph DEV'

0 comments on commit 5440253

Please sign in to comment.