{"_id":"@trussle/ci","_rev":"104-d7d1049ee8ca62f1ff4e6946a24b0efc","name":"@trussle/ci","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@trussle/ci","version":"1.0.0","author":{"name":"Team Trussle"},"_id":"@trussle/ci@1.0.0","maintainers":[{"name":"soutar","email":"john@soutar.me"},{"name":"dillantrussle","email":"dillan.pisavadia@trussle.com"},{"name":"codesplicer","email":"github@vikbhatti.com"},{"name":"beauallison","email":"beau.developer@outlook.com"},{"name":"renovate","email":"renovate@keylocation.sg"},{"name":"jamietrussle","email":"jamie.thirlwell@trussle.com"},{"name":"trussle-admin","email":"team@trussle.com"},{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},{"name":"jonnywildey","email":"jonnywildey@gmail.com"},{"name":"daningrey","email":"daniel@trussle.com"},{"name":"chiaratrussle","email":"chiara@trussle.com"},{"name":"daniele.rapati.trussle","email":"daniele.rapati@trussle.com"},{"name":"vickyy","email":"vicky.lee@trussle.com"}],"bin":{"t-ci":"bin/t-ci"},"dist":{"shasum":"e9b60c4cde21e3eb0281e0c87a85a861f69d77e2","tarball":"https://registry.npmjs.org/@trussle/ci/-/ci-1.0.0.tgz","fileCount":8,"integrity":"sha512-ygDS8Q9VxbP3H3nytGAYXNo9eRhJR9JFIxocIsGu9p0TSVKccxXzzMclVF4PTIPiTzfVf5ipQQ1A9R5NDrnpww==","signatures":[{"sig":"MEUCID6KhytC+mA/xt4Z2yZU4zCMo2KNUT0dsXbOgc5LKWN5AiEAsORAkvfaUdrRVxzOVq261fyAM/tjMeZfX9kW1865Lvw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5446,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNLR0CRA9TVsSAnZWagAANu4P/0Ylvw0NTgazJbXr2Vhk\nsEDcDtISPcuGGETo3dInKLknplf4ene0K3QoxDTx0oAvDOhLlTu8yJLffApH\nvyTbaDzCRyyu41D6j2ArtuitYllMLhr6RG0KMkkX7ooA88+476yLYFXPIqUy\nRwdjNd/mEtx5FggNBPHDFYyDPl4PbPBdJWyJCs6SpcSQVmcvP7OAl9VZT/rU\n7e7bc8VOabmuhdQQ1z5s9R5dJMHtk1NUkkFv+S8senAZT+3tFAJno8WuXisr\nLjvHTUHir6QpXEGquTQ1MJjaiNuE1DJkWJsNHn6f8aQkRkS1Tw2PVNW4B1qJ\ndkxvheHnIjqkWhatFFDm3ZzRdHRbym0mL29ZvvF0HbUrc+J0TyeQ5cQeJS8g\ntIHdV0HBhRf+ITuvUY52cD39Pfd1Q2de4B07KRO8ZVL0Bj3z5moQsb5DtPTo\n82w03m7h6HL25aNx/c7LA3DUCL9UQTNj1pgO5VASZSPEaIbVT4pUVBxu/whj\nZgOV4xFJNGJ6M51paInkxHuvQvZFllOX9koMSVs6llMNQTigLM0RvE3tmj7q\nG7RPvmJXSeWTQYx/tl9KrqozomARKtcv5rVufcmGmZU1/7FreBqPUsf/gigj\npXNYnsKIoaXhzgrW+GIf6im1LrK2MgapB+M0gUY/8lP2HPKFYg11pdqyW4w9\nVz2L\r\n=VENJ\r\n-----END PGP SIGNATURE-----\r\n"},"_from":"file:trussle-ci-1.0.0.tgz","gitHead":"173694b0df9c5377d211b930ed19cdd6f2cd55ba","_npmUser":{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},"_resolved":"","_integrity":"","_npmVersion":"6.5.0","description":"Continuous Integration scripts","directories":{},"_nodeVersion":"11.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ci_1.0.0_1546957940050_0.9873694654779128","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@trussle/ci","version":"1.0.1","author":{"name":"Team Trussle"},"_id":"@trussle/ci@1.0.1","maintainers":[{"name":"beauallison","email":"beau.developer@outlook.com"},{"name":"chiaratrussle","email":"chiara@trussle.com"},{"name":"codesplicer","email":"github@vikbhatti.com"},{"name":"daniele.rapati.trussle","email":"daniele.rapati@trussle.com"},{"name":"daningrey","email":"daniel@trussle.com"},{"name":"dillantrussle","email":"dillan.pisavadia@trussle.com"},{"name":"jamietrussle","email":"jamie.thirlwell@trussle.com"},{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},{"name":"jonnywildey","email":"jonnywildey@gmail.com"},{"name":"renovate","email":"renovate@keylocation.sg"},{"name":"soutar","email":"john@soutar.me"},{"name":"trussle-admin","email":"team@trussle.com"},{"name":"vickyy","email":"vicky.lee@trussle.com"}],"bin":{"t-ci":"bin/t-ci"},"dist":{"shasum":"522d1909e3d53026b202622e9e28ce5d587f2083","tarball":"https://registry.npmjs.org/@trussle/ci/-/ci-1.0.1.tgz","fileCount":8,"integrity":"sha512-IDy6lbyDqRP6KAFV2fHIG56VJWMVQXooFNQGqES3eruX9W4uKqGOTUMfl9cdVUzkyykGTUGryiyeNrF5zaJhHw==","signatures":[{"sig":"MEUCIF227n9tdGck8zYDcZ2UFrPOgbcsoSnnmaitmuUPGK4dAiEA+1YJh3n26uSeHzfutUHWtcURtJ+M+TVVdKZ9+U8YFMc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNODxCRA9TVsSAnZWagAAexkP/3bTAHgRSKL5zpUKeI5l\n8aFSM2kkMk2dGOIRcx0veJUiX5DCmBdZu5RGyckRY2CgvSNNrzkKxLHBD27l\nCzsmedn1+vEiv9oRUXO7lc+SRuulLN/hoH7HGB8MeYatIuX8EJFJNPFfnlV2\nzF8v43t4e72W44u2bqmUpOeZxUMcWGf6dRKjOfeL2R7v2rD5LBTVi+Qvqett\nhQYDnMi4C/xtR3loTMYyKKFhHTHCoZBNWvguR7cOm0dWAD2JWZG3tSvGuQni\nFE8z5qTFnOMtZ6CHMtBsq3ZyuB8fOApb8A3wVmbCIB20DOiXllUUZ4D4CTW1\n7pdgWrDZSYnS/szlMQgMoptCB9GYKvZCS1lFqYLEtSfcbV4ns6u49cyNHr1x\njkJF/JfxzOXqKwT+R+bEvmRjHSCF2gI4i4sOeqQ21Bnakd79GWnOfJ/VWA70\nUX1+azXNNqCkdzI2RF9tGUnZAU8dg5jycHN8TsGNHwfWKI2gZEmgpA5x5W0+\nPKRjpgtF5IA9ge292bry0bACA9RN+gCsgz8yDIjQFWW5XGKsvRv/Mz8dzOnV\nhM+FkVVbl6PA9CeVU4kqbzIn8SKesEhrkpELN33KtoexBsBa6V5HFKeQLUBS\nTTx8X24D279KDI8MAWcEhqoLB02wXq5wQ8kg5bdXvx5jRxsb8MIV8PczOepZ\nxhHt\r\n=Y6u5\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},"_npmVersion":"6.5.0","description":"Continuous Integration scripts","directories":{},"_nodeVersion":"11.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ci_1.0.1_1546969328488_0.753851349555176","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@trussle/ci","version":"1.0.2","author":{"name":"Team Trussle"},"_id":"@trussle/ci@1.0.2","maintainers":[{"name":"beauallison","email":"beau.developer@outlook.com"},{"name":"chiaratrussle","email":"chiara@trussle.com"},{"name":"codesplicer","email":"github@vikbhatti.com"},{"name":"daniele.rapati.trussle","email":"daniele.rapati@trussle.com"},{"name":"daningrey","email":"daniel@trussle.com"},{"name":"dillantrussle","email":"dillan.pisavadia@trussle.com"},{"name":"jamietrussle","email":"jamie.thirlwell@trussle.com"},{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},{"name":"jonnywildey","email":"jonnywildey@gmail.com"},{"name":"renovate","email":"renovate@keylocation.sg"},{"name":"soutar","email":"john@soutar.me"},{"name":"staffe","email":"staffanedstrom@gmail.com"},{"name":"trussle-admin","email":"team@trussle.com"},{"name":"vickyy","email":"vicky.lee@trussle.com"}],"bin":{"t-ci":"bin/t-ci"},"dist":{"shasum":"03415d9b6b33a5a76040974bfec90ab8f8278ceb","tarball":"https://registry.npmjs.org/@trussle/ci/-/ci-1.0.2.tgz","fileCount":8,"integrity":"sha512-rqzN71E92Lp9vK2mLswk4Q/NHj2YBsTE3M0ZYsnhhQyPfH7yGzHwvTwvXb9KpfF3wMDFpTz8E1eWD8Y3uPRsdg==","signatures":[{"sig":"MEYCIQCb25s2tW7s+rn1RXY5Eh2nw3uL+M1bKEIqhAgkNu7DvwIhAMyZS7M04trxL1nMQu5wuCcNDr3EjRcmoeARoMHPBt7Z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5209,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcN2kyCRA9TVsSAnZWagAAUUUQAJ7HLEJ9PPkcfZukaSeU\nZRWMp3vteSu5OxFv3WZUyvlIIU3J4hOUxD/GcXvAiasMCxZWS8C/4Ps2bhz7\no36MlhKJdziPYRUGr22d7dvPeybmchZ9hxzsBIVZ5vxwhYPftbiUbMZNb0nL\nE7QLk0rPnwqQHEEwikiX31hFKgR4Un6sNNeeykIA+mCoc8MCBB6c4U5MF8NC\nA2tXFJD2Tz+zzW02v6sammitVyAe+C7O2bFpU6u1WSnGqp19NyI9hQkqgPuT\nnIfa8jBqNasifIO5wVfR4TO70E3rWSuSNdQplrFntKoI4gtqP1EbcmdinhyI\nQh2PAjeiyI9kEbELkJpphzzLCvvw607NjwKxyg5N6NldAP2s0gWPCs3r9IY+\nObE5gssZVhDLLQxSxTus0WyEIQnzKm8syHTq/tVFnE8T6IRx/M3ISMqS5OPK\nm+JLnDyZ8o1G1GrwGeDsCOxAG1ZlzLjlKmkJ0taYkiPPB0Am7ccyCYbCXKGQ\nDGSaTv+sYNKGTLlJypvYjoVVwPJj7JfDmBZ51vJAnUaOV5pgKoLhXCTqDGbV\nFVAhtYSvmJN4CmxTrhCJeagu7bftGeB+6gVEFWWjrhmcV7/DeckiF2nhrN6R\nA+tqQ89f8tDjULXuft194hcwg3wNg3zG2JlWwSbsqoTYBSfpdexMgS9PTZrw\nzOi7\r\n=Fvi4\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},"_npmVersion":"6.5.0","description":"Continuous Integration scripts","directories":{},"_nodeVersion":"11.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ci_1.0.2_1547135281947_0.43909516433972895","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@trussle/ci","version":"1.0.3","author":{"name":"Team Trussle"},"_id":"@trussle/ci@1.0.3","maintainers":[{"name":"beauallison","email":"beau.developer@outlook.com"},{"name":"chiaratrussle","email":"chiara@trussle.com"},{"name":"codesplicer","email":"github@vikbhatti.com"},{"name":"daniele.rapati.trussle","email":"daniele.rapati@trussle.com"},{"name":"daningrey","email":"daniel@trussle.com"},{"name":"dillantrussle","email":"dillan.pisavadia@trussle.com"},{"name":"jamietrussle","email":"jamie.thirlwell@trussle.com"},{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},{"name":"jonnywildey","email":"jonnywildey@gmail.com"},{"name":"renovate","email":"renovate@keylocation.sg"},{"name":"soutar","email":"john@soutar.me"},{"name":"staffe","email":"staffanedstrom@gmail.com"},{"name":"trussle-admin","email":"team@trussle.com"},{"name":"vickyy","email":"vicky.lee@trussle.com"}],"bin":{"t-ci":"bin/t-ci"},"dist":{"shasum":"16025ed380783922d1fae3e3615802af5c5ff054","tarball":"https://registry.npmjs.org/@trussle/ci/-/ci-1.0.3.tgz","fileCount":4,"integrity":"sha512-k7iAJDhLa/SXxjFpFAeBjyL+VC+zmBUaUWKhF+bY/PxRgL/UCqfo4nJWiHpTNSuadzIr+e1wfdwPNOlF8dyf7Q==","signatures":[{"sig":"MEYCIQDL4WMg+u6E84Qpc5Jqb/Awo+aENR4mW/bT5BPFkpgHtQIhAMKkrPzxBcUroIxvR4T+WKGLv1dt6vYxPpb2+pIfqCnt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6793,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2e8MCRA9TVsSAnZWagAAjKgQAIUnPecALnkGphaHeeLB\n6Qr8hXhZgEUiS47QYxJ81o7OtaJYJZkxbMVh1mlSx8rupoHfYmCneEjJDRwy\ngWLc3wv2nDtYmruHraJt0QoHXMsaxU4wvX7ff92YqbXCWcXIDonge0coRfSD\nhBxd+XoHARWvjWPFUXVJ9U3qF+nNI7+9+3iz6Dz/HsuWcxRDyf+YiIC+pY6Y\nU7D7Ulu0fpuWg87NoTsZatSZjEJA0u/MS+/zBUUAtTw5A9BdVOYLbhHDBTzs\nzyyaGAI/w4+DrfdhempTu63iL/aZb4oKcWV4LAo7UR6EyWrQ4Ob7beU6GIum\nxBbSRk/W01rjuOMTatcSkl7/Fvlr33JjRgIbDuFYQah1277nI71HBpNXQVXF\neKN0RQw/E/LfKJKyNZ0KZv+RkZPjm35NLDkm8z7BfdNnfF7dLgGtEOU1OsBw\nU73Bmhwh+SxEwn+l3DUivl8OQLi8ne9HLuVoWdMbRTHk7iGtCuuWOOQ8QmEv\nOCB1PuuluS7r1nYQvOjokzS0o01X00O1WHwkj96gTLHqWlqjTDk8ofnYssou\nah2RDUzNwJJb8JaT1YikHiNfzSBT6X4TEirRWyEEydfj2Gw5Z07EMqY6UL0U\nzB1WeU+LyPnWjfVSJ7VYfhSHhRiF5487oOkxXA3X+AFE9PW4ZNxKPuFlqBJp\nzuLX\r\n=WOeH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"jonnyarnold","email":"jonny.arnold89@gmail.com"},"_npmVersion":"6.7.0","description":"Continuous Integration scripts","directories":{},"_nodeVersion":"11.3.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ci_1.0.3_1549458049225_0.17855559423012202","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-01-08T14:32:20.050Z","modified":"2026-08-19T10:41:47.874Z","1.0.0":"2019-01-08T14:32:20.150Z","1.0.1":"2019-01-08T17:42:08.600Z","1.0.2":"2019-01-10T15:48:02.038Z","1.0.3":"2019-02-06T13:00:49.341Z"},"author":{"name":"Team Trussle"},"description":"Continuous Integration scripts","maintainers":[{"email":"engineering@trussle.com","name":"trussle-admin"}],"readme":"# Trussle CI\n\nThis package provides a suite of scripts used by Trussle's Continuous\nIntegration system to build Docker images for testing and deployment.\n\n## Usage\n\n### Installation\n\nInstall this package as a devDependency:\n\n```sh\nnpm install --save-dev @trussle/ci\n```\n\n### Dockerfile\n\nNext, set up your Dockerfile with the following constraints:\n\n- There should be a `builder` stage, which creates an image ready to build and\n  test in the `/builder` directory. The `ENTRYPOINT` should run all _unit_ tests\n  (with coverage) and provide results in JUnit format to the directory\n  `/builder/test-results`.\n- The final stage of the Dockerfile should create a runner image continaing only\n  the files required to run the application. The `ENTRYPOINT` should run the\n  application.\n- The host machine's NPM token will be injected into the image as the argument\n  `NPM_TOKEN`, so you'll likely need the following lines at the top of your\n  Dockerfile:\n\n```docker\n# Embed the NPM_TOKEN (passed in from the host machine) into the image.\nARG NPM_TOKEN\nRUN echo -n ${NPM_TOKEN} > /root/.npmrc\n```\n\nSamples of Dockerfiles can be found in the [templates](../../templates).\n\n### Docker Compose\n\nIf you have integration tests (tests that require an external dependency to be\nrunning), you should include a Docker Compose file that looks like this:\n\n```yml\nversion: \"2.1\"\n\nservices:\n  integration:\n    image: \"878732450721.dkr.ecr.eu-west-1.amazonaws.com/[package-name]-builder:latest\"\n    # depends_on:\n    #   - service1\n    #   - service2\n    entrypoint: npm run test:integration\n    environment:\n      - NODE_ENV=CI\n  # Your other services go here!\n```\n\n### Running\n\nYou can now run:\n\n- `npx t-ci builder` to make the build/test image.\n- `npx t-ci test-unit` runs unit tests in the builder.\n- `npx t-ci test-integration` sets up the Docker Compose environment and runs\n  the integration tests.\n- `npx t-ci runner` to make the runner image.\n\nThese commands can be used to make your Jenkinsfile super short:\n\n```groovy\npipeline {\n  agent any\n  stages {\n    stage(\"Setup\") { steps { sh \"npx t-ci builder\" } }\n    stage(\"Tests\") {\n      parallel {\n        stage(\"Unit Tests\") { steps { sh \"npx t-ci test-unit\" } }\n        stage(\"Integration Tests\") { steps { sh \"npx t-ci test-integration\" } }\n      }\n    }\n    stage(\"Build\") { steps { sh \"npx t-ci runner\" } }\n  }\n  post {\n    always {\n      junit \"test-results/**/*.xml\"\n      sh \"aws s3 sync test-results/ s3://qa-junit-test-reports/${env.JOB_NAME}/${env.BUILD_NUMBER}/test-results\"\n      cleanWs(\n        cleanWhenAborted: true,\n        cleanWhenFailure: true,\n        cleanWhenNotBuilt: true,\n        cleanWhenSuccess: true,\n        cleanWhenUnstable: true,\n        cleanupMatrixParent: true,\n        deleteDirs: true\n      )\n    }\n  }\n}\n```\n","readmeFilename":"README.md"}