Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes #747

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ For OpenShift Pipelines releases and its relationship to Tekton and OpenShift ve

| ods-pipeline | OpenShift Pipelines | ODS Core/Quickstarters |
|---|---|---|
| [0.15](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.15.0) | 1.12 | 4.x |
| [0.15](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.15.0) | 1.12 - 1.14 | 4.x |
| [0.14](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.14.0) | 1.12 | 4.x |
| [0.13](https://github.com/opendevstack/ods-pipeline/releases/tag/v0.13.2) | 1.9 | 4.x |

Expand Down
2 changes: 1 addition & 1 deletion build/images/Dockerfile.finish
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN cd cmd/finish && CGO_ENABLED=0 go build -o /usr/local/bin/ods-finish

# Final image
# ubi-micro cannot be used as it misses the ca-certificates package.
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9
COPY --from=builder /usr/local/bin/ods-finish /usr/local/bin/ods-finish
VOLUME /workspace/source
USER 1001
2 changes: 1 addition & 1 deletion build/images/Dockerfile.pipeline-manager
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN cd cmd/pipeline-manager && CGO_ENABLED=0 go build -o /usr/local/bin/pipeline

# Final image
# ubi-micro cannot be used as it misses the ca-certificates package.
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9
COPY --from=builder /usr/local/bin/pipeline-manager /usr/local/bin/pipeline-manager
EXPOSE 8080
CMD pipeline-manager
Expand Down
2 changes: 1 addition & 1 deletion build/images/Dockerfile.start
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN cd /tmp \
&& git lfs version

# Final image
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.9

ENV GIT_VERSION=2.39 \
OPENSSH_CLIENTS_VERSION=8.0
Expand Down
4 changes: 2 additions & 2 deletions deploy/chart/templates/configmap-bitbucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
labels:
{{- include "chart.labels" . | nindent 4}}
data:
url: '{{required "bitbucketUrl is required" .Values.bitbucketUrl | trimSuffix "/"}}'
repoBase: '{{required "bitbucketUrl is required" .Values.bitbucketUrl | trimSuffix "/"}}/scm'
url: '{{.Values.bitbucketUrl | trimSuffix "/"}}'
repoBase: '{{.Values.bitbucketUrl | trimSuffix "/"}}/scm'
2 changes: 1 addition & 1 deletion deploy/chart/templates/configmap-nexus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
labels:
{{- include "chart.labels" . | nindent 4}}
data:
url: '{{required "nexusUrl is required" .Values.nexusUrl | trimSuffix "/"}}'
url: '{{.Values.nexusUrl | trimSuffix "/"}}'
2 changes: 1 addition & 1 deletion docs/design/software-design-specification.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ a| The script installs the Helm chart located in `deploy/chart`. Further, it:

| SDS-EXT-2
| Red Hat Universal Base Image 8 Minimal
| 8.4
| 8.9
| Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. It is maintained by Red Hat and updated regularly.
| https://catalog.redhat.com/software/containers/ubi8/ubi-minimal/5c359a62bed8bd75a2c3fba8

Expand Down
3 changes: 1 addition & 2 deletions docs/promotion.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ pipelines:
tasks:
- name: deploy
- triggers:
- branches: ["*", "*/*"]
params:
- params:
- { name: finish.artifact-target, value: "my-nexus-repo" }
- { name: deploy.namespace, value: "prod-env" }
- { name: deploy.diff-only, value: "true" }
Expand Down
3 changes: 3 additions & 0 deletions pkg/odstasktest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
// AssertFilesExist checks that all files named by wantFiles exist in wsDir.
// Any files that do not exist will report a test error.
func AssertFilesExist(t *testing.T, wsDir string, wantFiles ...string) {
t.Helper()
for _, wf := range wantFiles {
filename := filepath.Join(wsDir, wf)
if _, err := os.Stat(filename); os.IsNotExist(err) {
Expand All @@ -21,6 +22,7 @@ func AssertFilesExist(t *testing.T, wsDir string, wantFiles ...string) {
// AssertFileContent checks that the file named by filename in the directory
// wsDir has the exact context specified by want.
func AssertFileContent(t *testing.T, wsDir, filename, want string) {
t.Helper()
got, err := getTrimmedFileContent(filepath.Join(wsDir, filename))
if err != nil {
t.Errorf("get content of %s: %s", filename, err)
Expand All @@ -34,6 +36,7 @@ func AssertFileContent(t *testing.T, wsDir, filename, want string) {
// AssertFileContentContains checks that the file named by filename in the directory
// wsDir contains all of wantContains.
func AssertFileContentContains(t *testing.T, wsDir, filename string, wantContains ...string) {
t.Helper()
content, err := os.ReadFile(filepath.Join(wsDir, filename))
got := string(content)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions scripts/install-tekton-pipelines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ set -eu
kube_context="--context kind-ods-pipeline"
kubectl_bin="kubectl $kube_context"

# Tekton version is aligned with Red Hat OpenShift Pipelines General Availability 1.12.
# See https://docs.openshift.com/container-platform/latest/cicd/pipelines/op-release-notes.html.
tkn_version="v0.50.1"
# Tekton version is aligned with Red Hat OpenShift Pipelines General Availability 1.14.
# See https://docs.openshift.com/pipelines/1.14/about/op-release-notes.html.
tkn_version="v0.56.2"
tkn_dashboard_version="v0.17.0"

install_tkn_dashboard="false"
Expand Down
14 changes: 7 additions & 7 deletions scripts/kind-with-registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ recreate_kind_cluster="false"
registry_port="5000"
kind_mount_path="/tmp/ods-pipeline/kind-mount"

# K8S version is aligned with OpenShift GA 4.11.
# See https://docs.openshift.com/container-platform/4.11/release_notes/ocp-4-11-release-notes.html
k8s_version="v1.24.7"
# K8S version is aligned with OpenShift GA 4.13.
# See https://docs.openshift.com/container-platform/4.13/release_notes/ocp-4-13-release-notes.html
k8s_version="v1.26.14"

while [ "$#" -gt 0 ]; do
case $1 in
Expand All @@ -55,12 +55,12 @@ reg_ip_selector='{{.NetworkSettings.Networks.kind.IPAddress}}'
reg_network='kind'

# create registry container unless it already exists
running="$(docker inspect -f '{{.State.Running}}' "${registry_name}" 2>/dev/null || true)"
running="$(docker container inspect -f '{{.State.Running}}' "${registry_name}" 2>/dev/null || true)"

# If the registry already exists, but is in the wrong network, we have to
# re-create it.
if [ "${running}" = 'true' ]; then
reg_ip="$(docker inspect -f ${reg_ip_selector} "${registry_name}")"
reg_ip="$(docker container inspect -f ${reg_ip_selector} "${registry_name}")"
if [ "${reg_ip}" = '' ]; then
docker kill "${registry_name}"
docker rm "${registry_name}"
Expand All @@ -73,15 +73,15 @@ if [ "${running}" != 'true' ]; then
if [ "${net_driver}" != "bridge" ]; then
docker network create "${reg_network}"
fi
if docker inspect "${registry_name}" >/dev/null 2>&1; then
if docker container inspect "${registry_name}" >/dev/null 2>&1; then
docker rm "${registry_name}"
fi
docker run \
-d --restart=always -p "${registry_port}:5000" --name "${registry_name}" --net "${reg_network}" \
registry:2
fi

reg_ip="$(docker inspect -f ${reg_ip_selector} "${registry_name}")"
reg_ip="$(docker container inspect -f ${reg_ip_selector} "${registry_name}")"
if [ "${reg_ip}" = "" ]; then
echo "Error creating registry: no IPAddress found at: ${reg_ip_selector}"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-bitbucket.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ while [ "$#" -gt 0 ]; do
esac; shift; done

if [ "${reuse}" = "true" ]; then
if ! docker inspect ${BITBUCKET_SERVER_CONTAINER_NAME} &> /dev/null; then
if ! docker container inspect ${BITBUCKET_SERVER_CONTAINER_NAME} &> /dev/null; then
echo "No existing Bitbucket container ${BITBUCKET_SERVER_CONTAINER_NAME} found ..."
else
echo "Reusing existing Bitbucket container ${BITBUCKET_SERVER_CONTAINER_NAME} ..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-nexus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ while [ "$#" -gt 0 ]; do
esac; shift; done

if [ "${reuse}" = "true" ]; then
if ! docker inspect ${CONTAINER_NAME} &> /dev/null; then
if ! docker container inspect ${CONTAINER_NAME} &> /dev/null; then
echo "No existing Nexus container ${CONTAINER_NAME} found ..."
else
echo "Reusing existing Nexus container ${CONTAINER_NAME} ..."
Expand Down
2 changes: 1 addition & 1 deletion scripts/run-sonarqube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ while [ "$#" -gt 0 ]; do
esac; shift; done

if [ "${reuse}" = "true" ]; then
if [ "$(docker inspect ${CONTAINER_NAME} -f '{{.State.Running}}')" = "true" ]; then
if [ "$(docker container inspect ${CONTAINER_NAME} -f '{{.State.Running}}')" = "true" ]; then
echo "Reusing running SonarQube container ${CONTAINER_NAME} ..."
exit 0
else
Expand Down
Loading