|
16 | 16 | - Skip |
17 | 17 | - Staging Only |
18 | 18 | - Staging + Prod |
19 | | - sandbox: |
20 | | - description: 'Deploy to Sandbox' |
| 19 | + dev: |
| 20 | + description: 'Deploy to Dev' |
21 | 21 | default: true |
22 | 22 | required: true |
23 | 23 | type: boolean |
24 | | - sandboxNoDbRefresh: |
25 | | - description: 'Sandbox Disable Daily DB Refresh' |
| 24 | + devNoDbRefresh: |
| 25 | + description: 'Dev Disable Daily DB Refresh' |
26 | 26 | default: false |
27 | 27 | required: true |
28 | 28 | type: boolean |
@@ -278,8 +278,6 @@ jobs: |
278 | 278 | tags: | |
279 | 279 | ghcr.io/ietf-tools/datatracker:${{ env.PKG_VERSION }} |
280 | 280 | ${{ env.FEATURE_LATEST_TAG && format('ghcr.io/ietf-tools/datatracker:{0}-latest', env.FEATURE_LATEST_TAG) || null }} |
281 | | - cache-from: type=gha |
282 | | - cache-to: type=gha,mode=max |
283 | 281 |
|
284 | 282 | - name: Update CHANGELOG |
285 | 283 | id: changelog |
@@ -392,44 +390,45 @@ jobs: |
392 | 390 | value: "Failed" |
393 | 391 | |
394 | 392 | # ----------------------------------------------------------------- |
395 | | - # SANDBOX |
| 393 | + # DEV |
396 | 394 | # ----------------------------------------------------------------- |
397 | | - sandbox: |
398 | | - name: Deploy to Sandbox |
399 | | - if: ${{ !failure() && !cancelled() && github.event.inputs.sandbox == 'true' }} |
| 395 | + dev: |
| 396 | + name: Deploy to Dev |
| 397 | + if: ${{ !failure() && !cancelled() && github.event.inputs.dev == 'true' }} |
400 | 398 | needs: [prepare, release] |
401 | | - runs-on: [self-hosted, dev-server] |
| 399 | + runs-on: ubuntu-latest |
402 | 400 | environment: |
403 | | - name: sandbox |
| 401 | + name: dev |
404 | 402 | env: |
405 | 403 | PKG_VERSION: ${{needs.prepare.outputs.pkg_version}} |
406 | 404 |
|
407 | 405 | steps: |
408 | | - - uses: actions/checkout@v4 |
409 | | - |
410 | | - - name: Download a Release Artifact |
411 | | - |
412 | | - with: |
413 | | - name: release-${{ env.PKG_VERSION }} |
414 | | - |
415 | | - - name: Deploy to containers |
416 | | - env: |
417 | | - DEBIAN_FRONTEND: noninteractive |
418 | | - run: | |
419 | | - echo "Reset production flags in settings.py..." |
420 | | - sed -i -r -e 's/^DEBUG *= *.*$/DEBUG = True/' -e "s/^SERVER_MODE *= *.*\$/SERVER_MODE = 'development'/" ietf/settings.py |
421 | | - echo "Install Deploy to Container CLI dependencies..." |
422 | | - cd dev/deploy-to-container |
423 | | - npm ci |
424 | | - cd ../.. |
425 | | - echo "Start Deploy..." |
426 | | - node ./dev/deploy-to-container/cli.js --branch ${{ github.ref_name }} --domain dev.ietf.org --appversion ${{ env.PKG_VERSION }} --commit ${{ github.sha }} --ghrunid ${{ github.run_id }} --nodbrefresh ${{ github.event.inputs.sandboxNoDbRefresh }} |
427 | | - |
428 | | - - name: Cleanup old docker resources |
429 | | - env: |
430 | | - DEBIAN_FRONTEND: noninteractive |
431 | | - run: | |
432 | | - docker image prune -a -f |
| 406 | + - uses: actions/checkout@v4 |
| 407 | + with: |
| 408 | + ref: main |
| 409 | + |
| 410 | + - name: Get Deploy Name |
| 411 | + env: |
| 412 | + DEBIAN_FRONTEND: noninteractive |
| 413 | + run: | |
| 414 | + echo "Install Get Deploy Name CLI dependencies..." |
| 415 | + cd dev/k8s-get-deploy-name |
| 416 | + npm ci |
| 417 | + echo "Get Deploy Name..." |
| 418 | + echo "DEPLOY_NAMESPACE=$(node cli.js --branch ${{ github.ref_name }})" >> "$GITHUB_ENV" |
| 419 | +
|
| 420 | + - name: Deploy to dev |
| 421 | + uses: the-actions-org/workflow-dispatch@v4 |
| 422 | + with: |
| 423 | + workflow: deploy-dev.yml |
| 424 | + repo: ietf-tools/infra-k8s |
| 425 | + ref: main |
| 426 | + token: ${{ secrets.GH_INFRA_K8S_TOKEN }} |
| 427 | + inputs: '{ "app":"datatracker", "appVersion":"${{ env.PKG_VERSION }}", "remoteRef":"${{ github.sha }}", "namespace":"${{ env.DEPLOY_NAMESPACE }}", "disableDailyDbRefresh":${{ inputs.devNoDbRefresh }} }' |
| 428 | + wait-for-completion: true |
| 429 | + wait-for-completion-timeout: 30m |
| 430 | + wait-for-completion-interval: 30s |
| 431 | + display-workflow-run-url: false |
433 | 432 |
|
434 | 433 | # ----------------------------------------------------------------- |
435 | 434 | # STAGING |
|
0 commit comments