forked from feast-dev/feast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SAASMLOPS-1139 Airlift SP specific files
- Loading branch information
1 parent
afd52b8
commit 2b6ecbb
Showing
2 changed files
with
121 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
@Library('sailpoint/jenkins-release-utils')_ | ||
pipeline { | ||
|
||
parameters { | ||
string(name: 'BRANCH', defaultValue: 'master') | ||
} | ||
|
||
agent { | ||
kubernetes { | ||
yaml "${libraryResource 'pods/build-container.yaml'}" | ||
} | ||
} | ||
|
||
environment { | ||
|
||
SERVICE_NAME = "feast-bytewax" | ||
GITHUB_REPO = "[email protected]:sailpoint/feast.git" | ||
ECR_REPOSITORY = "${env.AWS_ACCOUNT_ID}.dkr.ecr.us-east-1.amazonaws.com" | ||
REPOSITORY_NAME = "sailpoint/${SERVICE_NAME}" | ||
} | ||
|
||
stages { | ||
stage('Checkout SCM') { | ||
steps { | ||
checkout( | ||
[$class: 'GitSCM', | ||
branches: [[name: "origin/${BRANCH}"], [name: "*/master"]], | ||
doGenerateSubmoduleConfigurations: false, | ||
extensions: [], submoduleCfg: [], | ||
userRemoteConfigs: [[credentialsId: 'git-automation-ssh', url: "$GITHUB_REPO"]]]) | ||
} | ||
} | ||
stage('Build Docker') { | ||
steps { | ||
container('kaniko') { | ||
script { | ||
echo "publishing ${SERVICE_NAME}:${BUILD_NUMBER}" | ||
|
||
sh """ | ||
/kaniko/executor \ | ||
--context ./ \ | ||
--dockerfile ./sailpoint-bytewax.dockerfile \ | ||
--build-arg DOCKER_BUILDKIT=1 \ | ||
--destination=${ECR_REPOSITORY}/${REPOSITORY_NAME}:${BUILD_NUMBER} | ||
""" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
junit allowEmptyResults: true, testResults: '**/cov/*.xml' | ||
} | ||
success { | ||
container('aws-cli') { | ||
echo "Rebasing tag 'latest' to be '${BUILD_NUMBER}'" | ||
sh ''' | ||
MANIFEST=`aws ecr batch-get-image --repository-name ${REPOSITORY_NAME} --image-ids imageTag=${BUILD_NUMBER} --query images[].imageManifest --output text` | ||
aws ecr put-image --repository-name ${REPOSITORY_NAME} --image-tag latest --image-manifest "\$MANIFEST" | ||
''' | ||
} | ||
slackSend( | ||
channel : "proj-eng-iai-cicd", | ||
message : "${SERVICE_NAME}:${BUILD_NUMBER} Build \n ${JOB_URL} ", | ||
replyBroadcast: true, | ||
color : "#33ff33", | ||
failOnError : false | ||
) | ||
} | ||
failure { | ||
container('aws-cli') { | ||
assumePodRole { | ||
script { | ||
sh '''#!/bin/bash | ||
aws ecr batch-delete-image \ | ||
--repository-name $REPOSITORY_NAME \ | ||
--image-ids imageTag=$BUILD_NUMBER | ||
''' | ||
} | ||
} | ||
} | ||
|
||
slackSend( | ||
channel : "proj-eng-iai-cicd", | ||
message : "@iai-tarragon ${SERVICE_NAME}:${BUILD_NUMBER} Build broken \n ${JOB_URL} ", | ||
replyBroadcast: true, | ||
color : "#ff3333", | ||
failOnError : false | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Original File: sdk/python/feast/infra/materialization/contrib/bytewax/Dockerfile | ||
FROM 406205545357.dkr.ecr.us-east-1.amazonaws.com/sailpoint/python3.10:1 AS build | ||
|
||
RUN dnf install --refresh -y git | ||
|
||
WORKDIR /bytewax | ||
|
||
# Copy dataflow code | ||
COPY sdk/python/feast/infra/materialization/contrib/bytewax/bytewax_materialization_dataflow.py /bytewax | ||
COPY sdk/python/feast/infra/materialization/contrib/bytewax/dataflow.py /bytewax | ||
|
||
# Copy entrypoint | ||
COPY sdk/python/feast/infra/materialization/contrib/bytewax/entrypoint.sh /bytewax | ||
|
||
# Copy necessary parts of the Feast codebase | ||
COPY sdk/python sdk/python | ||
COPY protos protos | ||
COPY go go | ||
COPY setup.py setup.py | ||
COPY pyproject.toml pyproject.toml | ||
COPY README.md README.md | ||
|
||
# Install Feast for AWS with Bytewax dependencies | ||
# We need this mount thingy because setuptools_scm needs access to the | ||
# git dir to infer the version of feast we're installing. | ||
# https://github.com/pypa/setuptools_scm#usage-from-docker | ||
# I think it also assumes that this dockerfile is being built from the root of the directory. | ||
RUN --mount=source=.git,target=.git,type=bind SETUPTOOLS_SCM_PRETEND_VERSION=1 pip3 install --no-cache-dir '.[aws,gcp,bytewax,snowflake,postgres,grpcio]' |