-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from guardian/deployments
Deployments / GHA build
- Loading branch information
Showing
13 changed files
with
363 additions
and
24 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
.github/workflows/build.yml → .github/old-workflows/gnm-style.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Concierge GraphQL | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
concierge-graphql: | ||
runs-on: ubuntu-latest | ||
|
||
# The first two permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
# The second set of three permissions are needed to write test results back to GH | ||
permissions: | ||
id-token: write | ||
contents: read | ||
issues: read | ||
checks: write | ||
packages: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Setup JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: corretto | ||
java-version: 17 | ||
cache: sbt | ||
|
||
- name: Build and test | ||
env: | ||
SBT_JUNIT_OUTPUT: ./junit-tests | ||
JAVA_OPTS: -Dsbt.log.noformat=true | ||
BUILD_NUMBER: ${{ github.run_number }} | ||
run: | | ||
sbt 'test;docker:publish' | ||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@v1 | ||
if: always() #runs even if there is a test failure | ||
with: | ||
files: junit-tests/*.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: GraphiQL explorer | ||
|
||
on: | ||
push: | ||
branches: ["*"] | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
graphiql-explorer: | ||
runs-on: ubuntu-latest | ||
|
||
# The first two permissions are needed to interact with GitHub's OIDC Token endpoint. | ||
# The second set of three permissions are needed to write test results back to GH | ||
permissions: | ||
id-token: write | ||
contents: read | ||
issues: read | ||
checks: write | ||
packages: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: 'yarn' | ||
cache-dependency-path: explorer/yarn.lock | ||
|
||
- run: yarn install --frozen-lockfile | ||
name: Prepare to build explorer | ||
working-directory: explorer | ||
|
||
- run: yarn build | ||
name: Build explorer | ||
working-directory: explorer | ||
|
||
|
||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
context: explorer | ||
tags: ghcr.io/guardian/concierge-graphql/graphiql-explorer:${{ github.run_number }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
FROM elasticsearch:7.17.14 | ||
|
||
RUN yes | bin/elasticsearch-plugin install repository-s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
service: concierge-graphql | ||
stack: concierge-graphql | ||
name: concierge-graphql | ||
spec: | ||
ports: | ||
- name: webapp | ||
port: 9000 | ||
targetPort: 9000 | ||
selector: | ||
service: concierge-graphql | ||
stack: concierge-graphql | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
service: concierge-graphql | ||
stack: concierge-graphql | ||
name: concierge-graphql | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 5 | ||
selector: | ||
matchLabels: | ||
service: concierge-graphql | ||
stack: concierge-graphql | ||
template: | ||
metadata: | ||
labels: | ||
service: concierge-graphql | ||
stack: concierge-graphql | ||
spec: | ||
containers: | ||
- name: concierge-graphql | ||
image: ghcr.io/guardian/concierge-graphql/concierge-graphql:3 | ||
env: | ||
- name: ELASTICSEARCH_HOST | ||
value: capi-elasticsearch | ||
ports: | ||
- containerPort: 9000 | ||
readinessProbe: | ||
httpGet: | ||
path: /healthcheck | ||
port: 9000 | ||
initialDelaySeconds: 10 | ||
periodSeconds: 10 | ||
livenessProbe: | ||
httpGet: | ||
path: /healthcheck | ||
port: 9000 | ||
initialDelaySeconds: 15 | ||
periodSeconds: 3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
annotations: | ||
kompose.cmd: kompose convert | ||
kompose.version: 1.19.0 (f63a961c) | ||
creationTimestamp: null | ||
labels: | ||
io.kompose.service: capi-elasticsearch | ||
name: capi-elasticsearch | ||
spec: | ||
type: NodePort | ||
ports: | ||
- name: '9200' | ||
port: 9200 | ||
targetPort: 9200 | ||
- name: '9300' | ||
port: 9300 | ||
targetPort: 9300 | ||
selector: | ||
service: elasticsearch | ||
stack: concierge-graphql | ||
--- | ||
apiVersion: apps/v1 | ||
kind: StatefulSet | ||
metadata: | ||
labels: | ||
service: elasticsearch | ||
stack: concierge-graphql | ||
name: capi-elasticsearch | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
service: elasticsearch | ||
stack: concierge-graphql | ||
serviceName: capi-elasticsearch | ||
template: | ||
metadata: | ||
labels: | ||
service: elasticsearch | ||
stack: concierge-graphql | ||
name: capi-elasticsearch | ||
spec: | ||
#initContainers: | ||
#- image: elasticsearch:7.17.14 | ||
# name: install-plugins | ||
# command: | ||
# - bin/elasticsearch-plugin | ||
# - install | ||
# - repository-s3 | ||
containers: | ||
- env: | ||
- name: ES_JAVA_OPTS | ||
value: -Xmx2048m -Xms2048m | ||
- name: discovery.type | ||
value: single-node | ||
image: andyg42/elasticsearch-with-s3snap:7.17.14 | ||
name: capi-elasticsearch | ||
ports: | ||
- containerPort: 9200 | ||
- containerPort: 9300 | ||
volumeMounts: | ||
- mountPath: /usr/share/elasticsearch/data | ||
name: esdata | ||
volumeClaimTemplates: | ||
- metadata: | ||
name: esdata | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 80Gi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
service: graphiql-server | ||
stack: graphiql-server | ||
name: graphiql-server | ||
spec: | ||
ports: | ||
- name: webapp | ||
port: 9000 | ||
targetPort: 9000 | ||
selector: | ||
service: graphiql-server | ||
stack: graphiql-server | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
service: graphiql-server | ||
stack: graphiql-server | ||
name: graphiql-server | ||
spec: | ||
replicas: 1 | ||
revisionHistoryLimit: 5 | ||
selector: | ||
matchLabels: | ||
service: graphiql-server | ||
stack: graphiql-server | ||
template: | ||
metadata: | ||
labels: | ||
service: graphiql-server | ||
stack: graphiql-server | ||
spec: | ||
containers: | ||
- name: graphiql-server | ||
image: ghcr.io/guardian/concierge-graphql/graphiql-server:3 | ||
ports: | ||
- containerPort: 9000 | ||
readinessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: 2 | ||
periodSeconds: 10 | ||
livenessProbe: | ||
httpGet: | ||
path: / | ||
port: 80 | ||
initialDelaySeconds: 5 | ||
periodSeconds: 3 |
Oops, something went wrong.