Skip to content
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

Remove all tasks related to App Engine from GHA ci #1216

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
54 changes: 0 additions & 54 deletions .github/workflows/previews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,59 +13,6 @@ jobs:
run: |2
make
git diff --exit-code
deploy-app-article-server:
container:
image: ksfmedia/diskho:gha-1.1
options: "--cpus 2"
needs: check-ci
outputs:
preview: "${{ steps.deploy-app-article-server.outputs.url}}"
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: "actions/checkout@v2"
- name: Setup Cloud SDK
uses: "google-github-actions/[email protected]"
with:
export_default_credentials: 'true'
project_id: ksf-staging
service_account_key: "${{ secrets.GCP_STAGING_AE_KEY }}"
- run: |2
yarn install --pure-lockfile
mkdir -p build
- env:
HIDE_LOGIN_LINKS: 'true'
LETTERA_URL: https://lettera.api.ksfmedia.fi/v3
PERSONA_URL: https://persona.api.ksfmedia.fi/v1
PUBLIC_URL: /dist
SENTRY_DSN: "https://[email protected]/5707650"
name: Build Server App article server
run: |2
ruby deploy.rb app-article-server
cp -R apps/app-article-server build/app-article-server
shell: bash
- env:
HIDE_LOGIN_LINKS: 'true'
LETTERA_URL: https://lettera.api.ksfmedia.fi/v3
PERSONA_URL: https://persona.api.ksfmedia.fi/v1
PUBLIC_URL: /dist
SENTRY_DSN: "https://[email protected]/5707650"
name: Copy app.yaml.dev to app.yaml
run: |
cp build/app-article-server/app.dev.yaml build/app-article-server/app.yaml
shell: bash
- id: deploy-app-article-server
name: Deploy App article server
uses: "google-github-actions/[email protected]"
with:
credentials: "${{ secrets.GCP_STAGING_AE_KEY }}"
project_id: ksf-staging
promote: 'false'
working_directory: build/app-article-server
- continue-on-error: true
name: Keep only 10 latest versions of app-article-server
run: |
./ci/ae-cleanup.sh app-article-server
deploy-gs:
container:
image: ksfmedia/diskho:gha-1.1
Expand Down Expand Up @@ -293,7 +240,6 @@ jobs:
- [Corona banner](https://deploy-previews.ksfmedia.fi/${{ github.sha }}/corona-banner/index.html)
- [HBL365](https://deploy-previews.ksfmedia.fi/${{ github.sha }}/hbl365/index.html)
- [Prenumerera](https://deploy-previews.ksfmedia.fi/${{ github.sha }}/prenumerera/index.html)
- [App article server](${{ needs.deploy-app-article-server.outputs.preview }}/article/c7da734f-9e2b-45be-b645-5f4742766486)
name: previews
on:
pull_request:
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,82 +23,6 @@ jobs:
run: |2
make
git diff --exit-code
deploy-app-article-server:
container:
image: ksfmedia/diskho:gha-1.1
options: "--cpus 2"
needs: check-ci
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: "actions/checkout@v2"
- name: Setup Cloud SDK
uses: "google-github-actions/[email protected]"
with:
export_default_credentials: 'true'
project_id: ksf-production
service_account_key: "${{ secrets.GCP_PRODUCTION_AE_KEY }}"
- run: |2
yarn install --pure-lockfile
mkdir -p build
- env:
HIDE_LOGIN_LINKS: 'true'
LETTERA_URL: https://lettera.api.ksfmedia.fi/v3
PERSONA_URL: https://persona.api.ksfmedia.fi/v1
PUBLIC_URL: /dist
SENTRY_DSN: "https://[email protected]/5707650"
name: Build Server App article server
run: |2
ruby deploy.rb app-article-server
cp -R apps/app-article-server build/app-article-server
shell: bash
- name: Generate app.yaml for app-article-server
run: |
dhall-to-yaml --omit-empty <<< "./ci/app.yaml.dhall ./ci/app-servers/app-article-server.dhall" > ./build/app-article-server/app.yaml
cat ./build/app-article-server/app.yaml
shell: bash
- id: deploy-app-article-server-production
name: Deploy App article server
uses: "google-github-actions/[email protected]"
with:
credentials: "${{ secrets.GCP_PRODUCTION_AE_KEY }}"
project_id: ksf-production
promote: 'true'
working_directory: build/app-article-server
- continue-on-error: true
name: Keep only 10 latest versions of app-article-server
run: |
./ci/ae-cleanup.sh app-article-server
deploy-dispatch-yaml:
container:
image: ksfmedia/diskho:gha-1.1
options: "--cpus 2"
needs:
- deploy-app-article-server
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: "actions/checkout@v2"
- name: Setup Cloud SDK
uses: "google-github-actions/[email protected]"
with:
export_default_credentials: 'true'
project_id: ksf-production
service_account_key: "${{ secrets.GCP_PRODUCTION_AE_KEY }}"
- run: |2
yarn install --pure-lockfile
mkdir -p build
- name: Generate AppEngine domain map
run: |2
dhall-to-yaml --omit-empty <<< "./ci/dispatch.yaml.dhall <Staging|Production>.Production" > ./dispatch.yaml
cat dispatch.yaml
shell: bash
- name: Deploy AppEngine domain map
uses: "google-github-actions/[email protected]"
with:
credentials: "${{ secrets.GCP_PRODUCTION_AE_KEY }}"
deliverables: dispatch.yaml
project_id: ksf-production
deploy-gs:
container:
image: ksfmedia/diskho:gha-1.1
Expand Down
11 changes: 0 additions & 11 deletions ci/app-servers.dhall

This file was deleted.

40 changes: 0 additions & 40 deletions ci/app-servers/AppServer.dhall

This file was deleted.

22 changes: 0 additions & 22 deletions ci/app-servers/app-article-server.dhall

This file was deleted.

24 changes: 0 additions & 24 deletions ci/app-servers/mosaico-server.dhall

This file was deleted.

36 changes: 0 additions & 36 deletions ci/app.yaml.dhall

This file was deleted.

35 changes: 0 additions & 35 deletions ci/ci-master.dhall
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ let App = A.App

let apps = Prelude.List.filter App.Type (\(a: App.Type) -> a.production) A.apps


let AE = ./app-servers.dhall

let AS = ./app-servers/AppServer.dhall

let AppServer = AS.AppServer

let container = ./container.dhall

let promote = "true"
Expand All @@ -28,28 +21,12 @@ let apps-to-cache = Prelude.List.filter App.Type Actions.hasLockfile apps

let checkCISteps = Actions.checkCISteps

let mkAeSteps =
\(env : Actions.Env) ->
\(app : AppServer.Type) ->
Actions.setupSteps env
# [ Actions.mkBuildServerStep app ]
# [ Actions.generateAppYaml app ]
# [ Actions.mkAppEngineStep env promote app ]
# [ Actions.mkCleanAppEngineStep env app ]

let steps-gs =
Actions.setupSteps Actions.Env.Production
# Actions.cacheSteps apps-to-cache
# Actions.buildSteps apps
# Actions.uploadSteps Actions.Env.Production apps

let steps-app-article = mkAeSteps Actions.Env.Production AE.app-article-server

let steps-dispatch =
Actions.setupSteps Actions.Env.Production
# [ Actions.generateDispatchYamlStep Actions.Env.Production ]
# [ Actions.deployDispatchYamlStep Actions.Env.Production ]

let refreshCDNJobs =
{ refresh_cdn_mitt-konto = Actions.refreshCDNJob "mitt-konto" "deploy-gs"
, refresh_cdn_app-article =
Expand All @@ -69,18 +46,6 @@ in { name = "production"
, steps = steps-gs
, needs = "check-ci"
}
, deploy-app-article-server =
{ runs-on = "ubuntu-latest"
, container
, steps = steps-app-article
, needs = "check-ci"
}
, deploy-dispatch-yaml =
{ runs-on = "ubuntu-latest"
, container
, steps = steps-dispatch
, needs = [ "deploy-app-article-server" ]
}
}
// refreshCDNJobs
, env =
Expand Down
Loading