Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow building snapshots #3806

Merged
merged 8 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'
Loading