Skip to content
Snippets Groups Projects
Commit c764c93c authored by Alan Nelson's avatar Alan Nelson
Browse files

Merge branch 'develop' into 'master'

Merge Develop into Master

Closes #5

See merge request !15
parents 9700d9bf 7752d46c
No related branches found
No related tags found
2 merge requests!20Update php unit test,!15Merge Develop into Master
Showing with 368 additions and 59 deletions
# Vagrant
.vagrant/
Vagrantfile
\ No newline at end of file
...@@ -2,6 +2,7 @@ stages: ...@@ -2,6 +2,7 @@ stages:
- verify - verify
- build - build
- test - test
- publish
- security - security
Check Makefile: Check Makefile:
...@@ -31,9 +32,18 @@ test: ...@@ -31,9 +32,18 @@ test:
tags: tags:
- dockerd - dockerd
script: script:
- docker run --rm unl-its/static-code-analysis sonar-scanner -v - docker run --rm its-registry.unl.edu/unl-its/docker-ci/static-code-analysis sonar-scanner -v
Scan with Tenable: Push to Container Registry:
after_script:
- rm -f /var/lib/gitlab-runner/.docker/config.json
stage: publish
tags:
- linux, dockerd
script:
- make publish
.Scan with Tenable:
stage: security stage: security
tags: tags:
- linux, dockerd - linux, dockerd
......
...@@ -2,14 +2,13 @@ ...@@ -2,14 +2,13 @@
# Build File for Docker Images # # Build File for Docker Images #
###################################### ######################################
# All Dockerfiles # Repo
#################### ####################
DOCKERFILES := $(shell find ./ -name "Dockerfile") REPO_ORG = its-registry.unl.edu/unl-its/docker-ci
# List of images to clean # All Dockerfiles
#################### ####################
#IMAGES_TO_CLEAN := $(shell echo $(shell echo $(shell grep -h LABEL $(DOCKERFILES)) | sed -e 's/LABEL name=//g') | tr [:space:] ' \n' | sort -u) DOCKERFILES := $(shell find ./ -name "Dockerfile")
IMAGES_TO_CLEAN := $(addprefix unl-its/, $(shell find ./ -maxdepth 1 -type d -not -name ".*" -printf '%f\n'))
# Get the latest commit # Get the latest commit
#################### ####################
...@@ -19,49 +18,78 @@ GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD)) ...@@ -19,49 +18,78 @@ GIT_COMMIT = $(strip $(shell git rev-parse --short HEAD))
#################### ####################
BUILD_ARGS := --build-arg VCS_REF=$(GIT_COMMIT) BUILD_ARGS := --build-arg VCS_REF=$(GIT_COMMIT)
.PHONY: all clean test $(DOCKERFILES) clean_images $(IMAGES_TO_CLEAN) static-code-analysis delete_dangling_images security .PHONY: all clean test $(DOCKERFILES) static-code-analysis mobile delete_dangling_images security publish
all: \ all: php-lint php-unit-test magento2 mobile static-code-analysis
php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_latest \
magento2-unit-test magento2-xml-lint \
static-code-analysis
# PHP Images # Image Groups
####################
php-lint: php-lint_5.6 php-lint_7.0 php-lint_7.1 php-lint_7.2 php-lint_latest
php-unit-test: php-unit-test_5.6 php-unit-test_7.0 php-unit-test_7.1 php-unit-test_7.2 php-unit-test_latest
magento2: magento2-unit-test magento2-xml-lint
mobile: android-build-server
static-code-analysis: static-code-analysis_latest static-code-analysys_php static-code-analysys_python static-code-analysys_android
# PHP Lint Images
#################### ####################
php-lint_5.6: php-lint/5.6/Dockerfile php-lint_5.6: php-lint/5.6/Dockerfile
docker build -t unl-its/php-lint:5.6 -f php-lint/5.6/Dockerfile php-lint docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:5.6 -f php-lint/5.6/Dockerfile php-lint
php-lint_7.0: php-lint/7.0/Dockerfile php-lint_7.0: php-lint/7.0/Dockerfile
docker build -t unl-its/php-lint:7.0 -f php-lint/7.0/Dockerfile php-lint docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:7.0 -f php-lint/7.0/Dockerfile php-lint
php-lint_7.1: php-lint/7.1/Dockerfile php-lint_7.1: php-lint/7.1/Dockerfile
docker build -t unl-its/php-lint:7.1 -f php-lint/7.1/Dockerfile php-lint docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:7.1 -f php-lint/7.1/Dockerfile php-lint
php-lint_7.2: php-lint/7.2/Dockerfile php-lint_7.2: php-lint/7.2/Dockerfile
docker build -t unl-its/php-lint:7.2 -f php-lint/7.2/Dockerfile php-lint docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-lint:7.2 -f php-lint/7.2/Dockerfile php-lint
php-lint_latest: php-lint_7.2 php-lint_latest: php-lint_7.2
docker tag unl-its/php-lint:7.2 unl-its/php-lint:latest docker tag ${REPO_ORG}/php-lint:7.2 ${REPO_ORG}/php-lint:latest
# PHP Unit Test Images
####################
php-unit-test_5.6: php-unit-test/5.6/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:5.6 -f php-unit-test/5.6/Dockerfile php-unit-test
php-unit-test_7.0: php-unit-test/7.0/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:7.0 -f php-unit-test/7.0/Dockerfile php-unit-test
php-unit-test_7.1: php-unit-test/7.1/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:7.1 -f php-unit-test/7.1/Dockerfile php-unit-test
php-unit-test_7.2: php-unit-test/7.2/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/php-unit-test:7.2 -f php-unit-test/7.2/Dockerfile php-unit-test
php-unit-test_latest: php-unit-test_7.2
docker tag ${REPO_ORG}/php-unit-test:7.2 ${REPO_ORG}/php-unit-test:latest
# Application Images # Application Images
#################### ####################
magento2-unit-test: magento2-unit-test/latest/Dockerfile magento2-unit-test: magento2-unit-test/latest/Dockerfile
docker build -t unl-its/magento2-unit-test:latest magento2-unit-test/latest docker build $(BUILD_ARGS) -t ${REPO_ORG}/magento2-unit-test:latest magento2-unit-test/latest
magento2-xml-lint: magento2-unit-test magento2-xml-lint/latest/Dockerfile magento2-xml-lint: magento2-unit-test magento2-xml-lint/latest/Dockerfile
docker build -t unl-its/magento2-xml-lint:latest magento2-xml-lint/latest docker build $(BUILD_ARGS) -t ${REPO_ORG}/magento2-xml-lint:latest magento2-xml-lint/latest
# Mobile Applications
####################
android-build-server: android-build-server/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/android-build-server:latest android-build-server
# Sonarqube static-code-analysis # Sonarqube static-code-analysis
# ##################### # #####################
static-code-analysis: static-code-analysis_latest: static-code-analysis/Dockerfile
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:latest static-code-analysis/ docker build $(BUILD_ARGS) -t ${REPO_ORG}/static-code-analysis:latest static-code-analysis/
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:php static-code-analysis/
docker build $(BUILD_ARGS) -t unl-its/static-code-analysis:python static-code-analysis/
# Cleanup static-code-analysys_php: static-code-analysis/Dockerfile
#################### docker build $(BUILD_ARGS) -t ${REPO_ORG}/static-code-analysis:php static-code-analysis/
clean: clean_images
static-code-analysys_python: static-code-analysis/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/static-code-analysis:python static-code-analysis/
static-code-analysys_android: android-build-server static-code-analysis/android/Dockerfile
docker build $(BUILD_ARGS) -t ${REPO_ORG}/static-code-analysis:android static-code-analysis/android/
test: $(DOCKERFILES) test: $(DOCKERFILES)
$(DOCKERFILES): $(DOCKERFILES):
...@@ -69,17 +97,19 @@ $(DOCKERFILES): ...@@ -69,17 +97,19 @@ $(DOCKERFILES):
@docker run --rm -i nimmis/label-inspector lint < $(@D)/Dockerfile @docker run --rm -i nimmis/label-inspector lint < $(@D)/Dockerfile
@docker run --rm -i nimmis/label-inspector validate < $(@D)/Dockerfile @docker run --rm -i nimmis/label-inspector validate < $(@D)/Dockerfile
clean_images: $(IMAGES_TO_CLEAN) delete_dangling_images #IMAGES_TO_SCAN = $(shell docker images --format '{{.Repository}}:{{.Tag}}' | grep unl-its )
$(IMAGES_TO_CLEAN): #security:
@echo "Uninstalling $@" # @docker login -u ${TENABLE_IO_ACCESS_KEY} -p ${TENABLE_IO_SECRET_KEY} registry.cloud.tenable.com
@docker rmi $(shell docker images --format '{{.Repository}}:{{.Tag}}' --filter reference=$@) # @for image in $(IMAGES_TO_SCAN); do \
# docker tag $$image registry.cloud.tenable.com/`echo $$image | cut -d "/" -f 2`; \
IMAGES_TO_SCAN = $(shell docker images --format '{{.Repository}}:{{.Tag}}' | grep unl-its ) # docker push registry.cloud.tenable.com/`echo $$image | cut -d "/" -f 2`; \
security: # done
@docker login -u ${TENABLE_IO_ACCESS_KEY} -p ${TENABLE_IO_SECRET_KEY} registry.cloud.tenable.com
@for image in $(IMAGES_TO_SCAN); do \ IMAGES_TO_PUBLISH = $(shell docker images --format '{{.Repository}}:{{.Tag}}' --filter 'dangling=false' | grep $(REPO_ORG) | grep -v ':<none>$$' )
docker tag $$image registry.cloud.tenable.com/`echo $$image | cut -d "/" -f 2`; \ publish:
docker push registry.cloud.tenable.com/`echo $$image | cut -d "/" -f 2`; \ @docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
@for image in $(IMAGES_TO_PUBLISH); do \
docker push $$image; \
done done
delete_dangling_images: delete_dangling_images:
...@@ -88,10 +118,10 @@ delete_dangling_images: ...@@ -88,10 +118,10 @@ delete_dangling_images:
help: help:
@echo -e "make [all] \n\t # Creates all the images" @echo -e "make [all] \n\t # Creates all the images"
@echo -e "make <TARGET> \n\t # Creates an specific image" @echo -e "make <TARGET> \n\t # Creates an specific image"
@echo -e "make clean \n\t # Cleanup" @echo -e "make publish \n\t # Push the images to the UNL registry"
@echo -e "make security \n\t # Send the images to Tenable. Use env variables TENABLE_IO_ACCESS_KEY and TENABLE_IO_SECRET_KEY" # @echo -e "make security \n\t # Send the images to Tenable. Use env variables TENABLE_IO_ACCESS_KEY and TENABLE_IO_SECRET_KEY"
debug: debug:
@echo -e "DOCKERFILES: \t $(DOCKERFILES)" @echo -e "DOCKERFILES: \t $(DOCKERFILES)"
@echo -e "IMAGES_TO_CLEAN:\t $(IMAGES_TO_CLEAN)" # @echo -e "IMAGES_TO_SCAN:\t $(IMAGES_TO_SCAN)"
@echo -e "IMAGES_TO_SCAN:\t $(IMAGES_TO_SCAN)" @echo -e "IMAGES_TO_PUBLISH:\t $(IMAGES_TO_PUBLISH)"
# docker-ci [![pipeline status](https://git.unl.edu/unl-its/docker-ci/badges/develop/pipeline.svg)](https://git.unl.edu/unl-its/docker-ci/commits/develop)
# Docker-ci
Containers used on CI Containers used on CI
## Building Images ## Building Images
......
vm_name = "docker-ci"
Vagrant.configure(2) do |config|
# --- UNL Linux VM configuration -------------------------
config.vm.box = "centos/7"
config.vm.hostname = vm_name
config.vm.box_check_update = true
config.vbguest.auto_update = false
config.vm.network "private_network", ip: "192.168.100.101"
config.vm.synced_folder ".", "/vagrant", type: "nfs", mount_options: ['vers=3', :udp, :nolock, :noatime, :rw]
# virtualbox VM settings
config.vm.provider "virtualbox" do |vb|
vb.linked_clone = true
vb.name = vm_name
vb.memory = "512"
vb.cpus = "1"
end
# --------------------------------------------------------------------
# --- Inline provisioning ----------------------------------
config.vm.provision "shell", inline: <<-SHELL
yum update -y
sudo yum install -y make docker git
systemctl enable docker
systemctl start docker
chmod o+rw /var/run/docker.sock
SHELL
# --------------------------------------------------------------------
end
FROM adoptopenjdk/openjdk8:alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Build Server for Android Projects" \
org.label-schema.description="Docker image for building Android projects" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
ENV ANDROID_SDK_VERSION 4333796
ENV ANDROID_HOME /opt/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools
WORKDIR /opt
RUN apk add --no-cache curl bash unzip libstdc++ su-exec
RUN mkdir -p /opt/android-sdk-linux \
&& curl -q -o android-sdk-tools.zip -L https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip \
&& unzip -q android-sdk-tools.zip -d ${ANDROID_HOME} \
&& rm -f android-sdk-tools.zip \
&& yes | sdkmanager --licenses
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD "/bin/bash"
\ No newline at end of file
#!/bin/bash
# Add local user
# Either use the LOCAL_USER_ID if passed in at runtime or
# fallback
USER_ID=${LOCAL_USER_ID:-9001}
su-exec user "$@"
# Android example of .gitlab-ci.yml
## Standard Android app with SonarQube analysis
- One 'Analysis' stage with one job.
- The job SonarQube is executed only in the branch `develop`.
``` yml
stages:
- Analysis
variables:
GRADLE_USER_HOME: ${CI_PROJECT_DIR}/gradle_home
before_script:
- ./gradlew dependencies
- for d in /opt/android-sdk-linux/build-tools/*; do PATH="$PATH:$d"; done
SonarQube:
stage: Analysis
image: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:android
tags:
- docker
only:
- develop
cache:
paths:
- gradle_home
script:
- ./gradlew sonarqube -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.login=$SONAR_TOKEN
```
# PHP examples of .gitlab-ci.yml
## Standard PHP app with lint and SonarQube analysis
- One 'test' stage with two jobs.
- The jobs needs a runner with docker-host capabilities.
- The job SonarQube is executed only in the branch `develop`.
``` yml
# To use this script, you must have the following variables defined
# You can define them at the project or the group level
#
# SONAR_URL: Full URL to the SonarQube server
# SONAR_TOKEN: API token for SonarQube
variables:
GITLAB_CI: 1
stages:
- test
PHP Lint:
stage: test
image: its-registry.unl.edu/unl-its/docker-ci/php-lint:7.0
tags:
- docker
script:
- php-lint -d ./
SonarQube:
stage: test
image: its-registry.unl.edu/unl-its/docker-ci/static-code-analysis:php
tags:
- docker
only:
- develop
script:
- sonar-scanner -Dsonar.host.url=$SONAR_URL -Dsonar.projectKey=$CI_PROJECT_PATH_SLUG -Dsonar.sources=. -Dsonar.login=$SONAR_TOKEN
```
FROM unl-its/magento2-unit-test:latest FROM its-registry.unl.edu/unl-its/docker-ci/magento2-unit-test:latest
ARG BUILD_DATE ARG BUILD_DATE
ARG VCS_REF ARG VCS_REF
...@@ -9,7 +9,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ ...@@ -9,7 +9,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.vcs-ref=$VCS_REF \ org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \ org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version=$VERSION \ org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.1" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>" maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
# Scripts # Scripts
......
...@@ -17,7 +17,11 @@ def get_mappings(misc_file, base_dir): ...@@ -17,7 +17,11 @@ def get_mappings(misc_file, base_dir):
return mapping return mapping
def get_xml_files(search_dir): def get_xml_files(search_dir):
try:
return check_output(['find', search_dir, '-name', '*.xml']).splitlines() return check_output(['find', search_dir, '-name', '*.xml']).splitlines()
except CalledProcessError:
print("WARNING: No XML files found")
return []
def lint_only(file): def lint_only(file):
try: try:
...@@ -42,20 +46,20 @@ def search_file_for_xsd(file): ...@@ -42,20 +46,20 @@ def search_file_for_xsd(file):
return None return None
def validate_file(file, mapping): def validate_file(file, mapping):
print "validating file {}".format(file) print("validating file {}".format(file))
xsd = search_file_for_xsd(file) xsd = search_file_for_xsd(file)
if xsd is not None: if xsd is not None:
if xsd in mapping: if xsd in mapping:
lint_with_xsd(file, mapping[xsd]) lint_with_xsd(file, mapping[xsd])
else: else:
print 'WARNING: Unable to map XSD to path: {}'.format(xsd) print('WARNING: Unable to map XSD to path: {}'.format(xsd))
else: else:
print 'WARNING: Unable to find XSD for file: {}'.format(file) print('WARNING: Unable to find XSD for file: {}'.format(file))
lint_only(file) lint_only(file)
def main(): def main():
if len(sys.argv) < 4: if len(sys.argv) < 4:
print "Usage: xml-lint <misc.xml> <app_base_dir> <search_dir>" print("Usage: xml-lint <misc.xml> <app_base_dir> <search_dir>")
exit(1) exit(1)
misc_file = sys.argv[1] misc_file = sys.argv[1]
...@@ -63,19 +67,19 @@ def main(): ...@@ -63,19 +67,19 @@ def main():
search_dir = os.path.abspath(sys.argv[3]) search_dir = os.path.abspath(sys.argv[3])
if not os.path.isfile(misc_file): if not os.path.isfile(misc_file):
print "{} is not a file".format(misc_file) print("{} is not a file".format(misc_file))
exit(1) exit(1)
mapping = get_mappings(misc_file, base_dir) mapping = get_mappings(misc_file, base_dir)
print "loaded {} XSD mapping(s)".format(len(mapping)) print("loaded {} XSD mapping(s)".format(len(mapping)))
xml_files = get_xml_files(search_dir) xml_files = get_xml_files(search_dir)
print "found {} XML file(s)".format(len(xml_files)) print("found {} XML file(s)".format(len(xml_files)))
print "" print("")
for file in xml_files: for file in xml_files:
validate_file(file, mapping) validate_file(file, mapping)
print "" print("")
if __name__ == '__main__': if __name__ == '__main__':
main() main()
FROM php:5.6-alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="PHP 5.6 Unit Tester" \
org.label-schema.description="" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
RUN apk add --no-cache bash nodejs nodejs-npm $PHPIZE_DEPS \
&& pecl install xdebug-2.5.0 \
&& docker-php-ext-enable xdebug \
&& apk del --no-cache $PHPIZE_DEPS
RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \
&& chmod 755 /usr/local/bin/composer
CMD ["bash"]
FROM php:7.0-alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="PHP 5.6 Unit Tester" \
org.label-schema.description="" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
RUN apk add --no-cache bash nodejs nodejs-npm $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del --no-cache $PHPIZE_DEPS
RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \
&& chmod 755 /usr/local/bin/composer
CMD ["bash"]
FROM php:7.1-alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="PHP 5.6 Unit Tester" \
org.label-schema.description="" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
RUN apk add --no-cache bash nodejs nodejs-npm $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del --no-cache $PHPIZE_DEPS
RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \
&& chmod 755 /usr/local/bin/composer
CMD ["bash"]
FROM php:7.2-alpine
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="PHP 5.6 Unit Tester" \
org.label-schema.description="" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version=$VERSION \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
RUN apk add --no-cache bash nodejs nodejs-npm $PHPIZE_DEPS \
&& pecl install xdebug \
&& docker-php-ext-enable xdebug \
&& apk del --no-cache $PHPIZE_DEPS
RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \
&& chmod 755 /usr/local/bin/composer
CMD ["bash"]
...@@ -12,7 +12,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ ...@@ -12,7 +12,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.schema-version="1.0" \ org.label-schema.schema-version="1.0" \
maintainer="J.R. Barreras <barreras@unl.edu>" maintainer="J.R. Barreras <barreras@unl.edu>"
ENV SONAR_SCANNER_VERSION 3.2.0.1227 ENV SONAR_SCANNER_VERSION 3.3.0.1492
WORKDIR /opt WORKDIR /opt
......
FROM its-registry.unl.edu/unl-its/docker-ci/android-build-server
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="Android Static Code Analyzer" \
org.label-schema.description="Docker image for static code analysis of Android projects" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vendor="University of Nebraska - Lincoln" \
org.label-schema.version="0.1.0" \
org.label-schema.schema-version="1.0" \
maintainer="Alan Nelson <alan.nelson@nebraska.edu>"
ENV SONAR_SCANNER_VERSION 3.2.0.1227
ENV SONAR_HOME /opt/sonar-scanner
ENV PATH ${PATH}:${SONAR_HOME}
WORKDIR /opt
RUN mkdir -p /opt/src \
&& curl -q -o sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_SCANNER_VERSION}.zip \
&& unzip -q sonarscanner.zip -d ${SONAR_HOME} \
&& rm sonarscanner.zip
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment