diff --git a/.gitignore b/.gitignore index 64da4f063d99580ba46b28f3a1ce3e8f5e69d8d9..20273978275322d7cf6eb784b643bfc2aa52cd7a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ *.tar.gz *.rpm build-image.sh +scripts/importArtifacts.sh +scripts/importArtifacts.sh diff --git a/Dockerfile b/Dockerfile index ebcc0b6441dd795491b95a76b36889fbc0da2f65..9dedcfe8e341cc0759403fa23883da45057cd99d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ ARG CONFLUENT_OPERATOR_BASE_IMAGE=confluentinc/confluent-operator -ARG CONFLUENT_OPERATOR_BASE_TAG=0.771.68 +ARG CONFLUENT_OPERATOR_BASE_TAG=0.1033.3 ARG BASE_REGISTRY=registry1.dso.mil ARG BASE_IMAGE=redhat/ubi/ubi8 ARG BASE_TAG=8.9 -FROM ${CONFLUENT_OPERATOR_BASE_IMAGE}:${CONFLUENT_OPERATOR_BASE_TAG} as base +FROM ${CONFLUENT_OPERATOR_BASE_IMAGE}:${CONFLUENT_OPERATOR_BASE_TAG} AS base FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} WORKDIR /opt @@ -21,11 +21,11 @@ COPY hardening_manifest.yaml /etc/confluent/ironbank/ ## copy from dockerhub image COPY --from=base /licenses /licenses COPY --from=base /opt/manager /opt/manager + COPY scripts/entrypoint.sh /entrypoint.sh RUN echo "===> Dependency update" \ && dnf update -y --nodocs \ - && chmod gu-s /usr/bin/write \ && echo "===> Clean up, Clean up" \ && dnf clean all \ && yum clean all \ diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index 3e7e27192e93f20dc5db475ddf9c30f657ca3df6..80897a5ff99e1b9b9705691e71ca77a4067ccbd6 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -8,15 +8,15 @@ name: "confluentinc/confluent-operator" # The most specific version should be the first tag and will be shown # on ironbank.dso.mil tags: - - "2.6.4" - - "2.6" - - "0.771.68" - - "0.771" + - "2.9.0" + - "2.9" + - "0.1033.3" + - "0.1033" # Build args passed to Dockerfile ARGs args: CONFLUENT_OPERATOR_BASE_IMAGE: "confluentinc/confluent-operator" - CONFLUENT_OPERATOR_BASE_TAG: "0.771.68" + CONFLUENT_OPERATOR_BASE_TAG: "0.1033.3" BASE_IMAGE: "redhat/ubi/ubi8" BASE_TAG: "8.9" @@ -27,14 +27,14 @@ labels: org.opencontainers.image.licenses: "CONFLUENT ENTERPRISE LICENSE" org.opencontainers.image.url: "https://docs.confluent.io/current/installation/operator/index.html" org.opencontainers.image.vendor: "Confluent" - org.opencontainers.image.version: "0.771.68" + org.opencontainers.image.version: "0.1033.3" mil.dso.ironbank.image.keywords: "confluent,kafka,zookeeper,operator" mil.dso.ironbank.image.type: "commercial" mil.dso.ironbank.product.name: "Confluent Platform" resources: - - tag: confluentinc/confluent-operator:0.771.68 - url: docker://docker.io/confluentinc/confluent-operator:0.771.68 + - tag: "confluentinc/confluent-operator:0.1033.3" + url: "docker://docker.io/confluentinc/confluent-operator@sha256:81883a6d37e17fa0c73b941fc6ee9de310432f97b9e319f14d046c28b0628621" # List of project maintainers maintainers: diff --git a/scripts/importArtifacts.sh b/scripts/importArtifacts.sh index f6b0d245cfd342cd5cdb68c15305994a5ff0cde9..32132708fa2300bfd7eebbf9ba7135d088ad39dc 100755 --- a/scripts/importArtifacts.sh +++ b/scripts/importArtifacts.sh @@ -24,6 +24,9 @@ importArtifacts() { echo -e "\nImporting ${httpdomain} artifacts ..." maniDir=$(dirname "$manifestPath") + if [[ ! -f "$maniDir/build-image.sh" ]]; then + cp build-image.sh $maniDir/ + fi # (re)set the filelist.txt mkdir -p $resourceDir @@ -33,19 +36,11 @@ importArtifacts() { url=${line##*$prefix} filename=$(basename "$url") - local=$(find $RESOURCE_HOME -name $filename) - echo "local $local" - - if [[ -f "$filename" ]]; then - echo "AA" - echo "Using existing $filename. Run ./clean.sh if thats not desired." - elif [[ ! -z "$local" ]]; then - echo "BB" - echo "Using existing $local. Run ./clean.sh if thats not desired." - cp $local $maniDir/ - else + if [[ ! -f "$filename" ]]; then echo "downloading ${url} ..." wget $url + else + echo "Using existing $filename. Run ./clean.sh if thats not desired." fi if [[ ! -f "$maniDir/$filename" ]]; then @@ -60,14 +55,12 @@ mani=$(realpath "../hardening_manifest.yaml") importArtifacts $mani 'ironbank-files.s3.amazonaws.com' "$RESOURCE_HOME/ironbank-files" importArtifacts $mani 'packages.confluent.io' "$RESOURCE_HOME/confluent" -importArtifacts $mani 's3.us-west-2.amazonaws.com/staging-confluent-packages' "$RESOURCE_HOME/confluent" importArtifacts $mani 'files.pythonhosted.org' "$RESOURCE_HOME/pythonhosted" -importArtifacts $mani 'repo1.maven.org' "$RESOURCE_HOME/maven" -# echo "Generating hardening_manifest_template.yaml ..." -# $SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/ironbank-files" -# $SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/confluent" -# $SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/pythonhosted" +echo "Generating hardening_manifest_template.yaml ..." +$SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/ironbank-files" +$SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/confluent" +$SCRIPTS_HOME/genManifestTemplate.sh "$RESOURCE_HOME/pythonhosted" end=`date +%s` duration=$((end-start))