Loading .gitignoredeleted 100644 → 0 +0 −0 Empty file deleted. .gitlab-ci.yml +6 −53 Original line number Diff line number Diff line image: docker:stable include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' stages: - pre-package - package - test-package docker-build-development: stage: package variables: DOCKER_DRIVER: overlay2 services: - docker:dind only: - branches except: - master script: - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-latest . - docker push ${CI_REGISTRY_IMAGE} docker-build-stable: stage: package variables: DOCKER_DRIVER: overlay2 services: - docker:dind only: - master script: - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} -t ${CI_REGISTRY_IMAGE}:latest . - docker push ${CI_REGISTRY_IMAGE} container-scanning: stage: test-package variables: DOCKER_DRIVER: overlay2 allow_failure: true services: - docker:stable-dind only: - branches script: - docker run -d --name db arminc/clair-db:latest - docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1 - apk add -U wget ca-certificates - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker pull ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} - wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 - mv clair-scanner_linux_amd64 clair-scanner - chmod +x clair-scanner - touch clair-whitelist.yml - ./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-sast-container-report.json -l clair.log -w clair-whitelist.yml ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} || true artifacts: paths: [gl-sast-container-report.json] - post-package LICENSE 0 → 100644 +21 −0 Original line number Diff line number Diff line MIT License Copyright (c) 2020 REDMIC Project / Docker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. config/settings.xml +8 −8 Original line number Diff line number Diff line Loading @@ -3,22 +3,22 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <servers> <server> <username>${env.MAVEN_REPO_USER}</username> <password>${env.MAVEN_REPO_PASS}</password> <id>central</id> <username>${env.MAVEN_RELEASE_USER}</username> <password>${env.MAVEN_RELEASE_PASS}</password> <id>release</id> </server> <server> <username>${env.MAVEN_REPO_USER}</username> <password>${env.MAVEN_REPO_PASS}</password> <id>snapshots</id> <username>${env.MAVEN_SNAPSHOT_USER}</username> <password>${env.MAVEN_SNAPSHOT_PASS}</password> <id>snapshot</id> </server> </servers> <profiles> <profile> <id>artifactory</id> <properties> <altSnapshotDeploymentRepository>snapshots::default::https://artifactory.redmic.net/artifactory/libs-snapshot-local</altSnapshotDeploymentRepository> <altReleaseDeploymentRepository>central::default::https://artifactory.redmic.net/artifactory/libs-release-local</altReleaseDeploymentRepository> <altReleaseDeploymentRepository>release::default::${env.MAVEN_RELEASE_URL}</altReleaseDeploymentRepository> <altSnapshotDeploymentRepository>snapshot::default::${env.MAVEN_SNAPSHOT_URL}</altSnapshotDeploymentRepository> </properties> </profile> </profiles> Loading Loading
.gitlab-ci.yml +6 −53 Original line number Diff line number Diff line image: docker:stable include: - project: 'redmic-project/gitlab-ci-templates' ref: master file: '/packaging.yml' stages: - pre-package - package - test-package docker-build-development: stage: package variables: DOCKER_DRIVER: overlay2 services: - docker:dind only: - branches except: - master script: - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_REF_NAME}-latest . - docker push ${CI_REGISTRY_IMAGE} docker-build-stable: stage: package variables: DOCKER_DRIVER: overlay2 services: - docker:dind only: - master script: - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker build -t ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} -t ${CI_REGISTRY_IMAGE}:latest . - docker push ${CI_REGISTRY_IMAGE} container-scanning: stage: test-package variables: DOCKER_DRIVER: overlay2 allow_failure: true services: - docker:stable-dind only: - branches script: - docker run -d --name db arminc/clair-db:latest - docker run -p 6060:6060 --link db:postgres -d --name clair arminc/clair-local-scan:v2.0.1 - apk add -U wget ca-certificates - docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY} - docker pull ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} - wget https://github.com/arminc/clair-scanner/releases/download/v8/clair-scanner_linux_amd64 - mv clair-scanner_linux_amd64 clair-scanner - chmod +x clair-scanner - touch clair-whitelist.yml - ./clair-scanner -c http://docker:6060 --ip $(hostname -i) -r gl-sast-container-report.json -l clair.log -w clair-whitelist.yml ${CI_REGISTRY_IMAGE}:${CI_COMMIT_SHA} || true artifacts: paths: [gl-sast-container-report.json] - post-package
LICENSE 0 → 100644 +21 −0 Original line number Diff line number Diff line MIT License Copyright (c) 2020 REDMIC Project / Docker Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
config/settings.xml +8 −8 Original line number Diff line number Diff line Loading @@ -3,22 +3,22 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <servers> <server> <username>${env.MAVEN_REPO_USER}</username> <password>${env.MAVEN_REPO_PASS}</password> <id>central</id> <username>${env.MAVEN_RELEASE_USER}</username> <password>${env.MAVEN_RELEASE_PASS}</password> <id>release</id> </server> <server> <username>${env.MAVEN_REPO_USER}</username> <password>${env.MAVEN_REPO_PASS}</password> <id>snapshots</id> <username>${env.MAVEN_SNAPSHOT_USER}</username> <password>${env.MAVEN_SNAPSHOT_PASS}</password> <id>snapshot</id> </server> </servers> <profiles> <profile> <id>artifactory</id> <properties> <altSnapshotDeploymentRepository>snapshots::default::https://artifactory.redmic.net/artifactory/libs-snapshot-local</altSnapshotDeploymentRepository> <altReleaseDeploymentRepository>central::default::https://artifactory.redmic.net/artifactory/libs-release-local</altReleaseDeploymentRepository> <altReleaseDeploymentRepository>release::default::${env.MAVEN_RELEASE_URL}</altReleaseDeploymentRepository> <altSnapshotDeploymentRepository>snapshot::default::${env.MAVEN_SNAPSHOT_URL}</altSnapshotDeploymentRepository> </properties> </profile> </profiles> Loading