-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from gburges/image
Image
- Loading branch information
Showing
65 changed files
with
2,891 additions
and
1,503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Base image auto update | ||
on: | ||
schedule: | ||
- cron: "5 0 * * *" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
checkout: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up skopeo | ||
run: sudo apt-get install -y skopeo | ||
- name: Check ubi8-minimal change | ||
run: | | ||
UBIVERSION=$(skopeo inspect docker://registry.access.redhat.com/ubi8/ubi-minimal:latest |jq '.Labels.url' |sed 's/"//g' |awk -F/ '{print $NF}') | ||
echo "ubiversion=$UBIVERSION" >> "$GITHUB_ENV" | ||
- name: Check go-toolset change | ||
run: | | ||
GOTOOLSETVER=$(skopeo inspect docker://registry.access.redhat.com/ubi8/go-toolset:latest |jq '.Labels.url' |sed 's/"//g' |awk -F/ '{print $NF}') | ||
echo "gotoolsetver=$GOTOOLSETVER" >> "$GITHUB_ENV" | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v6 | ||
with: | ||
gpg_private_key: ${{ secrets.SIGN_KEY }} | ||
passphrase: ${{ secrets.SIGN_KEY_PHRASE }} | ||
git_user_signingkey: true | ||
git_commit_gpgsign: true | ||
- name: Do change if the version changed | ||
run: | | ||
git config user.name 'DevProdBot' | ||
git config user.email '[email protected]>' | ||
git checkout -b update | ||
sed -i "s/registry.access.redhat.com\/ubi8\/ubi-minimal:[0-9.-]*/registry.access.redhat.com\/ubi8\/ubi-minimal:$ubiversion/" Dockerfile | ||
sed -i "s/registry.access.redhat.com\/ubi8\/go-toolset:[0-9.-]*/registry.access.redhat.com\/ubi8\/go-toolset:$gotoolsetver/" Dockerfile.base | ||
git add -A | ||
git commit -S -m "Update to ubi-minimal or go-toolset image" || echo "No changes to commit" | ||
git push -u origin update || git push -f origin update | ||
- name: Create pull request | ||
run: gh pr create --title 'Regular docker image update' --body 'Automation \o/' --reviewer addrew | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
# The default values used in the docker build commands are the root | ||
# directory '.' and the dockerfile name of 'Dockerfile'. If there is | ||
# a need to change these do so in your local workflow template (this file) and | ||
# change them there. HINT: Look at the bottom of this file. | ||
|
||
# This workflow checks out code, builds an image, performs a container image | ||
# vulnerability scan with Anchore's Grype tool, and generates an | ||
# SBOM via Anchore's Syft tool | ||
|
||
# For more information on Anchore's container image scanning tool Grype, see | ||
# https://github.com/anchore/grype | ||
|
||
# For more information about the Anchore SBOM tool, Syft, see | ||
# https://github.com/anchore/syft | ||
|
||
name: ConsoleDot Platform Security Scan | ||
|
||
on: | ||
push: | ||
branches: [ "main", "security-compliance" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main", "security-compliance" ] | ||
|
||
jobs: | ||
PlatSec-Security-Workflow: | ||
uses: RedHatInsights/platform-security-gh-workflow/.github/workflows/platsec-security-scan-reusable-workflow.yml@master | ||
## The optional parameters below are used if you are using something other than the | ||
## the defaults of root '.' for the path and 'Dockerfile' for the Dockerfile name. | ||
## Additionally, if you have a Dockerfile you use as your BASE_IMG or you need to | ||
## use '--build-arg', those can be define below as well. | ||
|
||
with: | ||
# dockerfile_path: './test' | ||
# dockerfile_name: 'Dockerfile.main' | ||
base_image_build: true | ||
# base_dockerfile_path: './test' | ||
base_dockerfile_name: 'Dockerfile.base' | ||
build_arg: '--build-arg BASE_IMAGE="localbuild/baseimage:latest"' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ bin | |
testbin/* | ||
__debug_bin | ||
|
||
kubeconfig | ||
|
||
# Test binary, build with `go test -c` | ||
*.test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Build the manager binary | ||
FROM registry.access.redhat.com/ubi8/go-toolset:1.19.13-2.1698062273 as builder | ||
|
||
WORKDIR /workspace | ||
|
||
COPY go.mod go.mod | ||
COPY go.sum go.sum | ||
|
||
|
||
RUN go mod download | ||
|
||
COPY main.go main.go | ||
COPY api/ api/ | ||
COPY controllers/ controllers/ | ||
|
||
USER 0 | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -o manager main.go | ||
|
||
RUN rm main.go | ||
RUN rm -rf api | ||
RUN rm -rf controllers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
def secrets = [ | ||
[path: params.VAULT_PATH_SVC_ACCOUNT_EPHEMERAL, engineVersion: 1, secretValues: [ | ||
[envVar: 'OC_LOGIN_TOKEN_DEV', vaultKey: 'oc-login-token-dev'], | ||
[envVar: 'OC_LOGIN_SERVER_DEV', vaultKey: 'oc-login-server-dev']]], | ||
[path: params.VAULT_PATH_QUAY_PUSH, engineVersion: 1, secretValues: [ | ||
[envVar: 'QUAY_USER', vaultKey: 'user'], | ||
[envVar: 'QUAY_TOKEN', vaultKey: 'token']]], | ||
[path: params.VAULT_PATH_RHR_PULL, engineVersion: 1, secretValues: [ | ||
[envVar: 'RH_REGISTRY_USER', vaultKey: 'user'], | ||
[envVar: 'RH_REGISTRY_TOKEN', vaultKey: 'token']]] | ||
] | ||
|
||
def configuration = [vaultUrl: params.VAULT_ADDRESS, vaultCredentialId: params.VAULT_CREDS_ID, engineVersion: 1] | ||
|
||
pipeline { | ||
agent { label 'insights' } | ||
options { | ||
timestamps() | ||
} | ||
|
||
environment { | ||
FEO_CONTAINER_NAME="frontend-operator-pr-check-pipeline-$ghprbPullId" | ||
} | ||
|
||
stages { | ||
stage('PR Checks') { | ||
steps { | ||
withVault([configuration: configuration, vaultSecrets: secrets]) { | ||
sh ''' | ||
source ./pr_check.sh | ||
''' | ||
} | ||
} | ||
} | ||
|
||
stage('KUTTL Tests'){ | ||
steps { | ||
withVault([configuration: configuration, vaultSecrets: secrets]) { | ||
sh ''' | ||
source ./kuttl_test.sh | ||
''' | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.