File tree Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Expand file tree Collapse file tree 2 files changed +31
-7
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,17 @@ workflows:
52
52
- Needs-Approval
53
53
<< : *version_tag_only
54
54
55
+ nightly :
56
+ triggers :
57
+ - schedule :
58
+ cron : " 0 19 * * *"
59
+ filters :
60
+ branches :
61
+ only :
62
+ - main
63
+ jobs :
64
+ - deploy
65
+
55
66
executors :
56
67
docker-executor :
57
68
parameters :
@@ -215,3 +226,17 @@ jobs:
215
226
- store_artifacts :
216
227
path : /tmp/workspace/dist/
217
228
destination : dist
229
+
230
+ deploy :
231
+ executor :
232
+ name : docker-executor
233
+ python_version : " 3.9"
234
+ steps :
235
+ - checkout
236
+ - setup_remote_docker :
237
+ version : 20.10.12
238
+ - run :
239
+ name : Deploy
240
+ command : |
241
+ cd .circleci/integration-tests
242
+ bash script.sh $ASTRO_BASE_DOMAIN $ASTRO_RELEASE_NAME $ASTRO_API_KEY
Original file line number Diff line number Diff line change @@ -8,9 +8,8 @@ function echo_help() {
8
8
echo " Usage:"
9
9
echo " BASEDOMAIN: Astro cloud instance domain"
10
10
echo " RELEASE_NAME: Astro release name of a deployment"
11
- echo " BUILD_NUMBER Docker image tag"
12
- echo " API_KEY Deployment service account api key"
13
- echo " sh script.sh <BASEDOMAIN> <RELEASE_NAME> <BUILD_NUMBER> <API_KEY>"
11
+ echo " ASTRO_API_KEY Deployment service account api key"
12
+ echo " bash script.sh <BASEDOMAIN> <RELEASE_NAME> <ASTRO_API_KEY>"
14
13
}
15
14
16
15
# Delete if source old source files exist
@@ -23,15 +22,14 @@ function clean() {
23
22
find . -name " example_*" -exec rm {} \;
24
23
}
25
24
26
- if [ " $1 " == " -h" ] || [ " $# " -ne 4 ]; then
25
+ if [ " $1 " == " -h" ] || [ " $# " -ne 3 ]; then
27
26
echo_help
28
27
exit
29
28
fi
30
29
31
30
BASE_DOMAIN=$1
32
31
RELEASE_NAME=$2
33
- BUILD_NUMBER=$3
34
- API_KEY=$4
32
+ ASTRO_API_KEY=$3
35
33
36
34
clean
37
35
@@ -47,9 +45,10 @@ touch requirements.txt
47
45
for dag in $( find " ${PROVIDER_PATH} " -type f -name ' example_*' ) ; do cp " ${dag} " " ${SCRIPT_PATH} " ; done ;
48
46
49
47
# Build image and deploy
48
+ BUILD_NUMBER=` awk ' BEGIN {srand(); print srand()}' `
50
49
IMAGE_NAME=registry.${BASE_DOMAIN} /${RELEASE_NAME} /airflow:ci-${BUILD_NUMBER}
51
50
docker build -t " ${IMAGE_NAME} " -f " ${SCRIPT_PATH} " /Dockerfile " ${SCRIPT_PATH} "
52
- docker login registry.staging.astronomer.io -u _ -p " ${API_KEY } "
51
+ docker login registry.staging.astronomer.io -u _ -p " ${ASTRO_API_KEY } "
53
52
docker push " ${IMAGE_NAME} "
54
53
55
54
clean
You can’t perform that action at this time.
0 commit comments