Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

CI: Push images on each main push #96

Merged
merged 1 commit into from
Mar 13, 2023
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
41 changes: 41 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: Main push
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha != '' && github.event.pull_request.head.sha || github.sha }}

- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: Maven Build
run: mvn clean package


- name: Build cotainer
run: mvn clean package

- name: "Build container images"
run: |
make build-images GIT_BRANCH=${GITHUB_REF##*/}
make tag-images GIT_BRANCH=${GITHUB_REF##*/}


- name: Login to quay
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: |
echo "$QUAY_TOKEN" | docker login quay.io --username parodos+githubpush --password-stdin

- name: "Push images"
run: |
make push-images GIT_BRANCH=${GITHUB_REF##*/}
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ MAVEN ?= mvn
# set quiet mode by default
Q=@

ORG=quay.io/parados/
ORG=quay.io/parodos/
WORKFLOW_SERVICE_IMAGE=workflow-service
NOTIFICATION_SERVICE_IMAGE=notification-service

Expand Down Expand Up @@ -132,11 +132,11 @@ tag-images: ## Tag docker images with git hash and branch name
$(DOCKER) tag docker-compose_notification-service:latest $(ORG)$(NOTIFICATION_SERVICE_IMAGE):$(GIT_BRANCH)

push-images: ## Push docker images to quay.io registry
$(DOCKER) push $(ORG)/$(WORKFLOW_SERVICE_IMAGE):$(GIT_HASH)
$(DOCKER) push $(ORG)/$(NOTIFICATION_SERVICE_IMAGE):$(GIT_HASH)
$(DOCKER) push $(ORG)$(WORKFLOW_SERVICE_IMAGE):$(GIT_HASH)
$(DOCKER) push $(ORG)$(NOTIFICATION_SERVICE_IMAGE):$(GIT_HASH)

$(DOCKER) push $(ORG)/$(WORKFLOW_SERVICE_IMAGE):$(GIT_BRANCH)
$(DOCKER) push $(ORG)/$(NOTIFICATION_SERVICE_IMAGE):$(GIT_BRANCH)
$(DOCKER) push $(ORG)$(WORKFLOW_SERVICE_IMAGE):$(GIT_BRANCH)
$(DOCKER) push $(ORG)$(NOTIFICATION_SERVICE_IMAGE):$(GIT_BRANCH)

push-images-to-kind: ## Push docker images to kind
$(DOCKER) tag docker-compose_workflow-service:latest $(ORG)$(WORKFLOW_SERVICE_IMAGE):test
Expand Down
4 changes: 2 additions & 2 deletions hack/manifests/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
spec:
containers:
- name: notification-service
image: quay.io/parados/notification-service:latest
image: quay.io/parodos/notification-service:latest
env:
- name: SPRING_PROFILES_ACTIVE
value: "local"
Expand All @@ -33,7 +33,7 @@ spec:
spec:
containers:
- name: workflow-service
image: quay.io/parados/workflow-service:latest
image: quay.io/parodos/workflow-service:latest
env:
- name: SPRING_PROFILES_ACTIVE
value: "dev"
2 changes: 1 addition & 1 deletion hack/manifests/testing/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: parados-ingress
name: parodos-ingress
spec:
rules:
- http:
Expand Down
4 changes: 2 additions & 2 deletions hack/manifests/testing/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ resources:
- ingress.yaml
- ldap.yaml
images:
- name: quay.io/parados/workflow-service:latest
- name: quay.io/parodos/workflow-service:latest
newTag: test

- name: quay.io/parados/notification-service:latest
- name: quay.io/parodos/notification-service:latest
newTag: test

configMapGenerator:
Expand Down