Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deploy job; use absolute path for HOME #175

Merged
merged 3 commits into from
Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rebuild-all: deps fetch-serverless-custom-file
$(SLS_BINARY) invoke stepf -n rBuilds -d '{"force": true}'

serverless-deploy.%: deps fetch-serverless-custom-file
$(SLS_BINARY) deploy --stage $*
$(SLS_BINARY) deploy --stage $* --verbose

define GEN_TARGETS
docker-build-$(platform):
Expand Down
8 changes: 7 additions & 1 deletion deploy.Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@ pipeline {
dockerfile {
dir 'jenkins'
label 'docker'
// Required for the serverless-python-requirements plugin to install
// Python requirements using the AWS build images, running Docker inside Docker.
additionalBuildArgs '--build-arg DOCKER_GID=$(stat -c %g /var/run/docker.sock) --build-arg JENKINS_UID=$(id -u jenkins) --build-arg JENKINS_GID=$(id -g jenkins)'
args '-v /var/run/docker.sock:/var/run/docker.sock --group-add docker'
}
}
environment {
HOME = "."
// Set HOME to the workspace for the serverless-python-requirements plugin.
// The plugin uses HOME for its default cache location, which needs to be
// mounted in the separate Python build container. This needs to be an absolute
// path that also exists on the host since we're mounting the Docker socket.
HOME = "${env.WORKSPACE}"
}
options {
ansiColor('xterm')
Expand Down
3 changes: 3 additions & 0 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ package:
- integration/**
- builder/**
- docs/**
# Generated files by other tools
- node_modules/**
- .npm/**
- .cache/**

provider:
name: aws
Expand Down