Skip to content

Commit

Permalink
devcontainer changes
Browse files Browse the repository at this point in the history
  • Loading branch information
samruddhikhandale authored Jun 2, 2022
1 parent f00fc2d commit fbfd7a9
Show file tree
Hide file tree
Showing 11 changed files with 204 additions and 233 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/push-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Build and push "dev" images

on:
workflow_dispatch:
# schedule:
# - cron: '0 14 * * MON'

jobs:
build-and-push:
name: Build and push
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')"
strategy:
matrix:
page: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
page-total: [10]
fail-fast: true
runs-on: ubuntu-latest
steps:
- name: Free more space
id: free_space
run: |
set -e
# Ensure enough space is available for build
sudo apt-get autoremove -y
sudo apt-get clean -y
sudo rm -rf /usr/share/dotnet
- name: Checkout
id: checkout
uses: actions/checkout@v1

- name: Azure CLI login
id: az_login
uses: azure/login@v1
with:
creds: ${{ secrets.AZ_ACR_CREDS }}

- name: Build and push dev tags
id: build_and_push
run: |
set -e
# ACR login
ACR_REGISTRY_NAME=$(echo ${{ secrets.REGISTRY }} | grep -oP '(.+)(?=\.azurecr\.io)')
az acr login --name $ACR_REGISTRY_NAME
# Build and push dev images
yarn install
GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
if [ "$GIT_BRANCH" == "" ]; then
GIT_BRANCH=main
fi
build/vscdc push --page ${{ matrix.page }} \
--pageTotal ${{ matrix.page-total }} \
--release $GIT_BRANCH \
--github-repo ${{ github.repository }} \
--registry ${{ secrets.REGISTRY }} \
--registry-path ${{ secrets.REGISTRY_BASE_PATH }} \
--stub-registry ${{ secrets.STUB_REGISTRY }} \
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }}
package:
name: Package
if: "!contains(github.event.head_commit.message, 'Automated update') && !contains(github.event.head_commit.message, 'CI ignore')"
needs: [build-and-push]
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v1

- name: Package
id: package
run: |
set -e
yarn install
GIT_BRANCH=$(echo "${{ github.ref }}" | grep -oP 'refs/(heads|tags)/\K(.+)')
if [ "$GIT_BRANCH" == "" ]; then
GIT_BRANCH=main
fi
build/vscdc pack --prep-and-package-only \
--release $GIT_BRANCH \
--github-repo ${{ github.repository }} \
--registry ${{ secrets.REGISTRY }} \
--registry-path ${{ secrets.REGISTRY_BASE_PATH }} \
--stub-registry ${{ secrets.STUB_REGISTRY }} \
--stub-registry-path ${{ secrets.STUB_REGISTRY_BASE_PATH }}
# Set an output with the resulting package name for upload
PKG_PREFIX=$(node -p "require('./package.json').name")
PKG_NAME=$PKG_PREFIX-${{ github.sha }}.tgz
mv ./$PKG_PREFIX-*.tgz ./$PKG_NAME
echo "::set-output name=package_name::$PKG_NAME"
- name: Upload package
uses: actions/[email protected]
with:
name: ${{ steps.package.outputs.package_name }}
path: ./${{ steps.package.outputs.package_name }}
4 changes: 2 additions & 2 deletions .github/workflows/smoke-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ on:
push:
branches: [main]
paths:
- 'containers/python/**'
- 'src/python/**'
pull_request:
branches:
- main
paths:
- 'containers/python/**'
- 'src/python/**'
jobs:
smoke-test:
name: Smoke test
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
Loading

0 comments on commit fbfd7a9

Please sign in to comment.