Skip to content

Commit

Permalink
feat(e2e): enable maven proxy
Browse files Browse the repository at this point in the history
It should speed up execution
  • Loading branch information
squakez committed Jun 21, 2023
1 parent 946d1d4 commit 3f14521
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/actions/kamel-config-cluster/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,19 @@ runs:
echo "Complete"
#
# Install a Maven Proxy repository
#
- id: install-maven-proxy
name: Install Maven proxy repository
shell: bash
run: |
kubectl create namespace nexus
kubectl apply -f ./.github/actions/kamel-config-cluster/nexus.yaml -n nexus
kubectl rollout status deployment nexus -n nexus --timeout=180s
echo "TEST_ENABLE_NEXUS=true" >> $GITHUB_OUTPUT
echo "Maven proxy repository up and running!"
outputs:
cluster-image-registry-push-host:
description: "The image registry to which to push images"
Expand Down
49 changes: 49 additions & 0 deletions .github/actions/kamel-config-cluster/nexus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
apiVersion: v1
kind: Service
metadata:
name: nexus
spec:
selector:
app: nexus
ports:
- protocol: TCP
port: 80
targetPort: 8081
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nexus
spec:
selector:
matchLabels:
app: nexus
template:
metadata:
labels:
app: nexus
spec:
containers:
- name: nexus
image: sonatype/nexus3
ports:
- containerPort: 8081
name: 8081-tcp
livenessProbe:
httpGet:
path: /service/rest/v1/status
port: 8081
initialDelaySeconds: 90
periodSeconds: 3
readinessProbe:
httpGet:
path: /service/rest/v1/status
port: 8081
initialDelaySeconds: 90
periodSeconds: 3
volumeMounts:
- name: nexus-data
mountPath: /nexus-data
volumes:
- name: nexus-data
emptyDir: {}
2 changes: 1 addition & 1 deletion e2e/support/test_nexus_hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
const (
nexusNamespace = "nexus"
nexusService = "nexus"
nexusMavenMirror = "http://nexus.nexus/repository/maven-public/@id=nexus@mirrorOf=central"
nexusMavenMirror = "http://nexus.nexus/@id=nexus@mirrorOf=*"
)

func init() {
Expand Down

0 comments on commit 3f14521

Please sign in to comment.