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

use proper Ralph version #3662

Merged
merged 1 commit into from
Sep 21, 2021
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
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ jobs:
- name: Publish docker
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_PASSWORD }}
export RALPH_VERSION=${GITHUB_REF#refs/*/}
make publish-docker-image
docker logout
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
TEST?=ralph
TEST_ARGS=
DOCKER_REPO_NAME?="allegro"
RALPH_VERSION?=$(shell git describe --abbrev=0)

.PHONY: test flake clean coverage docs coveralls

Expand Down Expand Up @@ -35,20 +36,19 @@ build-snapshot-package:
docker run --rm -v $(shell pwd):/volume ralph-deb:latest build-snapshot-package
docker image rm --force ralph-deb:latest

build-docker-image: version = $(shell git describe --abbrev=0)
build-docker-image:
docker build \
--no-cache \
-f docker/Dockerfile-prod \
--build-arg RALPH_VERSION="$(version)" \
--build-arg RALPH_VERSION="$(RALPH_VERSION)" \
-t $(DOCKER_REPO_NAME)/ralph:latest \
-t "$(DOCKER_REPO_NAME)/ralph:$(version)" .
-t "$(DOCKER_REPO_NAME)/ralph:$(RALPH_VERSION)" .
docker build \
--no-cache \
-f docker/Dockerfile-static \
--build-arg RALPH_VERSION="$(version)" \
--build-arg RALPH_VERSION="$(RALPH_VERSION)" \
-t $(DOCKER_REPO_NAME)/ralph-static-nginx:latest \
-t "$(DOCKER_REPO_NAME)/ralph-static-nginx:$(version)" .
-t "$(DOCKER_REPO_NAME)/ralph-static-nginx:$(RALPH_VERSION)" .

build-snapshot-docker-image: version = $(shell ./get_version.sh show)
build-snapshot-docker-image: build-snapshot-package
Expand All @@ -63,11 +63,10 @@ build-snapshot-docker-image: build-snapshot-package
--build-arg RALPH_VERSION="$(version)" \
-t "$(DOCKER_REPO_NAME)/ralph-static-nginx:$(version)" .

publish-docker-image: version = $(shell git describe --abbrev=0)
publish-docker-image: build-docker-image
docker push $(DOCKER_REPO_NAME)/ralph:$(version)
docker push $(DOCKER_REPO_NAME)/ralph:$(RALPH_VERSION)
docker push $(DOCKER_REPO_NAME)/ralph:latest
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(version)
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:$(RALPH_VERSION)
docker push $(DOCKER_REPO_NAME)/ralph-static-nginx:latest

install-js:
Expand Down