diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..6e9f482a7f7c3e86dc8e81d263dacbbd608c2f81 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,4 @@ +include: + - project: 'platform-one/big-bang/pipeline-templates/pipeline-templates' + ref: master + file: '/templates/package-tests.yml' diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..4dc68c6ff8e4ba0e0e4e14d5025b38d958d9c3b0 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +# Changelog + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000000000000000000000000000000000..dd0eebafda65aad7b2609040a77ebf9212e2f3fc --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing + +Thanks for contributing to this repository! + +This repository follows the following conventions: + +* [Semantic Versioning](https://semver.org/) +* [Keep a Changelog](https://keepachangelog.com/) +* [Conventional Commits](https://www.conventionalcommits.org/) + +Development requires the Kubernetes CLI tool as well as a local Kubernetes cluster. [k3d](https://k3d.io) is recommended as a lightweight local option for standing up Kubernetes clusters. + +To contribute a change: + +1. Create a branch on the cloned repository +2. Make the changes in code. +3. Write tests using [cypress](https://www.cypress.io) and [Conftest](https://conftest.dev) +4. Make commits using the [Conventional Commits](https://www.conventionalcommits.org/) format. This helps with automation for changelog. Update `CHANGELOG.md` in the same commit using the [Keep a Changelog](https://keepachangelog.com). Depending on tooling maturity, this step may be automated. +5. Open a merge request using one of the provided templates. If this merge request is solving a preexisting issue, add the issue reference into the description of the MR. +6. During this time, ensure that all new commits are rebased into your branch so that it remains up to date with the `main` branch. +7. Wait for a maintainer of the repository (see CODEOWNERS) to approve. +8. If you have permissions to merge, you are responsible for merging. Otherwise, a CODEOWNER will merge the commit. diff --git a/chart/templates/bigbang/nexus-service.yaml b/chart/templates/bigbang/nexus-service.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7e9818bfa7e1534750bf3e5675a90d292b0a2377 --- /dev/null +++ b/chart/templates/bigbang/nexus-service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: nexus-service-bigbang + namespace: {{ template "nexus.namespace" . }} +spec: + ports: + - port: 80 + targetPort: 8081 + protocol: TCP + name: http + - port: 5000 + targetPort: 5000 + protocol: TCP + name: docker + selector: + app: {{ template "nexus.name" . }} \ No newline at end of file diff --git a/chart/templates/bigbang/nexus-vs.yaml b/chart/templates/bigbang/nexus-vs.yaml new file mode 100644 index 0000000000000000000000000000000000000000..020f58587996729c437e313aadd37ce08ae2fb67 --- /dev/null +++ b/chart/templates/bigbang/nexus-vs.yaml @@ -0,0 +1,31 @@ +{{- if .Values.istio.enabled -}} +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: nexus + namespace: {{ .Release.Namespace }} +spec: + hosts: + - "nexus.{{ .Values.hostname }}" + gateways: + - istio-system/main + http: + - match: + - uri: + prefix: / + route: + - destination: + host: nexus-service-bigbang + port: + number: 80 + - match: + - uri: + prefix: / + route: + - destination: + host: nexus-service-bigbang + port: + number: 5000 + +{{- end }} + diff --git a/chart/values.yaml b/chart/values.yaml index c6da164ba1f382868cc710a790e4791d91c2d01e..d7b90a3a2d7ef5eae8b299849684a3b32585f6a0 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -19,8 +19,8 @@ initAdminPassword: password: "admin321" nexus: - imageName: quay.io/travelaudience/docker-nexus - imageTag: 3.27.0 + imageName: registry1.dso.mil/ironbank/sonatype/nexus/nexus + imageTag: 3.29.0-02 imagePullPolicy: IfNotPresent # Uncomment this to scheduler pods on priority # priorityClassName: "high-priority" @@ -101,7 +101,7 @@ route: nexusProxy: enabled: true # svcName: proxy-svc - imageName: quay.io/travelaudience/docker-nexus-proxy + imageName: registry.dso.mil/platform-one/big-bang/apps/sandbox/nexus/nexus-proxy imageTag: 2.6.0 imagePullPolicy: IfNotPresent port: 8080 @@ -312,7 +312,7 @@ secret: service: type: ClusterIP # name: additional-svc - enabled: false + enabled: true labels: {} annotations: {} ports: @@ -333,3 +333,12 @@ additionalConfigMaps: [] # strictContentTypeValidation: 'true' # versionPolicy: 'RELEASE' # layoutPolicy: 'STRICT' + +hostname: bigbang.dev +istio: + # Toggle istio interaction + # TODO: Toggling does nothing yet, this is always on + enabled: false +monitoring: + enabled: false + diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d735775da03fd68374d2b934e190091aeefbeb05 --- /dev/null +++ b/tests/README.md @@ -0,0 +1 @@ +Cypress tests run headless calling the script cy-run.sh \ No newline at end of file diff --git a/tests/cypress.json b/tests/cypress.json new file mode 100644 index 0000000000000000000000000000000000000000..43b18da7e6191a0665ead1f129081fce0512c1ac --- /dev/null +++ b/tests/cypress.json @@ -0,0 +1,10 @@ +{ + + "pluginsFile": false, + "supportFile": false, + "fixturesFolder": false, + "env": { + "nexus_url": "nexus.bigbang.dev" + + } +} diff --git a/tests/cypress/integration/nexus-healthspec.js b/tests/cypress/integration/nexus-healthspec.js new file mode 100644 index 0000000000000000000000000000000000000000..dbaa6447f5b0b06ceb84210c728be93144935ed9 --- /dev/null +++ b/tests/cypress/integration/nexus-healthspec.js @@ -0,0 +1,5 @@ +describe('Basic prometheus', function() { + it('Visits the prometheus sign in page', function() { + cy.visit(Cypress.env('nexus_url')) + }) +}) diff --git a/tests/cypress/look_other_packages_for_example b/tests/cypress/look_other_packages_for_example deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/tests/main-test-gateway.yaml b/tests/main-test-gateway.yaml new file mode 100644 index 0000000000000000000000000000000000000000..1c7d7d1bd7598367474f3123659e7de6de5c88d3 --- /dev/null +++ b/tests/main-test-gateway.yaml @@ -0,0 +1,26 @@ +apiVersion: networking.istio.io/v1beta1 +kind: Gateway +metadata: + name: main + namespace: istio-system +spec: + selector: + istio: ingressgateway + servers: + - hosts: + - '*' + port: + name: http + number: 80 + protocol: HTTP + tls: + httpsRedirect: true + - hosts: + - '*.bigbang.dev' + port: + name: https + number: 443 + protocol: HTTPS + tls: + credentialName: wildcard-cert + mode: SIMPLE diff --git a/tests/test-values.yml b/tests/test-values.yml new file mode 100644 index 0000000000000000000000000000000000000000..26cf47afc9332d54ce7fcabba4e29efbe80eadb3 --- /dev/null +++ b/tests/test-values.yml @@ -0,0 +1,7 @@ + +istio: + enabled: true +nexus: + imagePullSecret: private-registry-mil + +