There are different of build environments between Screwdriver.cd and users' such as environment variables, templates and commands.
It would be great if users can run their build instantly on their local Mac with a mostly the same environment as Screwdriver.cd's.
For example,
screwdriver.yaml and run docker container on user's development environmentIt will possibly be able to implement in tk3fftk/sdctl: Screwdriver.cd API wrapper CLI like $ sdctl build local
Concourse has one-off build feature. It runs a task which is executed inside a container in Concourse cluster and logs are sent to local environment. And the one-off build only can be shown by direct specification of a build iD from UI.
Pros of this one-off build feature are that we can check cluster specific problems like network issue via cli.
Cons of the feature are that it may be slower than a local build.
References:
Rapid Local Iteration)The build environment on screwdriver has difference from a user's local environment.
Such as
/opt/sd directory copied from launcher image$ ls
screwdriver.yaml
$ cat screwdriver.yaml
jobs:
test:
image: centos7:latest
steps:
- echo: echo "test"
$ export SD_LOCAL_TOKEN=<User token>
$ sdlocal build test
echo "test"
test
$ ls
screwdriver.yaml artifacts
test job run in the local containerecho step logs are printed on user consoleartifacts directoryIf this design is acceptable, we will start to make sdlocal proposal.
@jithine
Would you check above background? We write base function about sdlocal. If it is ok, we will start to make proposal which written in detail.
@yuichi10 background details look's good 馃憦 Please go ahead with proposal.
One thing I would add is the ability to set ssh-agent from localhost and mount custom paths. Use case is that we have x509 certs and ssh agent with sshca certs available for builds in build cluster. In sdlocal that should be able to use the user's ssh agent and x509 certs. In order to facilitate this ,sdlocal should have ability to skip certain (user configurable with an initial list of steps) init and teardown stets
Thank you!
You are right. Able to mount ssh-agent looks useful.
We will add the idea to proposal and we will start to write proposal.
We fixed design for sd-local, so we breakdown the tasks.
TODO:
i ran into problems with pylint. i could locally install and run it after spinning up a clean ubuntu:16.04 container locally in a ubuntu 16.04 VM. also tested complex provisioning steps locally in another fresh ubntu:16.04 container afterwards it still works as expected. it didn't work in SD. im seeing "import error no module named app" from python while running pylint in SD container. we got workaround by running "pylint-fail-under" wrapper. get the feeling that SD container or docker engine might be different than average one. that hypercontainer?
Most helpful comment
Background
The build environment on screwdriver has difference from a user's local environment.
Such as
Objective
Use cases
Design
/opt/sddirectory copied from launcher imageExample
testjob run in the local containerechostep logs are printed on user consoleartifactsdirectoryP.S.
If this design is acceptable, we will start to make sdlocal proposal.