Commit 90c4ecdd authored by Thomas Boni's avatar Thomas Boni
Browse files

Merge branch '43-update-docker-job-to-use-up-to-date-ci-env-values' into 'latest'

Resolve "Update trivy job"

Closes #43

See merge request go2scale/hub!16
parents 7f157305 55a8c4b2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -73,5 +73,7 @@ directly in pipeline `Test` tab and in merge request widget

## Version

* **Latest** (current -> `2020-08-05_1`) : `https://jobs.go2scale.io/latest/trivy_image.yml`
* **Latest** (current -> `2020-09-16_1`) : `https://jobs.go2scale.io/latest/trivy_image.yml`
* **Tag `2020-09-16_1`** : `https://jobs.go2scale.io/2020-09-16_1/trivy_image.yml`
  * Use Gitlab runner default variable to login to the Docker registry
* **Tag `2020-08-05_1`** (initial version) : `https://jobs.go2scale.io/2020-08-05_1/trivy_image.yml`
+2 −3
Original line number Diff line number Diff line
@@ -40,13 +40,12 @@ trivy:


  before_script:
    - apk add --no-cache curl
    - wget https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
    - tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
    - curl -sSL -o $TEMPLATE_NAME https://github.com/aquasecurity/trivy/raw/v${TRIVY_VERSION}/contrib/junit.tpl
    - wget -O $TEMPLATE_NAME https://github.com/aquasecurity/trivy/raw/v${TRIVY_VERSION}/contrib/junit.tpl

    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
  script:
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
    - ./trivy --template "@$TEMPLATE_NAME" -o $TRIVY_OUTPUT $IMAGE

  cache: