From 9339ebf3d29b71d839042b9593ec0eb7747432c3 Mon Sep 17 00:00:00 2001 From: Nemesis Osorio Date: Tue, 21 May 2024 12:19:42 -0600 Subject: [PATCH] chore(docker): publishing docker image --- .github/workflows/nemesis-orca-oes.yml | 64 ++++++++++++++++++++++++++ docker/ubi8/Dockerfile-fips | 30 ++++++------ 2 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/nemesis-orca-oes.yml diff --git a/.github/workflows/nemesis-orca-oes.yml b/.github/workflows/nemesis-orca-oes.yml new file mode 100644 index 0000000000..d0e4a7be9d --- /dev/null +++ b/.github/workflows/nemesis-orca-oes.yml @@ -0,0 +1,64 @@ +name: Nemesis Branch Build orca + +on: + push: + branches: + - chore/patch-artifacts + +env: + GRADLE_OPTS: -Dorg.gradle.daemon=false -Xmx6g -Xms6g + CONTAINER_REGISTRY: quay.io/opsmxpublic + +jobs: + branch-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - uses: actions/setup-java@v2 + with: + java-version: 17 + distribution: 'temurin' + - name: Prepare build variables + id: build_variables + run: | + echo ::set-output name=REPO::ubi8-orca-cve + echo ::set-output name=VERSION::"nemesis-1.30.1" + echo "::set-output name=GITHASH::$(git rev-parse --short HEAD)" + echo "::set-output name=BUILDDATE::$(date -u +"%Y%m%d%H%M")" + - name: Login to Quay + uses: docker/login-action@v1 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_KEY }} + - name: Build + env: + ORG_GRADLE_PROJECT_version: ${{ steps.build_variables.outputs.VERSION }} + run: | + + sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i settings.gradle + sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i settings.gradle + sed -e 's/NEXUS_USERNAME/${{ secrets.NEXUS_USERNAME }}/' -i build.gradle + sed -e 's/NEXUS_PASSWORD/${{ secrets.NEXUS_PASSWORD }}/' -i build.gradle + + ./gradlew --no-daemon -PenableCrossCompilerPlugin=true orca-web:installDist -x test + + - name: dockerBuildpush + uses: docker/build-push-action@v2 + with: + context: . + build-args: | + CUSTOMPLUGIN_RELEASEVERSION=v4.0.4.2-rc5 + CUSTOMPLUGIN_RELEASEORG=opsmx + CUSTOMPLUGIN_RELEASEREPO=armory-observability-plugin + CUSTOMPLUGIN_RELEASE_VERSION=v1.0.1 + file: docker/ubi8/Dockerfile-fips + push: true + tags: | + "${{ env.CONTAINER_REGISTRY }}/${{ steps.build_variables.outputs.REPO }}:${{ steps.build_variables.outputs.VERSION }}-${{ steps.build_variables.outputs.GITHASH }}-${{ steps.build_variables.outputs.BUILDDATE }}" diff --git a/docker/ubi8/Dockerfile-fips b/docker/ubi8/Dockerfile-fips index 3e2bc2c67a..c61c40cdaf 100644 --- a/docker/ubi8/Dockerfile-fips +++ b/docker/ubi8/Dockerfile-fips @@ -36,21 +36,21 @@ RUN useradd spinnaker RUN mkdir -p /opt/orca/plugins #custom plugin zip files adding -ARG CUSTOMPLUGIN_RELEASEVERSION -ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION -RUN wget -O Opsmx.VerificationGatePlugin-VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ - && wget -O Opsmx.TestVerificationGatePlugin-TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ - && wget -O Opsmx.PolicyGatePlugin-policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ - && wget -O Opsmx.PolicyGatePlugin-RbacPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/RbacPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ - && wget -O Opsmx.VisibilityApprovalPlugin-ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins -RUN mv Opsmx.VerificationGatePlugin-VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ - && mv Opsmx.TestVerificationGatePlugin-TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ - && mv Opsmx.PolicyGatePlugin-policyPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ - && mv Opsmx.PolicyGatePlugin-RbacPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ - && mv Opsmx.VisibilityApprovalPlugin-ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ - - -#RUN wget -O Armory.ObservabilityPlugin-armory-observability-plugin-v1.4.2-SNAPSHOT.zip -c https://github.com/OpsMx/armory-observability-plugin/releases/download/v1.0.0/armory-observability-plugin-v1.4.2-SNAPSHOT.zip -P /opt/orca/plugins +#ARG CUSTOMPLUGIN_RELEASEVERSION +#ENV CUSTOMPLUGIN_RELEASEVERSION=$CUSTOMPLUGIN_RELEASEVERSION +#RUN wget -O Opsmx.VerificationGatePlugin-VerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/VerificationPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ +# && wget -O Opsmx.TestVerificationGatePlugin-TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/TestVerificationPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ +# && wget -O Opsmx.PolicyGatePlugin-policyPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/policyPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ +# && wget -O Opsmx.PolicyGatePlugin-RbacPlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/RbacPlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins \ +# && wget -O Opsmx.VisibilityApprovalPlugin-ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -c https://github.com/OpsMx/Customplugins/releases/download/${CUSTOMPLUGIN_RELEASEVERSION}/ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip -P /opt/orca/plugins +#RUN mv Opsmx.VerificationGatePlugin-VerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ +# && mv Opsmx.TestVerificationGatePlugin-TestVerificationPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ +# && mv Opsmx.PolicyGatePlugin-policyPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ +# && mv Opsmx.PolicyGatePlugin-RbacPlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ \ +# && mv Opsmx.VisibilityApprovalPlugin-ApprovalStagePlugin-v1.0.1-SNAPSHOT.zip /opt/orca/plugins/ + + +#RUN wget -O Armory.ObservabilityPlugin-armory-observability-plugin-v1.4.2-SNAPSHOT.zip -c https://github.com/OpsMx/armory-observability-plugin/releases/download/v1.0.0/armory-observability-plugin-v1.4.2-SNAPSHOT.zip -P /opt/orca/plugins #RUN mv Armory.ObservabilityPlugin-armory-observability-plugin-v1.4.2-SNAPSHOT.zip /opt/orca/plugins/