protected static void insertLabels ( CreateContainerCmd containerConfig , Run run ) { // add tags Map < String , String > labels = containerConfig . getLabels ( ) ; if ( labels == null ) labels = new HashMap <> ( ) ; labels . put ( "YAD_PLUGIN" , DockerShellStep . class . getName ( ) ) ; labels . put ( "JENKINS_JOB_BASE_NAME" , run . getParent ( ) . getName ( ) ) ; labels . put ( "JENKINS_INSTANCE_IDENTITY" , new String ( encodeBase64 ( InstanceIdentity . get ( ) . getPublic ( ) . getEncoded ( ) ) , UTF_8 ) ) ; containerConfig . withLabels ( labels ) ; }
Append some tags to identify who created this container .