File tree Expand file tree Collapse file tree 18 files changed +810
-8
lines changed
deploy_data_schemas_to_azfs
deploy_dbt_project_to_azfs
deploy_poetry_project_to_azfs Expand file tree Collapse file tree 18 files changed +810
-8
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1515# limitations under the License.
1616
1717set -Eeuo pipefail
18+
1819next_version=$( git describe --tags --abbrev=0 | awk -F. ' /[0-9]+\./{$NF++;print}' OFS=.)
1920version=${next_version} a${PULL_REQUEST_NUMBER} .dev${COMMENTS_COUNT}
2021sed -i " s/version = \" 0.0.0\" /version = \" $version \" /" pyproject.toml
Original file line number Diff line number Diff line change 1+ name : Deploy schemas
2+ description : Deploy schemas
3+
4+ branding :
5+ icon : ' battery-charging'
6+ color : ' green'
7+
8+ inputs :
9+ output_directory :
10+ description : Output directory
11+ required : true
12+
13+ project_version :
14+ description : Version of project to deploy
15+ required : true
16+
17+ project_name :
18+ description : Name of project to deploy
19+ required : true
20+
21+ destination :
22+ required : true
23+ description : Destination directory or SAS token
24+
25+ runs :
26+ using : " composite"
27+ steps :
28+ - name : Prepare python deployment
29+ shell : bash
30+ run : $GITHUB_ACTION_PATH/deploy_data_schemas_to_azfs.sh
31+ env :
32+ DEPLOYMENT_ROOT : ${{ inputs.deployment_root }}
33+ PROJECT_VERSION : ${{ inputs.project_version }}
34+ PROJECT_NAME : ${{ inputs.project_name }}
35+ DESTINATION : ${{ inputs.destination }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2022 Ecco Sneaks & Data
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ set -Eeuo pipefail
18+
19+ SOURCE_DIRECTORY=" ./$DEPLOYMENT_ROOT /$PROJECT_NAME -schemas/$PROJECT_VERSION /"
20+ mkdir -p " $SOURCE_DIRECTORY "
21+ mv -v ./schemas/* " $SOURCE_DIRECTORY "
22+
23+ ./azcopy copy " ./$SOURCE_DIRECTORY /*" " $DESTINATION " --recursive --overwrite true --put-md5
Original file line number Diff line number Diff line change 1+ name : Deploy DBT
2+ description : Deploy source code of DBT queries
3+
4+ branding :
5+ icon : ' battery-charging'
6+ color : ' green'
7+
8+ inputs :
9+ output_directory :
10+ description : Output directory
11+ required : true
12+
13+ project_version :
14+ description : Version of project to deploy
15+ required : true
16+
17+ project_name :
18+ description : Name of project to deploy
19+ required : true
20+
21+ destination :
22+ required : true
23+ description : Destination directory or SAS token
24+
25+ runs :
26+ using : " composite"
27+ steps :
28+ - name : Prepare python deployment
29+ shell : bash
30+ run : $GITHUB_ACTION_PATH/deploy_dbt_project_to_azfs.sh
31+ env :
32+ DEPLOYMENT_ROOT : ${{ inputs.deployment_root }}
33+ PROJECT_VERSION : ${{ inputs.project_version }}
34+ PROJECT_NAME : ${{ inputs.project_name }}
35+ DESTINATION : ${{ inputs.destination }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2022 Ecco Sneaks & Data
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ set -Eeuo pipefail
18+
19+ SOURCE_DIRECTORY=" ./$DEPLOYMENT_ROOT /$PROJECT_NAME /$PROJECT_VERSION /"
20+ mkdir -p SOURCE_DIRECTORY
21+ mv -v ./target/run/* " $SOURCE_DIRECTORY "
22+
23+ ./azcopy copy " ./$SOURCE_DIRECTORY /*" " $DESTINATION " --recursive --overwrite true --put-md5
Original file line number Diff line number Diff line change 1+ name : Deploy python code
2+ description : Deploy source code of python application
3+
4+ branding :
5+ icon : ' battery-charging'
6+ color : ' green'
7+
8+ inputs :
9+ output_directory :
10+ description : Output directory
11+ required : true
12+
13+ project_version :
14+ description : Version of project to deploy
15+ required : true
16+
17+ project_name :
18+ description : Name of project to deploy
19+ required : true
20+
21+ destination :
22+ required : true
23+ description : Destination directory or SAS token
24+
25+ project_directory :
26+ description : Name of directory within the project to deploy
27+ required : false
28+
29+ python_version :
30+ description : Python version
31+ required : false
32+ default : " 3.9"
33+
34+ runs :
35+ using : " composite"
36+ steps :
37+ - name : Prepare python deployment
38+ shell : bash
39+ run : $GITHUB_ACTION_PATH/deploy_poetry_project_to_azfs.sh
40+ env :
41+ OUTPUT_DIRECTORY : ${{ inputs.output_directory }}
42+ PROJECT_VERSION : ${{ inputs.project_version }}
43+ PROJECT_NAME : ${{ inputs.project_name }}
44+ PROJECT_DIRECTORY : ${{ inputs.project_directory }}
45+ PYTHON_VERSION : ${{ inputs.python_version }}
46+ DESTINATION : ${{ inputs.destination }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2022 Ecco Sneaks & Data
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ set -Eeuo pipefail
18+
19+ echo " Preparing to deploy $PROJECT_NAME $PROJECT_VERSION "
20+ set -Eeuo pipefail
21+ env_path=$( poetry env info | grep Path | head -n 1 | cut -d' :' -f2 | xargs)
22+
23+ if [ -z " $PROJECT_DIRECTORY " ]; then
24+ PROJECT_DIRECTORY=" $PROJECT_NAME "
25+ fi ;
26+
27+ SOURCE_DIRECTORY=" ./$DEPLOYMENT_ROOT /$PROJECT_NAME /$PROJECT_VERSION /"
28+ mkdir -p " $SOURCE_DIRECTORY "
29+ mv -v " $env_path " /lib/python" $PYTHON_VERSION " /site-packages/* " $SOURCE_DIRECTORY "
30+ mv -v ./" $PROJECT_DIRECTORY " /* " $SOURCE_DIRECTORY "
31+
32+ ./azcopy copy " ./$SOURCE_DIRECTORY /*" " $DESTINATION " --recursive --overwrite true --put-md5
Original file line number Diff line number Diff line change 1+ name : Generate version
2+ description : Returns current version of the project
3+
4+ branding :
5+ icon : ' battery-charging'
6+ color : ' green'
7+
8+ outputs :
9+ version :
10+ description : " Version of current project based on git tags"
11+ value : ${{ steps.version.outputs.version }}
12+
13+ runs :
14+ using : " composite"
15+ steps :
16+ - name : Create development package
17+ shell : bash
18+ run : $GITHUB_ACTION_PATH/generate_version.sh
19+ id : version
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright (c) 2022 Ecco Sneaks & Data
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # http://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+
17+ set -Eeuo pipefail
18+
19+ version=$( git describe --tags --abbrev=7)
20+
21+ echo " version=$version " >> " $GITHUB_OUTPUT "
You can’t perform that action at this time.
0 commit comments