Skip to content

Commit

Permalink
2.0.0-beta nightly build automation testing (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilumeshsargur authored Mar 22, 2024
2 parents b2802e8 + 83683eb commit 92b8ffe
Show file tree
Hide file tree
Showing 11 changed files with 156 additions and 258 deletions.
97 changes: 11 additions & 86 deletions .github/workflows/nightly-build-image.yml
Original file line number Diff line number Diff line change
@@ -1,101 +1,26 @@
name: Build New Image Version
on:
# Manually call
workflow_dispatch:
inputs:
release-type:
required: true
type: choice
description: Type of release
options:
- patch
- minor
- major
base-version:
required: true
description: Base version=
# Call from other workflow
workflow_call:
inputs:
release-type:
type: string
required: true
base-version:
type: string
required: true
on: workflow_dispatch
#on:
## # Run every night at 5:15PM PST
## # Run before monthly, so we don't immediately patch a new minor version
## schedule:
## - cron: '0 15 17 ? * *'
defaults:
run:
shell: bash -l {0}
jobs:
open-pr:
name: Open Pull Request
runs-on: ubuntu-latest
if: github.repository == 'aws/sagemaker-distribution'
permissions:
pull-requests: write
contents: write
outputs:
pr_id: ${{ steps.get_pr_id.outputs.pr_id }}
target_version: ${{ steps.calc_target.outputs.target_version }}
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./environment.yml
environment-name: sagemaker-distribution
init-shell: bash
- name: Free up disk space
run: rm -rf /opt/hostedtoolcache
- name: Activate sagemaker-distribution
run: micromamba activate sagemaker-distribution
- name: Calculate target version
id: calc_target
run: |
TARGET_VERSION=$(python -c 'import semver; print(semver.bump_${{ inputs.release-type }}("${{ inputs.base-version }}"))')
echo "target_version=$TARGET_VERSION" >> $GITHUB_OUTPUT
- name: Create new branch
# Note - CodeBuild depends on this branch name. Don't change without corresponding backend change.
run: git checkout -b 2.0.0-beta
- name: Generate artifacts
run: python ./src/main.py create-${{ inputs.release-type }}-version-artifacts --base-patch-version ${{ inputs.base-version }}
- name: Commit .in artifacts to branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ./build_artifacts
git commit -m 'chore: Generate build artifacts for ${{ steps.calc_target.outputs.target_version }} release'
git push --set-upstream origin 2.0.0-beta
- name: Open pull request
id: get_pr_id
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Note - CodeBuild depends on this PR title. Don't change without corresponding backend change.
run: |
URL=$(gh pr create -H 2.0.0-beta \
--title 'release: v${{ steps.calc_target.outputs.target_version }}' -F ./.github/workflows/PR_TEMPLATE.md)
PR=$(echo $URL | sed 's:.*/::')
echo "pr_id=$PR" >> $GITHUB_OUTPUT
call-codebuild-project:
runs-on: ubuntu-latest
needs: open-pr
permissions:
pull-requests: write
contents: write
id-token: write
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::700843992353:role/codebuild-start-build-role
aws-region: us-west-2
role-to-assume: ${{ secrets.START_CODEBUILD_ROLE }}
aws-region: us-east-1
# CodeBuild timeout of 8 hours
role-duration-seconds: 3840
role-duration-seconds: 28800
- name: Run CodeBuild
uses: dark-mechanicum/aws-codebuild@v1
env:
CODEBUILD__sourceVersion: 'pr/${{ needs.open-pr.outputs.pr_id }}'
with:
projectName: 'buildtestpublicimage1C7307A-9AzES2hf19lW'
buildspec: '{"imageOverride": "aws/codebuild/standard:7.0"}'
projectName: 'betaimagerelease92AD4800-5O3Rv5xogtpw'
buildspec: '{"imageOverride": "aws/codebuild/standard:7.0","imagePullCredentialsTypeOverride": "CODEBUILD"}'
46 changes: 0 additions & 46 deletions .github/workflows/nightly-patch-release.yml

This file was deleted.

10 changes: 6 additions & 4 deletions build_artifacts/v2/v2.0/v2.0.0/v2.0.0-beta/CHANGELOG-cpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ Package | Previous Version | Current Version
---|---|---
boto3|1.28.64|1.34.51
ipython|8.21.0|8.22.2
jupyter-lsp|2.2.3|2.2.4
jupyterlab|4.1.2|4.1.4
scipy|1.11.4|1.12.0
fastapi|0.103.2|0.110.0
uvicorn|0.27.1|0.28.0
pip|23.3.2|24.0
autogluon|0.8.2|1.0.0
conda|23.11.0|24.1.2
langchain|0.1.9|0.1.10
jupyter-ai|2.9.1|2.10.0
langchain|0.1.9|0.1.11
jupyter-ai|2.9.1|2.11.0
jupyterlab-lsp|5.0.3|5.1.0
keras|2.12.0|2.15.0
nodejs|18.18.2|18.18.2
sagemaker-python-sdk|2.198.1|2.210.0
sagemaker-python-sdk|2.198.1|2.212.0
tensorflow|2.12.1|2.15.0
10 changes: 6 additions & 4 deletions build_artifacts/v2/v2.0/v2.0.0/v2.0.0-beta/CHANGELOG-gpu.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ Package | Previous Version | Current Version
---|---|---
boto3|1.28.64|1.34.51
ipython|8.21.0|8.22.2
jupyter-lsp|2.2.3|2.2.4
jupyterlab|4.1.2|4.1.4
scipy|1.11.4|1.12.0
fastapi|0.103.2|0.110.0
uvicorn|0.27.1|0.28.0
pip|23.3.2|24.0
autogluon|0.8.2|1.0.0
conda|23.11.0|24.1.2
langchain|0.1.9|0.1.10
jupyter-ai|2.9.1|2.10.0
langchain|0.1.9|0.1.11
jupyter-ai|2.9.1|2.11.0
jupyterlab-lsp|5.0.3|5.1.0
keras|2.12.0|2.15.0
nodejs|18.18.2|18.18.2
sagemaker-python-sdk|2.198.1|2.210.0
sagemaker-python-sdk|2.198.1|2.212.0
tensorflow|2.12.1|2.15.0
2 changes: 2 additions & 0 deletions build_artifacts/v2/v2.0/v2.0.0/v2.0.0-beta/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ RUN if [[ -z $ARG_BASED_ENV_IN_FILENAME ]] ; \
else envsubst < /tmp/$ARG_BASED_ENV_IN_FILENAME | tee --append /tmp/$ENV_IN_FILENAME ; \
fi

COPY local-packages /tmp/local-packages

ARG CONDA_OVERRIDE_CUDA=$CUDA_MAJOR_MINOR_VERSION
RUN micromamba install -y --name base --file /tmp/$ENV_IN_FILENAME && \
micromamba clean --all --yes --force-pkgs-dirs && \
Expand Down
12 changes: 6 additions & 6 deletions build_artifacts/v2/v2.0/v2.0.0/v2.0.0-beta/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,24 @@ pandas|2.1.4|2.1.4
altair|5.2.0|5.2.0
boto3|1.34.51|1.34.51
ipython|8.22.2|8.22.2
jupyter-lsp|2.2.3|2.2.3
jupyterlab|4.1.2|4.1.2
jupyter-lsp|2.2.4|2.2.4
jupyterlab|4.1.4|4.1.4
amazon-codewhisperer-jupyterlab-ext|2.0.1|2.0.1
jupyter-scheduler|2.5.1|2.5.1
amazon-sagemaker-jupyter-scheduler|3.0.7|3.0.7
scipy|1.12.0|1.12.0
scikit-learn|1.4.1.post1|1.4.1.post1
fastapi|0.110.0|0.110.0
uvicorn|0.27.1|0.27.1
uvicorn|0.28.0|0.28.0
pip|24.0|24.0
torchvision|0.15.2|0.15.2
autogluon|1.0.0|1.0.0
ipywidgets|8.1.2|8.1.2
notebook|7.1.1|7.1.1
aws-glue-sessions|1.0.4|1.0.4
conda|24.1.2|24.1.2
langchain|0.1.10|0.1.10
jupyter-ai|2.10.0|2.10.0
langchain|0.1.11|0.1.11
jupyter-ai|2.11.0|2.11.0
jupyter-dash|0.4.2|0.4.2
jupyter-server-proxy|4.1.0|4.1.0
jupyterlab-git|0.50.0|0.50.0
Expand All @@ -44,7 +44,7 @@ sagemaker-headless-execution-driver|0.0.12|0.0.12
sagemaker-jupyterlab-emr-extension|0.1.9|0.1.9
sagemaker-jupyterlab-extension|0.2.0|0.2.0
sagemaker-kernel-wrapper|0.0.2|0.0.2
sagemaker-python-sdk|2.210.0|2.210.0
sagemaker-python-sdk|2.212.0|2.212.0
sagemaker-studio-analytics-extension|0.0.21|0.0.21
sasl|0.3.1|0.3.1
supervisor|4.2.5|4.2.5
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Add any additional packages here
Loading

0 comments on commit 92b8ffe

Please sign in to comment.