question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimal JCasC yaml config ineffectual wrt. matrix-auth plugin

See original GitHub issue

Hi! Ref. conversation with @casz in gitter, here’s my minimal setup:

jenkins:
  authorizationStrategy:
    globalMatrix:
      grantedPermissions:
        - name: 'anonymous'
          permissions: []
        - name: 'authenticated'
          permissions:
            - 'Overall/Read'
        - name: 'admin'
          permissions:
            - 'Overall/Administer'
  # http://yaml-multiline.info/
  systemMessage: |-
    Testing Matrix-Auth plugin

When I log into the newly created Jenkins instance (which I create from scratch each time, deleting everything in docker-compose and the docker volume), I see the following.

plugins.txt file fed into Docker Image: (see Dockerfile and docker-compose.yaml files)

saml:1.0.7
matrix-auth:2.3
pipeline-model-definition:1.3.1
docker-slaves:1.0.7
pipeline-utility-steps:2.1.0
configuration-as-code:0.10-alpha

docker-compose.yaml:

version: '3'

services:
  jenkins:
    restart: on-failure
    build:
      context: ./jenkins-master
    ports:
      - 8080:8080
    volumes:
      - jenkins_home:/var/jenkins_home
      - /etc/localtime:/etc/localtime:ro  # To ensure timezone matches host
    environment:
      - CASC_JENKINS_CONFIG=/usr/share/jenkins/ref/jenkins.yaml

volumes:
  jenkins_home:

jenkins-master/Dockerfile:

FROM jenkins/jenkins:lts
# LTS version!
# Requires something to execute `docker pull jenkins/jenkins:lts` every now and then, to stay up-to-date.
# Ref: https://hub.docker.com/r/jenkins/jenkins/tags/

# LABEL maintaner=""

COPY stb_plugins.txt /usr/share/jenkins/ref/stb_plugins.txt
RUN xargs /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/stb_plugins.txt

# Jenkins Configuration-as-Code (JCasC) settings file:
COPY jenkins.yaml /usr/share/jenkins/ref/jenkins.yaml

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:21 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
jetersencommented, Jul 13, 2018

Well I did help you with a bunch of other stuff so all good @x10an14 😅

1reaction
x10an14commented, Jul 13, 2018

@casz In case it’s of any interest, I (personally/subjectively) think this is a little more readable Dockerfile RUN command for skipping initial setup-wizard:

# Skip first-setup install wizard:
# https://github.com/jenkinsci/configuration-as-code-plugin/issues/361#issuecomment-404793129
RUN echo $JENKINS_VERSION | tee \
    /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state \
    /usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion

Thanks again for your assistance =) I’ve got some other questions I’d like to poke you with, but I’ll do it on Gitter instead of polluting this thread 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Plugins with JCasC - Jenkins
This post is a Step-by-Step Guide to configure your plugins with the Jenkins Configuration as a Code (JCasC) plugin.
Read more >
Getting started with Jenkins Config as Code - Verifa
Install the config-as-code plugin to Jenkins. Setup the environment variable CASC_JENKINS_CONFIG to tell Jenkins where to find the YAML ...
Read more >
jenkinsci/configuration-as-code-plugin - Gitter
Hi, I'm having a wierd issue with using yaml/yamls from Kubernetes Template. I do not know exactly what I am doing wrong but...
Read more >
最小的jcasc yaml配置无效WRT。Matrix-auth插件- 测试工程师
Minimal JCasC yaml config ineffectual wrt. matrix-auth plugin. 你好!参考。与@casz在gitter中对话,这是我的最小设置:
Read more >
Setting up Jenkins Docker with Jenkins Configuration as Code ...
We create a jenkins.yml file that contains our role-based config and ... dependency configuration-as-code Downloading plugin: matrix-auth ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found