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
#!/usr/bin/env bash | |
# Execute with: | |
# ./refresh-jx-platform.sh | |
# or pass the JX_VERSION | |
# JX_VERSION=2.3.333 ./refresh-jx-platform.sh | |
set -eu | |
export JX_HOME=$(mktemp -d) | |
if [ -z "${JX_VERSION:-}" ]; then |
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
$ cat google-oauth-config | |
...someClientID... | |
...someClientSecret... | |
$ cat authz_strategy_config | |
{ | |
"strategy": "GlobalMatrixAuthorizationStrategy", | |
"user_permissions": { | |
"authenticated": [ |
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
jenkins: | |
Master: | |
Image: my-company/my-project/jenkins-x-image | |
ImageTag: 0.0.70-2 | |
Persistence: | |
mounts: | |
- name: jenkins-security-secrets | |
mountPath: /etc/jenkins-secrets | |
readOnly: true | |
volumes: |
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
jenkins: | |
Master: | |
Image: my-company/my-project/jenkins-x-image | |
ImageTag: 0.0.70-2 | |
Persistence: | |
mounts: | |
- name: jenkins-security-secrets | |
mountPath: /etc/jenkins-secrets | |
readOnly: true | |
volumes: |
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
pipeline { | |
options { ... } | |
parameters { ... } | |
agent { ... } | |
stages { | |
stage('Test') { | |
when { |
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
kind: ConfigMap | |
apiVersion: v1 | |
metadata: | |
name: nexus-custom-repo-files | |
namespace: jx | |
labels: | |
app: nexus-custom-repo-files | |
data: | |
redshift-maven-repository.json: | | |
{ |
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
def updateGroup(def name, def members) { | |
if (!repository.getRepositoryManager().exists(name)) { | |
repository.createMavenGroup(name, members) | |
} | |
def mgConfig = repository.getRepositoryManager().get(name).configuration.copy() | |
mgConfig.attributes['group']['memberNames'] = members | |
repository.repositoryManager.update(mgConfig) | |
} | |
updateGroup('maven-group',['maven-public', 'maven-central', 'maven-releases', 'spring-milestone', 'spring-release', 'jitpack', 'jenkins-release', 'maven-jenkinsci', 'jenkins-public', 'plugins-gradle', 'my-protected-repo']) | |
updateGroup('maven-group-snapshots',['maven-snapshots', 'apache-org-snapshots', 'spring-io-libs-snapshot', 'oss-sonatype-snapshots']) |
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
add_custom_nexus_repos() { | |
local dir=$1 | |
local volumeNames subPaths repoFiles patchItemString= patchFile separator='' | |
echo "Getting nexus deployment volume names..." | |
volumeNames=$(kubectl get deployment jenkins-x-nexus -o 'jsonpath={ .spec.template.spec.volumes[*].name}') | |
echo "Getting nexus deployment volumeMount subPaths..." | |
subPaths=$(kubectl get deployment jenkins-x-nexus -o 'jsonpath={ .spec.template.spec.containers[0].volumeMounts[*].subPath}') | |
repoFiles=$(cat "${dir}/nexus-repos/nexus-custom-repo-files.yaml" | docker run -i --rm evns/yq -j -r '.data' | docker run -i --rm imega/jq -r 'keys[]' | xargs) |
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
{"component":"jenkins-operator","duration":"467.19302ms","file":"prow/cmd/jenkins-operator/main.go:227","func":"main.main","level":"info","msg":"Synced","time":"2019-09-10T16:00:07Z"} | |
{"component":"jenkins-operator","duration":"480.632256ms","file":"prow/cmd/jenkins-operator/main.go:227","func":"main.main","level":"info","msg":"Synced","time":"2019-09-10T16:00:37Z"} | |
{"component":"jenkins-operator","duration":"541.922802ms","file":"prow/cmd/jenkins-operator/main.go:227","func":"main.main","level":"info","msg":"Synced","time":"2019-09-10T16:01:07Z"} | |
{"component":"jenkins-operator","duration":"443.892985ms","file":"prow/cmd/jenkins-operator/main.go:227","func":"main.main","level":"info","msg":"Synced","time":"2019-09-10T16:01:37Z"} | |
{"component":"jenkins-operator","duration":"483.265286ms","file":"prow/cmd/jenkins-operator/main.go:227","func":"main.main","level":"info","msg":"Synced","time":"2019-09-10T16:02:07Z"} | |
{"component":"jenkins-operator","duration":"371.763669ms","file":"prow/cmd/jenkins-operator/main.go: |
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
{"component":"jenkins-operator","file":"prow/cmd/jenkins-operator/main.go:279","func":"main.gather","level":"debug","metrics-duration":"718.562µs","msg":"Metrics synced","time":"2019-09-11T15:20:07Z"} | |
{"client":"jenkins","component":"jenkins-operator","file":"prow/jenkins/jenkins.go:675","func":"k8s.io/test-infra/prow/jenkins.(*Client).GetEnqueuedBuilds","level":"debug","msg":"GetEnqueuedBuilds","time":"2019-09-11T15:20:07Z"} | |
{"client":"jenkins","component":"jenkins-operator","file":"prow/jenkins/jenkins.go:715","func":"k8s.io/test-infra/prow/jenkins.(*Client).GetBuilds","level":"debug","msg":"GetBuilds(myproj/view/change-requests/job/PR-1798)","time":"2019-09-11T15:20:07Z"} | |
{"client":"jenkins","component":"jenkins-operator","file":"prow/jenkins/jenkins.go:715","func":"k8s.io/test-infra/prow/jenkins.(*Client).GetBuilds","level":"debug","msg":"GetBuilds(myproj/view/change-requests/job/PR-1801)","time":"2019-09-11T15:20:07Z"} | |
{"client":"jenkins","component":"jenkins-operator","file":"prow/jenkins/jenkins.go:715 |