Skip to content

MP-50709: Use nginx on web01 as proxy for github actions to access the nexus #12

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

Merged
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
17 changes: 16 additions & 1 deletion .github/workflows/compose_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ on:
default: true
type: boolean
secrets:
nexus_user:
required: true
nexus_pass:
required: true
dockerhub_user:
required: true
dockerhub_pass:
Expand All @@ -34,6 +38,11 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1

- name: Setup Nexus Access
run: |
echo "$(dig +short mice-prod-web01.dns.boreus.de) miceportal.nexus-registry-mice.boreus.de" | sudo tee -a /etc/hosts
docker login miceportal.nexus-registry-mice.boreus.de -u ${{ secrets.nexus_user }} -p ${{ secrets.nexus_pass }}

- name: Log in to Docker Hub
run: |
docker login -u ${{ secrets.dockerhub_user }} -p ${{ secrets.dockerhub_pass }}
Expand All @@ -43,10 +52,16 @@ jobs:
with:
application-name: ${{ inputs.application-name }}

- name: Push Docker image to Docker Hub
- name: Push Docker image to Nexus
if: ${{ inputs.push_to_docker_hub }}
run: docker compose -f docker-compose.test.yml push ${{ inputs.application-name}}

- name: Push Docker image to Dockerhub
if: ${{ inputs.push_to_docker_hub }}
run: |
docker tag $(docker compose -f docker-compose.test.yml images ${{ inputs.application-name}} -q) miceportal/${{ inputs.application-name}}:${{ inputs.tag }}
docker push miceportal/${{ inputs.application-name}}:${{ inputs.tag }}

- name: Stop containers
if: always()
run: docker compose -f docker-compose.test.yml down
9 changes: 5 additions & 4 deletions .github/workflows/compose_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ on:
required: true
type: string
secrets:
dockerhub_user:
nexus_user:
required: true
dockerhub_pass:
nexus_pass:
required: true
env:
TAG: ${{ inputs.tag }}
Expand All @@ -51,9 +51,10 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1

- name: Log in to Docker Hub
- name: Setup Nexus Access
run: |
docker login -u ${{ secrets.dockerhub_user }} -p ${{ secrets.dockerhub_pass }}
echo "$(dig +short mice-prod-web01.dns.boreus.de) miceportal.nexus-registry-mice.boreus.de" | sudo tee -a /etc/hosts
docker login miceportal.nexus-registry-mice.boreus.de -u ${{ secrets.nexus_user }} -p ${{ secrets.nexus_pass }}

- name: Compose up
uses: konvenit/workflowator/.github/actions/compose@v12
Expand Down