forked from lftraining/jx3-pipeline-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 80c43a4
Showing
865 changed files
with
36,815 additions
and
0 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,20 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
# vendor/ | ||
|
||
# IntelliJ IDEs | ||
.idea/ | ||
|
||
.vscode |
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,21 @@ | ||
|
||
# generated by: jx gitops variables | ||
export APP_NAME='jx3-pipeline-catalog' | ||
export BRANCH_NAME='master' | ||
export BUILD_NUMBER='81' | ||
export DOCKERFILE_PATH='Dockerfile' | ||
export DOCKER_REGISTRY='ghcr.io' | ||
export DOCKER_REGISTRY_ORG='jenkins-x' | ||
export DOMAIN='infra.jenkins-x.rocks' | ||
export GIT_BRANCH='master' | ||
export JENKINS_X_URL='https://dashboard-jx.infra.jenkins-x.rocks/jenkins-x/jx3-pipeline-catalog/master/81' | ||
export JX_CHART_REPOSITORY='https://github.com/jenkins-x-charts/repo.git' | ||
export KANIKO_FLAGS='--skip-unused-stages --snapshotMode=redo' | ||
export MINK_AS='tekton-bot' | ||
export MINK_IMAGE='ghcr.io/jenkins-x/jx3-pipeline-catalog:1.1.4' | ||
export NAMESPACE_SUB_DOMAIN='-jx.' | ||
export PIPELINE_KIND='release' | ||
export PUSH_CONTAINER_REGISTRY='ghcr.io' | ||
export REPO_NAME='jx3-pipeline-catalog' | ||
export REPO_OWNER='jenkins-x' | ||
export VERSION='1.1.4' |
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,39 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
declare -a repos=( | ||
"nodedemo" | ||
) | ||
|
||
# TODO to test locally could be: $CURDIR/../../packs | ||
PACKDIR=/workspace/source/packs | ||
CURDIR=$(pwd) | ||
export PROJECT_DIR=test-projects | ||
rm -rf $PROJECT_DIR | ||
mkdir -p $PROJECT_DIR | ||
|
||
for r in "${repos[@]}" | ||
do | ||
echo "upgrading repository https://github.com/jenkins-x-labs-bdd-tests/$r" | ||
|
||
cd $PROJECT_DIR | ||
git clone https://github.com/jenkins-x-labs-bdd-tests/$r.git | ||
cd $r | ||
|
||
echo "removing old build pack" | ||
rm -rf .lighthouse/ jenkins-x.yml charts preview Dockerfile | ||
echo "recreating the pipeline... in dir $(pwd)" | ||
|
||
# lets regenerate the build pack... | ||
jx project import --no-dev-pr --dry-run --batch-mode --dir $(pwd) --pipeline-catalog-dir $PACKDIR | ||
|
||
git add * || true | ||
git commit -a -m "chore: upgrade pipeline library" || true | ||
git push || true | ||
|
||
echo "updated the pipeline library for $r" | ||
done | ||
|
||
|
||
echo "finished" | ||
|
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,5 @@ | ||
#!/usr/bin/env sh | ||
for chart in packs/*; do | ||
echo linting chart "$chart" | ||
jx gitops helm build -c "$chart" | ||
done |
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,36 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
creationTimestamp: null | ||
name: lint-helm | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: from-build-pack | ||
resources: {} | ||
taskSpec: | ||
metadata: {} | ||
stepTemplate: | ||
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/helm/pullrequest.yaml@versionStream | ||
name: "" | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 256Mi | ||
workingDir: /workspace/source | ||
steps: | ||
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream | ||
name: "" | ||
resources: {} | ||
- name: jx-variables | ||
resources: {} | ||
- name: build-helm-build | ||
resources: {} | ||
script: | | ||
#!/usr/bin/env sh | ||
. .jx/variables.sh | ||
. /workspace/source/.lighthouse/jenkins-x/lint-helm.sh | ||
podTemplate: {} | ||
serviceAccountName: tekton-bot | ||
timeout: 12h0m0s | ||
status: {} |
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,51 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
creationTimestamp: null | ||
name: lint-pipelines | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: from-build-pack | ||
resources: {} | ||
taskSpec: | ||
metadata: {} | ||
stepTemplate: | ||
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go/pullrequest.yaml@versionStream | ||
name: "" | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 256Mi | ||
workingDir: /workspace/source | ||
steps: | ||
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream | ||
name: "" | ||
resources: {} | ||
- name: jx-variables | ||
resources: {} | ||
- name: promote-jx-preview:lint-pipelines | ||
resources: {} | ||
script: | | ||
#!/usr/bin/env sh | ||
. .jx/variables.sh | ||
echo 'linting pipelines in the packs and .lighthouse folder:' | ||
jx pipeline lint -r --out=pipelines-packs.tap | ||
echo "" | ||
cat pipelines-packs.tap | ||
echo 'linting pipelines in the tasks folder:' | ||
jx pipeline lint -a -d tasks --out=pipelines-tasks.tap | ||
echo "" | ||
cat pipelines-tasks.tap | ||
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/lint/lint.yaml@versionStream | ||
name: pr-comment | ||
resources: {} | ||
script: | | ||
#!/usr/bin/env sh | ||
jx-tap run | ||
podTemplate: {} | ||
serviceAccountName: tekton-bot | ||
timeout: 12h0m0s | ||
status: {} |
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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "promoting" |
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,51 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
creationTimestamp: null | ||
name: release | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: from-build-pack | ||
resources: {} | ||
taskSpec: | ||
metadata: {} | ||
stepTemplate: | ||
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go/release.yaml@a5ab19ebc5a074e0402c5016b11bc11b32cc5c83 | ||
name: "" | ||
resources: | ||
# override limits for all containers here | ||
limits: {} | ||
workingDir: /workspace/source | ||
steps: | ||
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream | ||
name: "" | ||
resources: {} | ||
- name: next-version | ||
resources: {} | ||
- name: jx-variables | ||
resources: | ||
# override requests for the pod here | ||
requests: | ||
cpu: 400m | ||
memory: 600Mi | ||
- env: | ||
- name: GH_ACCESS_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
key: password | ||
name: bdd-git | ||
image: ghcr.io/jenkins-x/jx-go-maven:3.2.197 | ||
name: runci | ||
resources: {} | ||
script: | | ||
#!/usr/bin/env bash | ||
source .jx/variables.sh | ||
echo running bdd test $JOB_NAME | ||
cd /workspace/source/.lighthouse/jenkins-x/tests | ||
go mod download | ||
make test | ||
podTemplate: {} | ||
serviceAccountName: tekton-bot | ||
timeout: 12h0m0s | ||
status: {} |
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,51 @@ | ||
apiVersion: tekton.dev/v1beta1 | ||
kind: PipelineRun | ||
metadata: | ||
creationTimestamp: null | ||
name: release | ||
spec: | ||
pipelineSpec: | ||
tasks: | ||
- name: from-build-pack | ||
resources: {} | ||
taskSpec: | ||
metadata: {} | ||
stepTemplate: | ||
image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go/release.yaml@versionStream | ||
name: "" | ||
resources: | ||
# override limits for all containers here | ||
limits: {} | ||
workingDir: /workspace/source | ||
steps: | ||
- image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone.yaml@versionStream | ||
name: "" | ||
resources: {} | ||
- name: next-version | ||
resources: {} | ||
- name: jx-variables | ||
resources: | ||
# override requests for the pod here | ||
requests: | ||
cpu: 400m | ||
memory: 600Mi | ||
- name: promote-changelog | ||
resources: {} | ||
- image: ghcr.io/jenkins-x/jx-boot:3.10.137 | ||
name: promote-pullrequest | ||
resources: {} | ||
script: | | ||
#!/usr/bin/env sh | ||
source .jx/variables.sh | ||
git clone https://github.com/jenkins-x/$REPO_NAME new-main | ||
cd new-main | ||
sed -i -e "s|uses:jenkins-x/jx3-pipeline-catalog/tasks/go/release.yaml@.*|uses:jenkins-x/jx3-pipeline-catalog/tasks/go/release.yaml@$PULL_BASE_SHA|" environment/.lighthouse/jenkins-x/pullrequest.yaml | ||
git add * || true | ||
git commit -a -m "chore: upgrade environment pull request to $PULL_BASE_SHA" --allow-empty | ||
git push | ||
podTemplate: {} | ||
serviceAccountName: tekton-bot | ||
timeout: 12h0m0s | ||
status: {} |
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,27 @@ | ||
NAME := jx3-pipeline-catalog | ||
GO := GO111MODULE=on go | ||
|
||
BUILDFLAGS := | ||
|
||
TESTFLAGS ?= -v | ||
|
||
TESTFLAGS += -timeout 2h | ||
|
||
ifdef DEBUG | ||
BUILDFLAGS += -gcflags "all=-N -l" $(BUILDFLAGS) | ||
endif | ||
|
||
|
||
.PHONY: fmt | ||
fmt: | ||
@FORMATTED=`$(GO) fmt $(PACKAGE_DIRS)` | ||
@([[ ! -z "$(FORMATTED)" ]] && printf "Fixed unformatted files:\n$(FORMATTED)") || true | ||
|
||
.PHONY: test | ||
build: | ||
$(GO) build $(BUILDFLAGS) ./test/... | ||
|
||
.PHONY: test | ||
test: | ||
$(GO) test $(TESTFLAGS) ./... | ||
|
Oops, something went wrong.